static void window_title_editor_close(rct_window * w) { title_stop_previewing_sequence(); // Close the related windows window_close_by_class(WC_TITLE_COMMAND_EDITOR); FreeTitleSequence(_editingTitleSequence); _editingTitleSequence = nullptr; _sequenceName = nullptr; SafeFree(_renameSavePath); }
static void window_title_editor_close(rct_window *w) { // Close the related windows window_close_by_class(WC_TITLE_COMMAND_EDITOR); FreeTitleSequence(_editingTitleSequence); _editingTitleSequence = NULL; _isSequencePlaying = false; _sequenceName = NULL; free(_renameSavePath); _renameSavePath = NULL; }
static void window_title_editor_load_sequence(size_t index) { if (index >= title_sequence_manager_get_count()) return; const char * path = title_sequence_manager_get_path(index); TitleSequence * titleSequence = LoadTitleSequence(path); if (titleSequence == nullptr) { context_show_error(STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, STR_NONE); return; } _selectedTitleSequence = index; size_t predefinedIndex = title_sequence_manager_get_predefined_index(index); _isSequenceReadOnly = (predefinedIndex != SIZE_MAX); _sequenceName = title_sequence_manager_get_name(index); FreeTitleSequence(_editingTitleSequence); _editingTitleSequence = titleSequence; window_close_by_class(WC_TITLE_COMMAND_EDITOR); }