Enhance: Change title editor default selection

Title editor sequence selection now defaults to current preset. This is
only after the first time the window is opened. Afterwards it keeps the
last selection.
This commit is contained in:
Robert Jordan 2017-11-03 14:18:04 -04:00 committed by Michael Steenbeek
parent a01471b535
commit 8da1cad3ab
1 changed files with 4 additions and 1 deletions

View File

@ -190,7 +190,7 @@ static rct_widget window_title_editor_widgets[] = {
{ WIDGETS_END },
};
static size_t _selectedTitleSequence = 0;
static size_t _selectedTitleSequence = SIZE_MAX;
static bool _isSequenceReadOnly;
static TitleSequence * _editingTitleSequence = nullptr;
static const utf8 * _sequenceName;
@ -224,6 +224,9 @@ void window_title_editor_open(sint32 tab)
if (window != nullptr)
return;
if (_selectedTitleSequence == SIZE_MAX)
_selectedTitleSequence = title_get_config_sequence();
window = window_create_auto_pos(WW, WH2, &window_title_editor_events, WC_TITLE_EDITOR, WF_10 | WF_RESIZABLE);
window->widgets = window_title_editor_widgets;
window->enabled_widgets =