Implemented the escape behaviour in the dialogs.

The new dialogs didn't honour the escape action, which didn't show the
following messages. This behaviour is now implemented in the new widgets
as well.
This commit is contained in:
Mark de Wever 2009-01-01 15:50:30 +00:00
parent 35003295be
commit 98ee07ab3e
4 changed files with 11 additions and 2 deletions

View file

@ -15,5 +15,6 @@ The release team should empty this file after each release.
Many improvements in the new dialog code:
- Fixed a glitch where a new dialog didn't show up after an old dialog.
- Spacebar closes the dialogs without a scrollbar again.
- Pressing escape in a new dialog, behaves like in the old dialogs again.
***

View file

@ -4,6 +4,7 @@ Version 1.5.7+svn:
* Fixed a glitch which closed a new dialog on the mouse up event of the old
dialog (the effect is percieved as the new dialog not showing up).
* Spacebar closes the dialogs without a scrollbar again.
* Pressing escape in a new dialog, behaves like in the old dialogs again.
* Language and i18n:
* updated translations: Slovak
* Networking

View file

@ -6,6 +6,7 @@ Version 1.5.7+svn:
* Graphics:
* Fixed a glitch where a new dialog didn't show up after an old dialog.
* Spacebar closes the dialogs without a scrollbar again.
* Pressing escape in a new dialog, behaves like in the old dialogs again.
* Language and translations
* updated translations: Slovak.

View file

@ -27,6 +27,7 @@
#include "gettext.hpp"
#include "gui/dialogs/wml_message.hpp"
#include "gui/widgets/settings.hpp"
#include "gui/widgets/window.hpp"
#include "log.hpp"
#include "map.hpp"
#include "map_label.hpp"
@ -2882,11 +2883,16 @@ namespace {
const tportrait* portrait =
speaker->second.portrait(400, tportrait::LEFT);
if(portrait) {
gui2::twml_message_left (
gui2::twml_message_left dlg(
caption,
cfg["message"],
portrait->image,
portrait->mirror).show(screen->video());
portrait->mirror);
dlg.show(screen->video());
if(dlg.get_retval() == gui2::twindow::CANCEL) {
handler.skip_messages() = true;
}
return;
}
}