Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editor: Add Recent Files menu with recently loaded/saved files
File paths are recorded into the game preferences up to a (currently hardcoded) limit of 6 and opening or saving maps adds or bumps existing entries to the top. We may allow users to change the MRU limit in Advanced Preferences in a later commit. Adds two translatable strings. In order to fit file paths in the menu without filling up the whole screen sideways, we use only the file names for now. Because identical file names could prove to be an actual issue later, I intend to look into ellipsizing paths correctly in a later step. (Note that I'm piggybacking on the crummy submenu support we already had in the themable UI so that this can be safely backported to 1.12. It's decidedly not optimal usability-wise, but it'll have to do for now.)
- Loading branch information
Showing
9 changed files
with
188 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ std::string get_left_button_function(); | |
|
||
enum menu_type { | ||
MAP, | ||
LOAD_MRU, | ||
PALETTE, | ||
AREA, | ||
SIDE, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters