Specify button label start and end#5307
Conversation
|
We have a feature in the works that would add same thing to most APIs. #3038 |
|
Hello @Trider12, As answered, even though this is a valid need, this will be best answered by the https://github.com/ocornut/imgui/tree/features/string_view branch without adding extra API entry point. Therefore we cannot take a PR for this. PS: For a similar result. Clearly not ideal it would still require a copy, but no heap allocation involved. |
|
Oh, I see. Looking forward to that feature being merged then. Hi @ocornut, thanks for the tip, but I'll stick to the non-copying solution for now. |
This is a tiny PR that allows users to specify the start and the end of a label for
ButtonandSmallButton. It eases integrating buttons into text without making a copy of the labels.I can also add the same functionality to
CheckboxandRadioButtonin this PR if needed.