|
@@ -1285,14 +1285,22 @@ enum ImGuiHoveredFlags_
|
|
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
|
ImGuiHoveredFlags_RectOnly = ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped,
|
|
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows,
|
|
ImGuiHoveredFlags_RootAndChildWindows = ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows,
|
|
|
|
|
|
- // Mouse Hovering delays (e.g. for tooltips)
|
|
|
|
- // - for frequently actioned or hovered items providing a tooltip, you want may to use ImGuiHoveredFlags_ForTooltip (stationary + normal delay) so the tooltip doesn't show too often.
|
|
|
|
- // - for items which main purpose is to be hovered for a tooltip, or items with low affordance, prefer no delay or shorter delay.
|
|
|
|
- ImGuiHoveredFlags_Stationary = 1 << 11, // IsItemHovered() only: Require mouse to be stationary for style.HoverStationaryDelay (~0.15 sec) _at least one time_. After this, can move on same item.
|
|
|
|
- ImGuiHoveredFlags_DelayShort = 1 << 13, // IsItemHovered() only: Return true after style.HoverDelayShort elapsed (~0.15 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
|
|
|
|
- ImGuiHoveredFlags_DelayNormal = 1 << 14, // IsItemHovered() only: Return true after style.HoverDelayNormal elapsed (~0.40 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
|
|
|
|
- ImGuiHoveredFlags_NoSharedDelay = 1 << 15, // IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the previous timer for a short time (standard for tooltips with long delays)
|
|
|
|
- ImGuiHoveredFlags_ForTooltip = ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayNormal,
|
|
|
|
|
|
+ // Tooltips mode
|
|
|
|
+ // - typically used in IsItemHovered() + SetTooltip() sequence.
|
|
|
|
+ // - this is a shortcut to pull flags from 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' where you can reconfigure desired behavior.
|
|
|
|
+ // e.g. 'TooltipHoveredFlagsForMouse' defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
|
|
|
|
+ // - for frequently actioned or hovered items providing a tooltip, you want may to use ImGuiHoveredFlags_ForTooltip (stationary + delay) so the tooltip doesn't show too often.
|
|
|
|
+ // - for items which main purpose is to be hovered, or items with low affordance, or less consistent app, prefer no delay or shorter delay.
|
|
|
|
+ ImGuiHoveredFlags_ForTooltip = 1 << 11, // Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence.
|
|
|
|
+
|
|
|
|
+ // (Advanced) Mouse Hovering delays.
|
|
|
|
+ // - generally you can use ImGuiHoveredFlags_ForTooltip to use application-standardized flags.
|
|
|
|
+ // - use those if you need specific overrides.
|
|
|
|
+ ImGuiHoveredFlags_Stationary = 1 << 12, // IsItemHovered() only: Require mouse to be stationary for style.HoverStationaryDelay (~0.15 sec) _at least one time_. After this, can move on same item.
|
|
|
|
+ ImGuiHoveredFlags_DelayNone = 1 << 13, // IsItemHovered() only: Return true immediately (default). As this is the default you generally ignore this.
|
|
|
|
+ ImGuiHoveredFlags_DelayShort = 1 << 14, // IsItemHovered() only: Return true after style.HoverDelayShort elapsed (~0.15 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
|
|
|
|
+ ImGuiHoveredFlags_DelayNormal = 1 << 15, // IsItemHovered() only: Return true after style.HoverDelayNormal elapsed (~0.40 sec) (shared between items) + requires mouse to be stationary for style.HoverStationaryDelay (once per item).
|
|
|
|
+ ImGuiHoveredFlags_NoSharedDelay = 1 << 16, // IsItemHovered() only: Disable shared delay system where moving from one item to the next keeps the previous timer for a short time (standard for tooltips with long delays)
|
|
};
|
|
};
|
|
|
|
|
|
// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()
|
|
// Flags for ImGui::BeginDragDropSource(), ImGui::AcceptDragDropPayload()
|
|
@@ -1898,6 +1906,8 @@ struct ImGuiStyle
|
|
float HoverStationaryDelay; // Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
|
|
float HoverStationaryDelay; // Delay for IsItemHovered(ImGuiHoveredFlags_Stationary). Time required to consider mouse stationary.
|
|
float HoverDelayShort; // Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
|
|
float HoverDelayShort; // Delay for IsItemHovered(ImGuiHoveredFlags_DelayShort). Usually used along with HoverStationaryDelay.
|
|
float HoverDelayNormal; // Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
|
|
float HoverDelayNormal; // Delay for IsItemHovered(ImGuiHoveredFlags_DelayNormal). "
|
|
|
|
+ ImGuiHoveredFlags HoverFlagsForTooltipMouse;// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using mouse.
|
|
|
|
+ ImGuiHoveredFlags HoverFlagsForTooltipNav; // Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
|
|
|
|
|
|
IMGUI_API ImGuiStyle();
|
|
IMGUI_API ImGuiStyle();
|
|
IMGUI_API void ScaleAllSizes(float scale_factor);
|
|
IMGUI_API void ScaleAllSizes(float scale_factor);
|