void EditorState::commandSaveAs(const MyGUI::UString& _commandName) { if (!checkCommand()) return; showSaveAsWindow(); }
void EditorState::command_SaveAs(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; showSaveAsWindow(); _result = true; }
void EditorState::command_Save(const MyGUI::UString& _commandName, bool& _result) { if (!checkCommand()) return; if (UndoManager::getInstance().isUnsaved()) { if (mFileName == mDefaultFileName) showSaveAsWindow(); else save(); } _result = true; }
void EditorState::notifyMessageBoxResultQuit(MyGUI::Message* _sender, MyGUI::MessageBoxStyle _result) { if (_result == MyGUI::MessageBoxStyle::Yes) { if (mFileName == mDefaultFileName) { showSaveAsWindow(); } else { save(); StateManager::getInstance().stateEvent(this, "Exit"); } } else if (_result == MyGUI::MessageBoxStyle::No) { StateManager::getInstance().stateEvent(this, "Exit"); } }