mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed: Lines in the option menu that covered the same vertical space as the back button rendered the back button inoperable.
SVN r2779 (trunk)
This commit is contained in:
parent
087979d6cc
commit
d5f9b0874e
1 changed files with 13 additions and 7 deletions
|
@ -104,12 +104,16 @@ DMenu::DMenu(DMenu *parent)
|
||||||
|
|
||||||
bool DMenu::Responder (event_t *ev)
|
bool DMenu::Responder (event_t *ev)
|
||||||
{
|
{
|
||||||
|
bool res = false;
|
||||||
if (ev->type == EV_GUI_Event)
|
if (ev->type == EV_GUI_Event)
|
||||||
{
|
{
|
||||||
if (ev->subtype == EV_GUI_LButtonDown)
|
if (ev->subtype == EV_GUI_LButtonDown)
|
||||||
{
|
{
|
||||||
MouseEventBack(MOUSE_Click, ev->data1, ev->data2);
|
res = MouseEventBack(MOUSE_Click, ev->data1, ev->data2);
|
||||||
if (MouseEvent(MOUSE_Click, ev->data1, ev->data2))
|
// make the menu's mouse handler believe that the current coordinate is outside the valid range
|
||||||
|
if (res) ev->data2 = -1;
|
||||||
|
res |= MouseEvent(MOUSE_Click, ev->data1, ev->data2);
|
||||||
|
if (res)
|
||||||
{
|
{
|
||||||
SetCapture();
|
SetCapture();
|
||||||
}
|
}
|
||||||
|
@ -120,8 +124,9 @@ bool DMenu::Responder (event_t *ev)
|
||||||
BackbuttonTime = BACKBUTTON_TIME;
|
BackbuttonTime = BACKBUTTON_TIME;
|
||||||
if (mMouseCapture || m_use_mouse == 1)
|
if (mMouseCapture || m_use_mouse == 1)
|
||||||
{
|
{
|
||||||
MouseEventBack(MOUSE_Move, ev->data1, ev->data2);
|
res = MouseEventBack(MOUSE_Move, ev->data1, ev->data2);
|
||||||
return MouseEvent(MOUSE_Move, ev->data1, ev->data2);
|
if (res) ev->data2 = -1;
|
||||||
|
res |= MouseEvent(MOUSE_Move, ev->data1, ev->data2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ev->subtype == EV_GUI_LButtonUp)
|
else if (ev->subtype == EV_GUI_LButtonUp)
|
||||||
|
@ -129,8 +134,9 @@ bool DMenu::Responder (event_t *ev)
|
||||||
if (mMouseCapture)
|
if (mMouseCapture)
|
||||||
{
|
{
|
||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
MouseEventBack(MOUSE_Release, ev->data1, ev->data2);
|
res = MouseEventBack(MOUSE_Release, ev->data1, ev->data2);
|
||||||
return MouseEvent(MOUSE_Release, ev->data1, ev->data2);
|
if (res) ev->data2 = -1;
|
||||||
|
res |= MouseEvent(MOUSE_Release, ev->data1, ev->data2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,7 +217,7 @@ bool DMenu::MouseEventBack(int type, int x, int y)
|
||||||
if (m_use_mouse == 2) mBackbuttonSelected = false;
|
if (m_use_mouse == 2) mBackbuttonSelected = false;
|
||||||
MenuEvent(MKEY_Back, true);
|
MenuEvent(MKEY_Back, true);
|
||||||
}
|
}
|
||||||
return true;
|
return mBackbuttonSelected;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue