Minor tweaks

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14678 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2013-12-09 02:15:54 +00:00
parent 0383a9ec55
commit aebd8d2996
2 changed files with 5 additions and 8 deletions

View File

@ -39,8 +39,6 @@ namespace Debug {
GUI events would be blocked while in a race... */
static bool g_debug_menu_visible = false;
static bool g_was_pointer_shown = false;
// -----------------------------------------------------------------------------
// Commands for the debug menu
enum DebugMenuCommand
@ -127,8 +125,6 @@ bool onEvent(const SEvent &event)
g_debug_menu_visible = true;
g_was_pointer_shown = irr_driver->isPointerShown();
irr_driver->showPointer();
}
@ -147,10 +143,6 @@ bool onEvent(const SEvent &event)
if(event.GUIEvent.EventType == EGET_ELEMENT_CLOSED)
{
g_debug_menu_visible = false;
if(g_was_pointer_shown)
irr_driver->showPointer();
else
irr_driver->hidePointer();
}
if (event.GUIEvent.EventType == gui::EGET_MENU_ITEM_SELECTED)
@ -343,4 +335,8 @@ bool onEvent(const SEvent &event)
return true; // continue event handling
}
bool isOpen()
{
return g_debug_menu_visible;
}
}

View File

@ -26,6 +26,7 @@ namespace irr {
namespace Debug
{
bool onEvent(const irr::SEvent &event);
bool isOpen();
}