mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 03:47:00 +00:00
BeginItemTooltip: Rename flag in comment (#6853)
This commit is contained in:
parent
daf49e9d82
commit
f4790f6f66
6
imgui.h
6
imgui.h
@ -677,9 +677,9 @@ namespace ImGui
|
||||
IMGUI_API void SetTooltipV(const char* fmt, va_list args) IM_FMTLIST(1);
|
||||
|
||||
// Tooltips: helpers for showing a tooltip when hovering an item
|
||||
// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip) && BeginTooltip())' idiom.
|
||||
// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_Tooltip)) { SetTooltip(...); }' idiom.
|
||||
// - Where 'ImGuiHoveredFlags_Tooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
|
||||
// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) && BeginTooltip())' idiom.
|
||||
// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom.
|
||||
// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
|
||||
IMGUI_API bool BeginItemTooltip(); // begin/append a tooltip window if preceding item was hovered.
|
||||
IMGUI_API void SetItemTooltip(const char* fmt, ...) IM_FMTARGS(1); // set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
|
||||
IMGUI_API void SetItemTooltipV(const char* fmt, va_list args) IM_FMTLIST(1);
|
||||
|
@ -834,9 +834,9 @@ static void ShowDemoWindowWidgets()
|
||||
"flags for a specific tooltip instance.");
|
||||
|
||||
// The following examples are passed for documentation purpose but may not be useful to most users.
|
||||
// Passing ImGuiHoveredFlags_Tooltip to IsItemHovered() will pull ImGuiHoveredFlags flags values from
|
||||
// Passing ImGuiHoveredFlags_ForTooltip to IsItemHovered() will pull ImGuiHoveredFlags flags values from
|
||||
// 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on whether mouse or gamepad/keyboard is being used.
|
||||
// With default settings, ImGuiHoveredFlags_Tooltip is equivalent to ImGuiHoveredFlags_DelayShort + ImGuiHoveredFlags_Stationary.
|
||||
// With default settings, ImGuiHoveredFlags_ForTooltip is equivalent to ImGuiHoveredFlags_DelayShort + ImGuiHoveredFlags_Stationary.
|
||||
ImGui::Button("Manual", sz);
|
||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_ForTooltip))
|
||||
ImGui::SetTooltip("I am a manually emitted tooltip.");
|
||||
|
Loading…
Reference in New Issue
Block a user