mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 14:35:51 +01:00
Fix 0.5 pixel offset, only needed for d3d <= 9.
Defaults to 0.0f, which is correct for d3d10+ and ogl
This commit is contained in:
commit
5e9ecdb2d0
@ -3356,8 +3356,8 @@ bool RadioButton(const char* label, bool active)
|
||||
return false;
|
||||
|
||||
ImVec2 center = check_bb.GetCenter();
|
||||
center.x = (float)(int)center.x + 0.5f;
|
||||
center.y = (float)(int)center.y + 0.5f;
|
||||
center.x = (float)(int)center.x + style.PixelCenterOffset;
|
||||
center.y = (float)(int)center.y + style.PixelCenterOffset;
|
||||
const float radius = check_bb.GetHeight() * 0.5f;
|
||||
|
||||
const bool hovered = (g.HoveredWindow == window) && (g.HoveredId == 0) && IsMouseHoveringBox(check_bb);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user