| 99 | } |
| 100 | |
| 101 | void SaveFileAs(){ |
| 102 | char* filePath = Lemon::GUI::FileDialog(".", FILE_DIALOG_CREATE); |
| 103 | |
| 104 | if(!filePath){ |
| 105 | Lemon::GUI::DisplayMessageBox("Message", "Invalid filepath!", Lemon::GUI::MsgButtonsOK); |
| 106 | return; |
| 107 | } |
| 108 | |
| 109 | SaveFile(filePath); |
| 110 | |
| 111 | openPath = filePath; |
| 112 | |
| 113 | char title[32 + strlen(filePath)]; |
| 114 | sprintf(title, "Text Editor: %s", filePath); |
| 115 | |
| 116 | window->SetTitle(title); |
| 117 | } |
| 118 | |
| 119 | void SaveOpenFile(){ |
| 120 | if(!openPath.length()){ |
no test coverage detected