Skip to content

Commit

Permalink
Control Panel: Hide mouse cursor if not trapped by the Window
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 7, 2013
1 parent 5b2b867 commit 7ff6f08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doomsday/client/src/ui/ui_main.cpp
Expand Up @@ -55,8 +55,8 @@ extern boolean stopTime;
extern boolean tickUI;
extern boolean drawGame;

static boolean uiActive = false; /// The user interface is active.
static boolean uiShowMouse = true;
static boolean uiActive; /// The user interface is active.
static boolean uiNoMouse;
static ui_page_t* uiCurrentPage = 0; /// Currently active page.
static int uiFontHgt; /// Height of the UI font.
static int uiCX, uiCY; /// Cursor position.
Expand Down Expand Up @@ -136,7 +136,7 @@ void UI_PageInit(boolean halttime, boolean tckui, boolean tckframe, boolean drwg
uiFontHgt = FR_SingleLineHeight("UI");

// Should the mouse cursor be visible?
uiShowMouse = !CommandLine_Exists("-nomouse");
uiNoMouse = ( CommandLine_Exists("-nomouse") || !Mouse_IsPresent() );

// Allow use of the escape key to exit the ui?
allowEscape = !noescape;
Expand Down Expand Up @@ -493,7 +493,7 @@ void UI_Drawer(void)
uiCurrentPage->drawer(uiCurrentPage);

// Draw mouse cursor?
if(uiShowMouse)
if(!uiNoMouse && Window_IsMouseTrapped(theWindow))
{
Point2Raw origin;
Size2Raw size;
Expand Down

0 comments on commit 7ff6f08

Please sign in to comment.