diff options
Diffstat (limited to 'source/gameengine/BlenderRoutines/KX_BlenderCanvas.h')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderCanvas.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h index f352a082421..42f956cafcd 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h +++ b/source/gameengine/BlenderRoutines/KX_BlenderCanvas.h @@ -64,7 +64,7 @@ public: * * @param area The Blender ARegion to run the game within. */ - KX_BlenderCanvas(struct wmWindow* win, class RAS_Rect &rect); + KX_BlenderCanvas(struct wmWindow* win, class RAS_Rect &rect, struct ARegion* ar); ~KX_BlenderCanvas(); void @@ -109,6 +109,22 @@ public: GetHeight( ) const ; + int + GetMouseX(int x + ); + + int + GetMouseY(int y + ); + + float + GetMouseNormalizedX(int x + ); + + float + GetMouseNormalizedY(int y + ); + const RAS_Rect & GetDisplayArea( @@ -170,11 +186,13 @@ private: struct wmWindow* m_win; RAS_Rect m_frame_rect; RAS_Rect m_area_rect; + short m_area_left; + short m_area_top; #ifdef WITH_CXX_GUARDEDALLOC public: - void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderCanvas"); } + void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:KX_BlenderCanvas"); } void operator delete( void *mem ) { MEM_freeN(mem); } #endif }; |