#9416

Good to have Button/Text/Selectable with each line centered

Opentpecholtopened 5mo ago

Version/Branch of Dear ImGui:

1.92.8 docking

Back-ends:

imgui_impl_opengl3.cpp + imgui_impl_glfw.cpp

Compiler, OS:

Windows11 + MSVC 2022

Full config/build information:

No response

Details:

ImGui already allows Button/Text/TextAligned/Selectable with multiple lines of text delimited by '\n'. But horizontal centering is not correct. It needs to calculate width of each line and center it separately. This doesn't seem like a big change since it is already breaking the lines. It would allow rendering buttons with both label and icons on separate lines and that is useful to have:

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

Activity

0

No activity yet.