@@ -394,22 +394,22 @@ bool UINode::renderDebug (int x, int y, int textY, bool& focusHandled) const
394
394
void UINode::renderRect (int x, int y, int w, int h, const Color& color) const
395
395
{
396
396
const float alpha = fequals (_alpha, 1 .0f ) ? color[3 ] : _alpha;
397
- const Color alphaColor = { color[0 ], color[1 ], color[2 ], alpha };
398
- _frontend-> renderRect ( x, y, w, h, alphaColor);
397
+ const ImVec4 alphaColor = { color[0 ], color[1 ], color[2 ], alpha };
398
+ ImGui::GetWindowDrawList ()-> AddRect ( ImVec2 ( x, y), ImVec2 (x + w, y + h), ImColor ( alphaColor) );
399
399
}
400
400
401
401
void UINode::renderFilledRect (int x, int y, int w, int h, const Color& color) const
402
402
{
403
403
const float alpha = fequals (_alpha, 1 .0f ) ? color[3 ] : _alpha;
404
- const Color alphaColor = { color[0 ], color[1 ], color[2 ], alpha };
405
- _frontend-> renderFilledRect ( x, y, w, h, alphaColor);
404
+ const ImVec4 alphaColor = { color[0 ], color[1 ], color[2 ], alpha };
405
+ ImGui::GetWindowDrawList ()-> AddRectFilled ( ImVec2 ( x, y), ImVec2 (x + w, y + h), ImColor ( alphaColor) );
406
406
}
407
407
408
408
void UINode::renderLine (int x1, int y1, int x2, int y2, const Color& color) const
409
409
{
410
410
const float alpha = fequals (_alpha, 1 .0f ) ? color[3 ] : _alpha;
411
- const Color alphaColor = { color[0 ], color[1 ], color[2 ], alpha };
412
- _frontend-> renderLine ( x1, y1, x2, y2, alphaColor);
411
+ const ImVec4 alphaColor = { color[0 ], color[1 ], color[2 ], alpha };
412
+ ImGui::GetWindowDrawList ()-> AddLine ( ImVec2 ( x1, y1), ImVec2 ( x2, y2), ImColor ( alphaColor) );
413
413
}
414
414
415
415
void UINode::renderImage (const TexturePtr& texture, int x, int y, int w, int h, float alpha) const
0 commit comments