30 using std::make_unique;
32 using std::unique_ptr;
86 if (fileName.empty() ==
true)
throw ExceptionBase(
"Could not save file. No filename known");
88 Tools::getPathName(fileName),
89 Tools::getFileName(fileName)
98 class OnEmptySave:
public virtual Action
101 void performAction()
override {
103 emptyEditorTabController->view->saveFile(
104 emptyEditorTabController->popUps->getFileDialogScreenController()->getPathName(),
105 emptyEditorTabController->popUps->getFileDialogScreenController()->getFileName()
108 emptyEditorTabController->showInfoPopUp(
"Warning",
string(exception.what()));
110 emptyEditorTabController->popUps->getFileDialogScreenController()->close();
112 OnEmptySave(
EmptyEditorTabController* emptyEditorTabController): emptyEditorTabController(emptyEditorTabController) {
119 vector<string> extensions = {
123 fileName.empty() ==
false?Tools::getPathName(fileName):
string(),
126 Tools::getFileName(fileName),
128 new OnEmptySave(
this)
133 showInfoPopUp(
"Warning",
"This command is not supported yet");
162 int tooltipLeft, tooltipTop;
181 xml+=
"<selectbox-parent-option image=\"resources/engine/images/folder.png\" text=\"" + GUIParser::escape(
"Prototype") +
"\" value=\"" + GUIParser::escape(
"prototype") +
"\">\n";
183 if (prototype !=
nullptr) {
187 xml+=
"</selectbox-parent-option>\n";
192 string(
"<dropdown-option text=\"Property\" value=\"property\" />\n")
const string & getFileName()
const string & getToolTip()
GUI screen node that represents a screen that can be rendered via GUI system.
GUINode * getNodeById(const string &nodeId)
Get GUI node by id.
Mutable utf8 aware string class.
std::exception Exception
Exception base class.