Prevent GUI messages from appearing in large quantities (e.g. when pressing a gamepad axis and only the game master can play - show only one message, not one for every event generated along the axis)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5336 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b11285ae76
commit
0670901505
@ -457,7 +457,16 @@ namespace GUIEngine
|
||||
|
||||
void showMessage(const wchar_t* message, const float time)
|
||||
{
|
||||
// check for duplicates
|
||||
const int count = gui_messages.size();
|
||||
for (int n=0; n<count; n++)
|
||||
{
|
||||
if (gui_messages[n].m_message == message) return;
|
||||
}
|
||||
|
||||
// add message
|
||||
gui_messages.push_back( MenuMessage(message, time) );
|
||||
|
||||
}
|
||||
|
||||
Widget* getFocusForPlayer(const int playerID)
|
||||
|
Loading…
Reference in New Issue
Block a user