mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
Upside-down tree node triangle #6517
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#6517
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?
We would like to request an additional flag in
ImGuiTreeNodeFlags_, that would change the expanded tree node triangle to be drawn upside-down. As silly as it may sound, this is for an actual feature that we were requested to do.@squadack please add additional info, if needed.
Linking to related #6090 #2431 #2235
I see an occasional desire to do stuff like that. It feels a bit like opening a can of worm to me but I could investigate finding the right trouble-less design. If we had overly specific style settings then there's pressure to maintain that and it may be discarded with later improvements. If we add callbacks for some shapes it maybe means sizes needs to be known and this may impact widgets code.
A related thought I often had was that some of our vector-defined shapes could use font glyphs (assuming we have dynamic sized fonts, so a bit later), so being able to "remap" shapes into font glyphs could be useful too. Anecdotally, our vector-based Bullet point shape is pretty expensive for what it shows so it would benefit from using font data.
I assume the right generic direction is we add some kind of basic shape enum (ArrowUp, Checkmark, Bullet) which would redirect to code, with intent of adding some form of remapping support, and maybe easier for up to temporary switch ArrowUp and ArrowDown). But what means standardizing parametrization of those shapes: RenderArrow() and RenderArrowPointingAt() have pretty hardcoded parameters and logic and don't render same shape (that's mostly technical debt).
TL;DR; I see this as an opportunity to come up with a wider design and this should be style data rather than per-instance flags data. But I'm not against adding a temporary hack for you in imgui_private.h in the form of e.g. a
ImGuiTreeNodeFlags_FlipVerticalArrowwith the gentleman agreement we remove it if we have a better solution.Seems reasonable. Thanks!
Pushed
d96bbf0Thanks for the fix! Unfortunatelly, your fix works only on framed tree nodes. I have submitted a pull request https://github.com/ocornut/imgui/pull/6538 that adds the same fix for frameless nodes.
Forgot to reply but pushed the fix
959a9c79shortly after your message.(Please let me know if you end up not using this anymore :)