diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2012-03-27 17:25:44 +0200 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2013-01-13 22:40:52 +0100 |
commit | 4e67445f9c3e05ab193f9b7225172fbad1091052 (patch) | |
tree | 904365873339f126407d5c0f49f3c2634ec92f2b /src/menu | |
parent | f65fa66940b78a3953e5dffa72ca384803957ad3 (diff) | |
download | usdx-4e67445f9c3e05ab193f9b7225172fbad1091052.tar.gz usdx-4e67445f9c3e05ab193f9b7225172fbad1091052.tar.xz usdx-4e67445f9c3e05ab193f9b7225172fbad1091052.zip |
menu/software_mouse_pointer: set hidden if timer is ready
this saves the draw call if the pointer should not be drawn
Diffstat (limited to 'src/menu')
-rw-r--r-- | src/menu/software_mouse_pointer.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/menu/software_mouse_pointer.cpp b/src/menu/software_mouse_pointer.cpp index b86b06ae..461ad4d5 100644 --- a/src/menu/software_mouse_pointer.cpp +++ b/src/menu/software_mouse_pointer.cpp @@ -97,8 +97,10 @@ namespace usdx void SoftwareMousePointer::draw(void) { - if (fade_inactive->is_ready()) + if (fade_inactive->is_ready()) { + set_visible(false); return; + } glBindTexture(GL_TEXTURE_2D, texture_normal->get_texture()); @@ -121,6 +123,10 @@ namespace usdx { set_position(x, y); fade_inactive->update(); + + if (!get_visible()) { + set_visible(true); + } } }; |