diff --git a/src/gui/gui.h b/src/gui/gui.h index ee1412cdf..4ab55f9a6 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -2614,7 +2614,7 @@ class FurnaceGUI { void waveListItem(int index, float* wavePreview, int dir, int asset); void sampleListItem(int index, int dir, int asset); - void drawSysDefs(std::vector& category, bool& accepted, std::vector& sysDefStack); + void drawSysDefs(std::vector& category, bool& accepted, std::vector& sysDefStack, bool& alreadyHover); void printPresets(std::vector& items, size_t depth, std::vector& depthStack); FurnaceGUISysDef* selectPreset(std::vector& items); diff --git a/src/gui/newSong.cpp b/src/gui/newSong.cpp index 66197b5a9..2d780f48b 100644 --- a/src/gui/newSong.cpp +++ b/src/gui/newSong.cpp @@ -24,7 +24,7 @@ String sysDefID; -void FurnaceGUI::drawSysDefs(std::vector& category, bool& accepted, std::vector& sysDefStack) { +void FurnaceGUI::drawSysDefs(std::vector& category, bool& accepted, std::vector& sysDefStack, bool& alreadyHover) { int index=0; String sysDefIDLeader="##NS"; for (int i: sysDefStack) { @@ -58,11 +58,12 @@ void FurnaceGUI::drawSysDefs(std::vector& category, bool& acce } if (treeNode) { sysDefStack.push_back(index); - drawSysDefs(i.subDefs,accepted,sysDefStack); + drawSysDefs(i.subDefs,accepted,sysDefStack,alreadyHover); sysDefStack.erase(sysDefStack.end()-1); ImGui::TreePop(); } - if (isHovered) { + if (isHovered && !alreadyHover) { + alreadyHover=true; if (ImGui::BeginTooltip()) { std::map chipCounts; std::vector chips; @@ -211,8 +212,9 @@ void FurnaceGUI::drawNewSong() { ImGui::Text("no results"); } } else { + bool alreadyHover=false; sysDefStack.push_back(newSongQuery.empty()?newSongCategory:-1); - drawSysDefs(category,accepted,sysDefStack); + drawSysDefs(category,accepted,sysDefStack,alreadyHover); sysDefStack.erase(sysDefStack.end()-1); } ImGui::EndTable(); diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 42e052d44..320646062 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -567,7 +567,6 @@ void FurnaceGUI::drawSettings() { // SUBSECTION VIBRATION CONFIG_SUBSECTION("Vibration"); - ImGui::Indent(); if (ImGui::SliderFloat("Strength",&settings.vibrationStrength,0.0f,1.0f)) { if (settings.vibrationStrength<0.0f) settings.vibrationStrength=0.0f; if (settings.vibrationStrength>1.0f) settings.vibrationStrength=1.0f; @@ -578,7 +577,7 @@ void FurnaceGUI::drawSettings() { if (settings.vibrationLength<10) settings.vibrationLength=10; if (settings.vibrationLength>500) settings.vibrationLength=500; settingsChanged=true; - ImGui::Unindent(); + } #endif // SUBSECTION FILE