Skip to content

Commit

Permalink
Simplify, correct args
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Apr 6, 2020
1 parent 6c821fc commit 78bc2a1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/gui/guiFormSpecMenu.cpp
Expand Up @@ -3315,10 +3315,8 @@ void GUIFormSpecMenu::drawMenu()

if (hovered != NULL) {
if (m_show_debug) {
core::rect<s32> hovered_pos = hovered->getAbsolutePosition();
driver->draw2DRectangle(0x22FFFF00,
hovered->getAbsoluteClippingRect(),
&hovered_pos);
core::rect<s32> rect = hovered->getAbsoluteClippingRect();
driver->draw2DRectangle(0x22FFFF00, rect, &rect);
}

s32 id = hovered->getID();
Expand Down Expand Up @@ -3845,7 +3843,7 @@ bool GUIFormSpecMenu::OnEvent(const SEvent& event)
}

if (event.KeyInput.PressedDown && kp == getKeySetting("keymap_toggle_debug"))
m_show_debug ^= true;
m_show_debug = !m_show_debug;

if (event.KeyInput.PressedDown &&
(event.KeyInput.Key==KEY_RETURN ||
Expand Down

0 comments on commit 78bc2a1

Please sign in to comment.