World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
GameWindowHandler.h
См. документацию.
1 #pragma once
2 
3 class Mouse;
4 
5 namespace Application {
6 
7 // Handles events from game window (OSWindow) and transforms it to game actions/events
9  public:
11 
12  void OnMouseLeftClick(int x, int y);
13  void OnMouseRightClick(int x, int y);
14  void OnMouseLeftUp();
15  void OnMouseRightUp();
16  void OnMouseLeftDoubleClick(int x, int y);
17  void OnMouseRightDoubleClick(int x, int y);
18  void OnMouseMove(int x, int y, bool left_button, bool right_button);
19  void OnScreenshot();
20  void OnToggleFullscreen();
21  void OnVkDown(int vk, int vk_to_char);
22  bool OnChar(int c);
23  void OnFocus();
24  void OnFocusLost();
25  void OnPaint();
26  void OnActivated();
27  void OnDeactivated();
28 
29  private:
30  Mouse *mouse = nullptr;
31 };
32 
33 } // namespace Application
Application::GameWindowHandler::OnFocus
void OnFocus()
Definition: GameWindowHandler.cpp:179
Application::GameWindowHandler::GameWindowHandler
GameWindowHandler()
Definition: GameWindowHandler.cpp:30
Mouse
Definition: Mouse.h:279
Application::GameWindowHandler::OnMouseRightClick
void OnMouseRightClick(int x, int y)
Definition: GameWindowHandler.cpp:70
Application::GameWindowHandler::mouse
Mouse * mouse
Definition: GameWindowHandler.h:30
Application::GameWindowHandler::OnMouseRightDoubleClick
void OnMouseRightDoubleClick(int x, int y)
Definition: GameWindowHandler.cpp:115
Application::GameWindowHandler::OnMouseLeftDoubleClick
void OnMouseLeftDoubleClick(int x, int y)
Definition: GameWindowHandler.cpp:107
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
Application::GameWindowHandler::OnActivated
void OnActivated()
Definition: GameWindowHandler.cpp:196
Application::GameWindowHandler::OnDeactivated
void OnDeactivated()
Definition: GameWindowHandler.cpp:232
Application::GameWindowHandler::OnToggleFullscreen
void OnToggleFullscreen()
Definition: GameWindowHandler.cpp:253
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
Application::GameWindowHandler::OnVkDown
void OnVkDown(int vk, int vk_to_char)
Definition: GameWindowHandler.cpp:135
Application::GameWindowHandler
Definition: GameWindowHandler.h:8
Application
Definition: Configuration.h:5
Application::GameWindowHandler::OnScreenshot
void OnScreenshot()
Definition: GameWindowHandler.cpp:34
Application::GameWindowHandler::OnMouseRightUp
void OnMouseRightUp()
Definition: GameWindowHandler.cpp:98
c
const GLubyte * c
Definition: SDL_opengl_glext.h:11096
Application::GameWindowHandler::OnMouseLeftUp
void OnMouseLeftUp()
Definition: GameWindowHandler.cpp:89
Application::GameWindowHandler::OnPaint
void OnPaint()
Definition: GameWindowHandler.cpp:187
Application::GameWindowHandler::OnFocusLost
void OnFocusLost()
Definition: GameWindowHandler.cpp:183
Application::GameWindowHandler::OnMouseMove
void OnMouseMove(int x, int y, bool left_button, bool right_button)
Definition: GameWindowHandler.cpp:123
Application::GameWindowHandler::OnChar
bool OnChar(int c)
Definition: GameWindowHandler.cpp:40
Application::GameWindowHandler::OnMouseLeftClick
void OnMouseLeftClick(int x, int y)
Definition: GameWindowHandler.cpp:47