This commit is contained in:
tildearrow 2024-03-30 13:21:56 -05:00
parent e7a638fdd5
commit 59a25fad70
3 changed files with 22 additions and 4 deletions

View file

@ -7841,7 +7841,8 @@ FurnaceGUI::FurnaceGUI():
curTutorialStep(0),
audioExportType(0),
dmfExportVersion(0),
curExportType(GUI_EXPORT_NONE) {
curExportType(GUI_EXPORT_NONE),
selectedUserPreset(-1) {
// value keys
valueKeys[SDLK_0]=0;
valueKeys[SDLK_1]=1;

View file

@ -2476,6 +2476,9 @@ class FurnaceGUI {
int dmfExportVersion;
FurnaceGUIExportTypes curExportType;
// user presets window
int selectedUserPreset;
void drawExportAudio(bool onWindow=false);
void drawExportVGM(bool onWindow=false);
void drawExportZSM(bool onWindow=false);

View file

@ -3404,12 +3404,26 @@ void FurnaceGUI::drawUserPresets() {
}
if (!userPresetsOpen) return;
if (ImGui::Begin("User Presets",&userPresetsOpen,globalWinFlags)) {
if (ImGui::BeginTable("UserPresets",2,ImGuiTableFlags_BordersInnerV)) {
FurnaceGUISysCategory* userCategory=NULL;
for (FurnaceGUISysCategory& i: sysCategories) {
if (strcmp(i.name,"User")==0) {
userCategory=&i;
break;
}
}
if (userCategory==NULL) {
ImGui::Text("Error! User category does not exist!");
} else if (ImGui::BeginTable("UserPresets",2,ImGuiTableFlags_BordersInnerV)) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Presets...");
ImGui::TableNextColumn();
ImGui::Text("Edit...");
if (selectedUserPreset<0 || selectedUserPreset>=(int)userCategory->systems.size()) {
ImGui::Text("select a preset");
} else {
ImGui::Text("Edit...");
}
ImGui::EndTable();
}
@ -3423,4 +3437,4 @@ void FurnaceGUI::drawUserPresets() {
}
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) curWindow=GUI_WINDOW_USER_PRESETS;
ImGui::End();
}
}