software renderer, part F

This commit is contained in:
tildearrow 2024-04-08 22:24:08 -05:00
parent 823876a5c6
commit c5a811f58e
5 changed files with 45 additions and 11 deletions

View file

@ -216,15 +216,23 @@ void FurnaceGUI::drawOsc() {
ImU32 guideColor=ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_GUIDE]);
ImGui::ItemSize(size,style.FramePadding.y);
if (ImGui::ItemAdd(rect,ImGui::GetID("wsDisplay"))) {
dl->AddRectFilledMultiColor(
inRect.Min,
inRect.Max,
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG1]),
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG2]),
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG4]),
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG3]),
settings.oscRoundedCorners?(8.0f*dpiScale):0.0f
);
if (safeMode || renderBackend==GUI_BACKEND_SOFTWARE) {
dl->AddRectFilled(
inRect.Min,
inRect.Max,
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG4])
);
} else {
dl->AddRectFilledMultiColor(
inRect.Min,
inRect.Max,
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG1]),
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG2]),
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG4]),
ImGui::GetColorU32(uiColors[GUI_COLOR_OSC_BG3]),
settings.oscRoundedCorners?(8.0f*dpiScale):0.0f
);
}
dl->AddLine(
ImLerp(rect.Min,rect.Max,ImVec2(0.0f,0.5f)),
@ -367,7 +375,7 @@ void FurnaceGUI::drawOsc() {
dl->Flags=prevFlags;
if (settings.oscBorder) {
dl->AddRect(inRect.Min,inRect.Max,borderColor,settings.oscRoundedCorners?(8.0f*dpiScale):0.0f,0,1.5f*dpiScale);
dl->AddRect(inRect.Min,inRect.Max,borderColor,(settings.oscRoundedCorners && !(safeMode || renderBackend==GUI_BACKEND_SOFTWARE))?(8.0f*dpiScale):0.0f,0,1.5f*dpiScale);
}
}
if (oscZoomSlider && ImGui::IsItemHovered()) {