mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
Feature Request: custom symbols by using render function pointers #8243
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#8243
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:
Version 1.89, Branch: docking
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Linux + GCC
Full config/build information:
No response
Details:
The Problem of Drawing Custom Symbols
So i wanted to use ImGui::Checkbox, ImGui::Bullet, ImGui::TreeNode
But as i am making a game, i wanted to change the looks of the Check, the Bulletpoint-Circle and the Tree-Triangle, which get rendered with RenderCheckMark, RenderBullet and RenderArrow. The problem is that these render functions are hardcoded, so i would have to either change the imgui library locally to use my own style or i would have to reimplement these functions, which isnt too bad for ImGui::Bullet, but the implementation of ImGui::TreeNode looks like a nightmare to reimplement and maintain.
Question / Feature Request:
Is there a better/easier option already to change those symbols? If not, I would like there to be one.
Expanding on the Feature request:
As i see that this is a big library and time is rare, i wanted to give my idea of how to implement it with no real performance loss and backwards compatibility (maybe security risks tho?). If the idea is stupid, you may tell me.
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
Trying to explain this using ImGui::Bullet
imgui.h:
ocornut/imgui@32f11402f9/imgui.h (L559)imgui_widgets.cpp:
ocornut/imgui@32f11402f9/imgui_widgets.cpp (L1382)Because now I could just create my own function calling into ImGui::Bullet and would have no trouble with any of the logic.