ButtonBehavior: Fixed ImGuiButtonFlags_NoHoldingActiveID from incorrectly setting ActiveIdClickOffset, which probably have no known effect, but it is more correct this way. (#1418)
This commit is contained in:
parent
aae52522c3
commit
41862b8c0e
@ -5835,11 +5835,15 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
{
|
||||
pressed = true;
|
||||
if (flags & ImGuiButtonFlags_NoHoldingActiveID)
|
||||
{
|
||||
ClearActiveID();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetActiveID(id, window); // Hold on ID
|
||||
g.ActiveIdClickOffset = g.IO.MousePos - bb.Min;
|
||||
}
|
||||
FocusWindow(window);
|
||||
g.ActiveIdClickOffset = g.IO.MousePos - bb.Min;
|
||||
}
|
||||
if ((flags & ImGuiButtonFlags_PressedOnRelease) && g.IO.MouseReleased[0])
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user