From bab56fa1380ab0ba8becd90ebaa86e7ce49e688e Mon Sep 17 00:00:00 2001 From: Eknous-P Date: Fri, 22 Mar 2024 16:28:29 +0400 Subject: [PATCH] change to imdrawlist --- src/gui/sysMiscInfo.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gui/sysMiscInfo.cpp b/src/gui/sysMiscInfo.cpp index c6ea7d8b7..99830b4cc 100644 --- a/src/gui/sysMiscInfo.cpp +++ b/src/gui/sysMiscInfo.cpp @@ -289,12 +289,15 @@ const char* FurnaceGUI::getSystemPartNumber(DivSystem sys, DivConfig& flags) { } void FurnaceGUI::drawSystemChannelInfo(const DivSysDef* whichDef) { + ImDrawList* dl=ImGui::GetWindowDrawList(); + const ImVec2 p=ImGui::GetCursorScreenPos(); + float scaler=5.0f*dpiScale; + float x=p.x+dpiScale; for (int i=0; ichannels; i++) { - ImGui::PushStyleColor(ImGuiCol_Button,ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM])); - ImGui::SmallButton("##ChanTypeColorThing"); - if (ichannels-1) ImGui::SameLine(); - ImGui::PopStyleColor(); + dl->AddRectFilled(ImVec2(x,p.y),ImVec2(x+2.0f*scaler,p.y+4.0f*scaler),ImGui::GetColorU32(uiColors[whichDef->chanTypes[i]+GUI_COLOR_CHANNEL_FM]),scaler); + x+=3.0f*scaler; } + ImGui::Dummy(ImVec2(0,4*scaler)); } void FurnaceGUI::drawSystemChannelInfoText(const DivSysDef* whichDef) {