Fixed bug with tab controls not absorbing a mouse-down but expecting to have the focus in a mouse-up, reported by christianclavet.
Windows are now brought to the front when any of their children are focused. git-svn-id: http://svn.code.sf.net/p/irrlicht/code/trunk@1212 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
e3b9ae59d2
commit
47a7914125
@ -347,9 +347,9 @@ bool CGUITabControl::OnEvent(const SEvent& event)
|
||||
case EET_MOUSE_INPUT_EVENT:
|
||||
switch(event.MouseInput.Event)
|
||||
{
|
||||
//case EMIE_LMOUSE_PRESSED_DOWN:
|
||||
// Environment->setFocus(this);
|
||||
// return true;
|
||||
case EMIE_LMOUSE_PRESSED_DOWN:
|
||||
// todo: dragging tabs around
|
||||
return true;
|
||||
case EMIE_LMOUSE_LEFT_UP:
|
||||
if (selectTab(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y)))
|
||||
return true;
|
||||
|
@ -119,10 +119,8 @@ bool CGUIWindow::OnEvent(const SEvent& event)
|
||||
else
|
||||
if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUSED)
|
||||
{
|
||||
if (event.GUIEvent.Caller == this && Parent)
|
||||
{
|
||||
if (isMyChild(event.GUIEvent.Caller) && Parent)
|
||||
Parent->bringToFront(this);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (event.GUIEvent.EventType == EGET_BUTTON_CLICKED)
|
||||
@ -140,9 +138,8 @@ bool CGUIWindow::OnEvent(const SEvent& event)
|
||||
|
||||
// if the event was not absorbed
|
||||
if (!Parent->OnEvent(e))
|
||||
{
|
||||
remove();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user