Added 'ok' button to 'new player' dialog. I can't seem to get them next

to each other, so for now they are just on top of each other.
This commit is contained in:
hiker 2014-04-30 16:57:22 +10:00
parent bb737d0448
commit d7219f3a2d
2 changed files with 10 additions and 6 deletions

View File

@ -11,10 +11,10 @@
<spacer height="20" width="20" />
<!-- TODO: ok button? -->
<button id="cancel" I18N="When configuring input" text="Press ESC to cancel" align="center"/>
<buttonbar proportion="1" id="options" width="100%" height="100%">
<button id="ok" I18N="When configuring input" text="OK" align="center"/>
<button id="cancel" I18N="When configuring input" text="Cancel" align="center"/>
</buttonbar>
<spacer height="15" width="20" />
</div>

View File

@ -17,8 +17,6 @@
#include "states_screens/dialogs/enter_player_name_dialog.hpp"
#include <IGUIEnvironment.h>
#include "audio/sfx_manager.hpp"
#include "challenges/unlock_manager.hpp"
#include "config/player_manager.hpp"
@ -31,6 +29,7 @@
#include "utils/translation.hpp"
#include "utils/string_utils.hpp"
#include <IGUIEnvironment.h>
using namespace GUIEngine;
using namespace irr;
@ -82,6 +81,11 @@ GUIEngine::EventPropagation
dismiss();
return GUIEngine::EVENT_BLOCK;
}
else if (eventSource == "ok")
{
onEnterPressedInternal();
return GUIEngine::EVENT_BLOCK;
}
return GUIEngine::EVENT_LET;
} // processEvent