Game Load: added a convenient button in Load Game to open your saves folder
(cherry-picked from commit 802bbe8cdc
)
This commit is contained in:
parent
0c6322230a
commit
1dd00c3441
3 changed files with 21 additions and 0 deletions
|
@ -35,6 +35,7 @@
|
|||
### User Interface
|
||||
* Swapped the position and formatting of game names and titles in the MP lobby.
|
||||
* Made Faction Select button's purpose more clear in MP Staging.
|
||||
* Added a convenient button in Load Game to open your saves folder.
|
||||
### WML engine
|
||||
* Support formula= key in [variable] ConditionalWML
|
||||
* Support to_location in [move_unit], taking a location ID
|
||||
|
|
|
@ -557,6 +557,21 @@
|
|||
grow_factor = 1
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "left"
|
||||
|
||||
[button]
|
||||
id = "browse_saves_folder"
|
||||
definition = "action_browse"
|
||||
|
||||
tooltip = _ "Open saves folder"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 0
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "right"
|
||||
|
||||
[button]
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include "gui/dialogs/game_load.hpp"
|
||||
|
||||
#include "desktop/open.hpp"
|
||||
#include "filesystem.hpp"
|
||||
#include "formula/string_utils.hpp"
|
||||
#include "gettext.hpp"
|
||||
|
@ -147,6 +148,10 @@ void game_load::pre_show(window& window)
|
|||
std::bind(&game_load::delete_button_callback,
|
||||
this, std::ref(window)));
|
||||
|
||||
connect_signal_mouse_left_click(
|
||||
find_widget<button>(&window, "browse_saves_folder", false),
|
||||
std::bind(&desktop::open_object, filesystem::get_saves_dir()));
|
||||
|
||||
display_savegame(window);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue