gui2/preferences: Add version info button

Also simplifies the layout of the bottom-most row of the dialog a bit.
This commit is contained in:
Iris Morelle 2018-05-23 19:32:08 -04:00
parent d379abc4a9
commit cfc0c4f8e1
3 changed files with 19 additions and 24 deletions

View file

@ -24,6 +24,7 @@
* Fixed the first unit sometimes not being selected when opening the Recall
dialog.
* Fixed a crash when using very large portraits in [message] (issue #2912)
* Added a button to access the version info dialog to Preferences.
### Terrains
* Removed hidden terrains that were not supposed to make it to 1.14: ^Prg,
^Prgo, ^Pwd, ^Pwdo

View file

@ -408,33 +408,24 @@
[row]
{GUI_FILLER}
[column]
horizontal_alignment = "left"
[button]
id = "about"
definition = "action_about"
tooltip = _ "Display the game version and build information"
[/button]
[/column]
[column]
horizontal_alignment = "right"
[grid]
[row]
grow_factor = 0
{GUI_FILLER}
[column]
border = "all"
border_size = 5
horizontal_alignment = "right"
[button]
id = "ok"
definition = "default"
label = _ "Close"
[/button]
[/column]
[/row]
[/grid]
border = "all"
border_size = 5
[button]
id = "ok"
definition = "default"
label = _ "Close"
[/button]
[/column]
[/row]

View file

@ -40,6 +40,7 @@
#include "gui/dialogs/select_orb_colors.hpp"
#include "gui/auxiliary/find_widget.hpp"
#include "gui/dialogs/game_version.hpp"
#include "gui/dialogs/message.hpp"
#include "gui/dialogs/transient_message.hpp"
#include "gui/widgets/button.hpp"
@ -997,6 +998,8 @@ void preferences_dialog::pre_show(window& window)
{
set_always_save_fields(true);
connect_signal_mouse_left_click(find_widget<button>(&window, "about", false), std::bind(&game_version::display<>));
//
// Status labels
// These need to be set here in pre_show, once the fields are initialized. For some reason, this