prepare for Furnace Pro

This commit is contained in:
tildearrow 2023-04-01 05:06:13 -05:00
parent fe7ba3c56b
commit 6fe8bea50e
17 changed files with 693 additions and 167 deletions

View file

@ -3,6 +3,7 @@
#include "IconsFontAwesome4.h"
#include "misc/cpp/imgui_stdlib.h"
#include "intConst.h"
#include "../ta-log.h"
void FurnaceGUI::drawSubSongs(bool asChild) {
if (nextWindow==GUI_WINDOW_SUBSONGS) {
@ -71,21 +72,25 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_PLUS "##SubSongAdd")) {
if (!e->addSubSong()) {
showError("too many subsongs!");
if (dejarteArriba) {
showError("UNREGISTERED! register to add subsongs.");
} else {
e->changeSongP(e->song.subsong.size()-1);
updateScroll(0);
oldOrder=0;
oldOrder1=0;
oldRow=0;
cursor.xCoarse=0;
cursor.xFine=0;
cursor.y=0;
selStart=cursor;
selEnd=cursor;
curOrder=0;
MARK_MODIFIED;
if (!e->addSubSong()) {
showError("too many subsongs!");
} else {
e->changeSongP(e->song.subsong.size()-1);
updateScroll(0);
oldOrder=0;
oldOrder1=0;
oldRow=0;
cursor.xCoarse=0;
cursor.xFine=0;
cursor.y=0;
selStart=cursor;
selEnd=cursor;
curOrder=0;
MARK_MODIFIED;
}
}
}
if (ImGui::IsItemHovered()) {
@ -93,10 +98,14 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
}
ImGui::SameLine();
if (ImGui::Button(ICON_FA_MINUS "##SubSongDel")) {
if (e->song.subsong.size()<=1) {
showError("this is the only subsong!");
if (dejarteArriba) {
showError("UNREGISTERED! register to add subsongs.");
} else {
showWarning("are you sure you want to remove this subsong?",GUI_WARN_SUBSONG_DEL);
if (e->song.subsong.size()<=1) {
showError("this is the only subsong!");
} else {
showWarning("are you sure you want to remove this subsong?",GUI_WARN_SUBSONG_DEL);
}
}
}
if (ImGui::IsItemHovered()) {