GUI: add "new" action

This commit is contained in:
tildearrow 2023-04-02 16:39:06 -05:00
parent 9bc2657965
commit 54c1a8171f
5 changed files with 11 additions and 1 deletions

View file

@ -32,6 +32,13 @@ const unsigned char avRequest[15]={
void FurnaceGUI::doAction(int what) {
switch (what) {
case GUI_ACTION_NEW:
if (modified) {
showWarning("Unsaved changes! Save changes before creating a new song?",GUI_WARN_NEW);
} else {
displayNew=true;
}
break;
case GUI_ACTION_OPEN:
if (modified) {
showWarning("Unsaved changes! Save changes before opening another file?",GUI_WARN_OPEN);