mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Small optimizations to BeginDisabled() to allow frequent calls (#211)
Not intended for frequent calls but I suspect some people will do it either way... Rough/indicative: measured 0.1 ms for 5000 calls in release, 0.5 ms in debug on my desktop windows.
This commit is contained in:
@ -1613,6 +1613,7 @@ struct ImGuiContext
|
||||
bool DragCurrentAccumDirty;
|
||||
float DragCurrentAccum; // Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
|
||||
float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
|
||||
float DisabledAlphaBackup; // Backup for style.Alpha for BeginDisabled()
|
||||
float ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
|
||||
int TooltipOverrideCount;
|
||||
float TooltipSlowDelay; // Time before slow tooltips appears (FIXME: This is temporary until we merge in tooltip timer+priority work)
|
||||
@ -1780,6 +1781,7 @@ struct ImGuiContext
|
||||
DragCurrentAccumDirty = false;
|
||||
DragCurrentAccum = 0.0f;
|
||||
DragSpeedDefaultRatio = 1.0f / 100.0f;
|
||||
DisabledAlphaBackup = 0.0f;
|
||||
ScrollbarClickDeltaToGrabCenter = 0.0f;
|
||||
TooltipOverrideCount = 0;
|
||||
TooltipSlowDelay = 0.50f;
|
||||
|
Reference in New Issue
Block a user