Maintaining ActiveIdTimer and HoveredIdTimer (the later is useful for drag and drop, both will be of course for creators of custom widgets)

This commit is contained in:
omar
2017-10-29 23:46:32 +01:00
parent fd88bc270a
commit b13d281356
2 changed files with 13 additions and 2 deletions

View File

@ -429,8 +429,10 @@ struct ImGuiContext
ImGuiID HoveredId; // Hovered widget
bool HoveredIdAllowOverlap;
ImGuiID HoveredIdPreviousFrame;
float HoveredIdTimer;
ImGuiID ActiveId; // Active widget
ImGuiID ActiveIdPreviousFrame;
float ActiveIdTimer;
bool ActiveIdIsAlive; // Active widget has been seen this frame
bool ActiveIdIsJustActivated; // Set at the time of activation for one frame
bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
@ -521,8 +523,10 @@ struct ImGuiContext
HoveredId = 0;
HoveredIdAllowOverlap = false;
HoveredIdPreviousFrame = 0;
HoveredIdTimer = 0.0f;
ActiveId = 0;
ActiveIdPreviousFrame = 0;
ActiveIdTimer = 0.0f;
ActiveIdIsAlive = false;
ActiveIdIsJustActivated = false;
ActiveIdAllowOverlap = false;