Slightly simplify semantincs (and code) of dialog notification of events
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6516 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
fd28f792ab
commit
5bde7a572d
@ -458,12 +458,13 @@ void EventHandler::sendEventToUser(GUIEngine::Widget* widget, std::string& name,
|
|||||||
{
|
{
|
||||||
if (ModalDialog::isADialogActive())
|
if (ModalDialog::isADialogActive())
|
||||||
{
|
{
|
||||||
ModalDialog::getCurrent()->processEvent(widget->m_properties[PROP_ID]);
|
if (ModalDialog::getCurrent()->processEvent(widget->m_properties[PROP_ID]) == EVENT_BLOCK)
|
||||||
}
|
{
|
||||||
else
|
return;
|
||||||
{
|
}
|
||||||
getCurrentScreen()->eventCallback(widget, name, playerID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCurrentScreen()->eventCallback(widget, name, playerID);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
@ -502,15 +503,6 @@ EventPropagation EventHandler::onWidgetActivated(GUIEngine::Widget* w, const int
|
|||||||
parent event handler says so */
|
parent event handler says so */
|
||||||
if (parent->transmitEvent(w, w->m_properties[PROP_ID], playerID) == EVENT_LET)
|
if (parent->transmitEvent(w, w->m_properties[PROP_ID], playerID) == EVENT_LET)
|
||||||
{
|
{
|
||||||
// notify modal dialog too
|
|
||||||
if (ModalDialog::isADialogActive())
|
|
||||||
{
|
|
||||||
if (ModalDialog::getCurrent()->processEvent(parent->m_properties[PROP_ID]) == EVENT_BLOCK)
|
|
||||||
{
|
|
||||||
return EVENT_BLOCK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sendEventToUser(parent, parent->m_properties[PROP_ID], playerID);
|
sendEventToUser(parent, parent->m_properties[PROP_ID], playerID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user