mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MouseHandler.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "World.h"
9 
15 };
16 
18 class MouseHandler {
19 public:
20  MouseHandler(void);
21  ~MouseHandler(void);
22  bool isMouseHoveringActive();
23  void setMouseHovering( bool status );
24  bool isMouseOverRect( unsigned int left, unsigned int right, unsigned int top, unsigned int bottom );
25  bool isMouseOverRectCenter( unsigned int centerx, unsigned int centery, unsigned int width, unsigned int height );
26  void setMousePosition( Position position );
27  void setMousePosition( int x, int y );
29  void setHittedObject( HitableObjects object );
30  void setHittedObjectInfo( int value );
32  int getHittedObjectInfo( void );
33  void setMouseMoveStartPosition( Position startPosition );
34  void setMouseMoveStartPosition( int x, int y );
35  void setMouseMoveEndPosition( Position endPosition );
36  void setMouseMoveEndPosition( int x, int y );
39 private:
40  bool m_mouseHovering;
41  Position m_position;
42  Position m_moveStartPosition;
43  Position m_moveEndPosition;
44  HitableObjects m_hitted;
45  int m_hittedInfo;
46 };