diff --git a/src/gui/gui.h b/src/gui/gui.h index 2a3dc9ee1..801e0bd16 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -2608,7 +2608,7 @@ class FurnaceGUI { void drawClock(); void drawTutorial(); void drawXYOsc(); - void drawSystemChannelInfo(DivSystem which); + void drawSystemChannelInfo(const DivSysDef* whichDef); void parseKeybinds(); void promptKey(int which); diff --git a/src/gui/sysManager.cpp b/src/gui/sysManager.cpp index 081870572..17d66f8f4 100644 --- a/src/gui/sysManager.cpp +++ b/src/gui/sysManager.cpp @@ -23,9 +23,9 @@ #include #include -void FurnaceGUI::drawSystemChannelInfo(DivSystem which) { - for (int i=0; igetSystemDef(which)->channels; i++) { - ImGui::PushStyleColor(ImGuiCol_Button,ImGui::GetColorU32(uiColors[e->getSystemDef(which)->chanTypes[i]+GUI_COLOR_CHANNEL_FM])); +void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) { + for (int i=0; ichannels; i++) { + ImGui::PushStyleColor(ImGuiCol_Button,ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM])); ImGui::SmallButton("##ChanTypeColorThing"); ImGui::SameLine(); ImGui::PopStyleColor(); @@ -104,7 +104,7 @@ void FurnaceGUI::drawSysManager() { ImGui::PushTextWrapPos(ImGui::GetCursorPos().x+420); // arbitrary constant ImGui::TextWrapped("%s",sysDef->description); ImGui::PopTextWrapPos(); - drawSystemChannelInfo(e->song.system[i]); + drawSystemChannelInfo(sysDef); ImGui::EndTooltip(); } }