Fixed #444
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9905 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
480ab1c436
commit
8a4bc01416
@ -629,6 +629,7 @@ EventPropagation EventHandler::onWidgetActivated(GUIEngine::Widget* w, const int
|
||||
else
|
||||
{
|
||||
std::string id = w->m_properties[PROP_ID];
|
||||
assert(w->ok());
|
||||
if (w->transmitEvent(w, id, playerID) == EVENT_LET)
|
||||
{
|
||||
assert(w->ok());
|
||||
|
@ -287,7 +287,10 @@ EventPropagation SpinnerWidget::transmitEvent(Widget* w, std::string& originator
|
||||
{
|
||||
if (m_listener != NULL)
|
||||
{
|
||||
m_listener->onSpinnerConfirmed();
|
||||
if (m_listener->onSpinnerConfirmed() == EVENT_BLOCK)
|
||||
{
|
||||
return EVENT_BLOCK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,11 @@ namespace GUIEngine
|
||||
public:
|
||||
virtual ~ISpinnerConfirmListener() {}
|
||||
|
||||
/** \brief Invoked when the spinner is selected and "fire" is pressed */
|
||||
virtual void onSpinnerConfirmed() = 0;
|
||||
/**
|
||||
* \brief Invoked when the spinner is selected and "fire" is pressed
|
||||
* \return whether to block the event from further processing
|
||||
*/
|
||||
virtual EventPropagation onSpinnerConfirmed() = 0;
|
||||
};
|
||||
|
||||
protected:
|
||||
|
@ -743,9 +743,10 @@ public:
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/** \brief Event callback from ISpinnerConfirmListener */
|
||||
virtual void onSpinnerConfirmed()
|
||||
virtual EventPropagation onSpinnerConfirmed()
|
||||
{
|
||||
KartSelectionScreen::getInstance()->playerConfirm(m_playerID);
|
||||
return EVENT_BLOCK;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user