mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
ImGui::BeginTooltip() should allow specifying override #7570
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#7570
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
1.90.6
Back-ends:
All
Compiler, OS:
All
Full config/build information:
No response
Details:
ImGui::BeginTooltipEx()(which is only available through imgui_internal.h) allows specifying if one wants to override a current tooltip or, which is the default, extend it.The regular
ImGui::BeginTooltip()always extends existing tooltips, while the (also publicly exposed)ImGui::SetTooltip()always sets the override flag (which BTW is contradicting to the documentation/comments, which says "SetTooltip() is a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom.").I think it would be useful if one could specify if an existing tooltip should be overridden or if it should be extended.
This could be done without breaking API-backwards-compat with
bool BeginTooltip( bool overridePrevious = false )or by moving
ImGuiTooltipFlagsto the public imgui.h and usingbool BeginTooltip( ImGuiTooltipFlags = ImGuiTooltipFlags_None )For
SetToolTip()this might also be useful, but there it can't be done without breaking the API, because of the varargs.By the way, the text above says
but as far as I can tell there is no way to choose a different type (Feature Request would probably be more appropriate), only this issue form.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
No response