GUI: prepare for user presets

This commit is contained in:
tildearrow 2024-03-20 18:20:12 -05:00
parent 056fd04c95
commit afed13001a
2 changed files with 16 additions and 3 deletions

View file

@ -169,6 +169,7 @@ void FurnaceGUI::drawNewSong() {
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("%s",i.description);
}
if (strcmp(i.name,"User")==0) ImGui::Separator();
index++;
}
}
@ -177,9 +178,19 @@ void FurnaceGUI::drawNewSong() {
ImGui::TableNextColumn();
if (ImGui::BeginTable("Systems",1,ImGuiTableFlags_BordersInnerV|ImGuiTableFlags_ScrollY)) {
std::vector<FurnaceGUISysDef>& category=(newSongQuery.empty())?(sysCategories[newSongCategory].systems):(newSongSearchResults);
if (category.empty()) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
if (newSongQuery.empty()) {
ImGui::Text("no systems here yet!");
} else {
ImGui::Text("no results");
}
} else {
sysDefStack.push_back(newSongQuery.empty()?newSongCategory:-1);
drawSysDefs(category,accepted,sysDefStack);
sysDefStack.erase(sysDefStack.end()-1);
}
ImGui::EndTable();
}

View file

@ -2428,6 +2428,8 @@ void FurnaceGUI::initSystemPresets() {
);
CATEGORY_END;
CATEGORY_BEGIN("User","system presets that you have saved.");
CATEGORY_END;
CATEGORY_BEGIN("FM","chips which use frequency modulation (FM) to generate sound.\nsome of these also pack more (like square and sample channels).");
ENTRY(