Open qiaozhi-4 opened 1 year ago
The triangle is just a real geometric triangle being rendered, it is not from the font. There is a way if you don't mind making custom versions of functions, but it isn't elegant. You could make a custom copy of TreeNode
, from there call a custom copy of TreeNodeBehavior
. In that custom version, look for calls to RenderArrow
and replace them. I don't recommend doing this as it would make updating to newer versions of the library more difficult, but if you really must replace the arrow you can.
The triangle is just a real geometric triangle being rendered, it is not from the font. There is a way if you don't mind making custom versions of functions, but it isn't elegant. You could make a custom copy of
TreeNode
, from there call a custom copy ofTreeNodeBehavior
. In that custom version, look for calls toRenderArrow
and replace them. I don't recommend doing this as it would make updating to newer versions of the library more difficult, but if you really must replace the arrow you can.
Thank you for your suggestion, is there a function with similar function (click to expand the subitem), and then it only shows text without the icon
Linking to #6517 #6090 #2431 #2235
Version:1.89.8 Branch: imgui-master
Back-ends: imgui_impl_dx11.cpp + imgui_implwin32.cpp (or specify if using a custom engine/back-end)_ Compiler: Visual Studio 2019 Operating System: windows10
My English is not good, this is the translation of sorry. I've looked through the questions, but I can't find them. BeginnerDear ImGui ,I want to replace the triangle in front of the "ImGui::TreeNode" ,I have tried using "ImFontConfig.GlyphOffset = ImVec2(-18,3); // 设置字体偏移 "to block,But if the icon is translucent, it will not look good
Standalone, minimal, complete and verifiable example: (see https://github.com/ocornut/imgui/issues/2261)