| 213 | } |
| 214 | |
| 215 | void EditorState::command_Quit(const MyGUI::UString& _commandName, bool& _result) |
| 216 | { |
| 217 | if (!checkCommand()) |
| 218 | return; |
| 219 | |
| 220 | if (UndoManager::getInstance().isUnsaved()) |
| 221 | { |
| 222 | MyGUI::Message* message = MessageBoxManager::getInstance().create( |
| 223 | replaceTags("Warning"), |
| 224 | replaceTags("MessageUnsavedData"), |
| 225 | MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No | |
| 226 | MyGUI::MessageBoxStyle::Cancel); |
| 227 | message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultQuit); |
| 228 | } |
| 229 | else |
| 230 | { |
| 231 | StateManager::getInstance().stateEvent(this, "Exit"); |
| 232 | } |
| 233 | |
| 234 | _result = true; |
| 235 | } |
| 236 | |
| 237 | void EditorState::command_FileDrop(const MyGUI::UString& _commandName, bool& _result) |
| 238 | { |
nothing calls this directly
no test coverage detected