Shuffle a few internal context fields to reduce padding.

This commit is contained in:
ocornut
2025-10-28 19:01:57 +01:00
parent a1632c6116
commit 8019d39545
3 changed files with 27 additions and 26 deletions

View File

@@ -619,7 +619,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
if (flags & (ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere))
{
SetActiveID(id, window);
g.ActiveIdMouseButton = mouse_button_clicked;
g.ActiveIdMouseButton = (ImS8)mouse_button_clicked;
if (!(flags & ImGuiButtonFlags_NoNavFocus))
{
SetFocusID(id, window);
@@ -637,7 +637,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
ClearActiveID();
else
SetActiveID(id, window); // Hold on ID
g.ActiveIdMouseButton = mouse_button_clicked;
g.ActiveIdMouseButton = (ImS8)mouse_button_clicked;
if (!(flags & ImGuiButtonFlags_NoNavFocus))
{
SetFocusID(id, window);