OPENGL: Limit mouse cursor drawing to inside game screen when no overlay is visible.

This commit is contained in:
Johannes Schickel 2015-01-07 20:02:10 +01:00
parent 4c64f7e194
commit f879f8af04
2 changed files with 90 additions and 7 deletions

View file

@ -155,7 +155,7 @@ protected:
* @param x X coordinate in physical coordinates.
* @param y Y coordinate in physical coordinates.
*/
void setMousePosition(int x, int y) { _cursorX = x; _cursorY = y; }
void setMousePosition(int x, int y);
/**
* Query the mouse position in physical coordinates.
@ -393,6 +393,16 @@ private:
*/
int _cursorY;
/**
* X coordinate used for drawing the cursor.
*/
int _cursorDisplayX;
/**
* Y coordinate used for drawing the cursor.
*/
int _cursorDisplayY;
/**
* The X offset for the cursor hotspot in unscaled coordinates.
*/
@ -454,6 +464,11 @@ private:
*/
byte _cursorPalette[3 * 256];
/**
* Draws a rectangle
*/
void drawRect(GLfloat x, GLfloat y, GLfloat w, GLfloat h);
#ifdef USE_OSD
//
// OSD