Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added mouse button click to toggle IMM.
Browse files Browse the repository at this point in the history
  • Loading branch information
dewyatt committed Jul 6, 2010
1 parent 0c80073 commit 458b461
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion EXCLUDE/GLIMM/include/App.hpp
Expand Up @@ -19,6 +19,7 @@ class App : public Window_Listener
virtual void On_Key_Up(int Key);
virtual void On_Char(unsigned int Char);
virtual void On_Resized(unsigned int Width, unsigned int Height);
virtual void On_Mouse_Button_Down(Mouse_Button Button);

private:
void Update();
Expand All @@ -27,7 +28,7 @@ class App : public Window_Listener
static const int Width = 800;
static const int Height = 600;
static const int Bits_Per_Pixel = 32;
static const bool Fullscreen = false;
static const bool Fullscreen = true;

Window my_Window;
bool my_Done;
Expand Down
13 changes: 10 additions & 3 deletions EXCLUDE/GLIMM/src/App.cpp
Expand Up @@ -57,9 +57,6 @@ void App::On_Key_Down(int Key)
case VK_ESCAPE:
On_Close();
break;
case VK_TAB:
my_Window.Get_IMM().Toggle();
break;
}
}

Expand All @@ -83,6 +80,16 @@ void App::On_Resized(unsigned int Width, unsigned int Height)
glLoadIdentity();
}

void App::On_Mouse_Button_Down(Mouse_Button Button)
{
switch (Button)
{
case Mouse_Button_Left:
my_Window.Get_IMM().Toggle();
break;
}
}

void App::Update()
{
Rotation += 0.2f;
Expand Down

0 comments on commit 458b461

Please sign in to comment.