tmewett / BrogueCE

Brogue: Community Edition - a community-lead fork of the much-loved minimalist roguelike game
https://sites.google.com/site/broguegame/
GNU Affero General Public License v3.0
1.03k stars 109 forks source link

Use a dialog window when saving a game or recording #638

Closed zenzombie closed 9 months ago

zenzombie commented 11 months ago

Previously, file save operations used the message pane, which is a dungeon UI component. However, when the player wins or dies, the dungeon UI is no longer visible, so the location of the message pane and any related message management is no longer relevant.

This change updates the UI so that game save and recording save operations use a centered dialog. The dialog title displays the prompt and the filename is entered on the line below, which accommodates much long file names. This is especially nice for the long filenames generated by debug builds but is also generally useful since the filename now includes a variant identifier and version number and can also include the mode name (e.g. wizard). I added some long filename handling so the initially generated filename is truncated to fit in the available space and the max length is enforced when typing, with no off-screen overflow.