Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
Other
9.06k stars 542 forks source link

How do you set "default text" in a text field? #557

Closed Ryder17z closed 5 months ago

Ryder17z commented 1 year ago

I'm unable to find a way to populate a text input field.

RobLoach commented 5 months ago

https://github.com/Immediate-Mode-UI/Nuklear/wiki/Text-Edit

Ryder17z commented 5 months ago

At the time of opening the issue, it either would not display the text or it made the input field read-only if I remember correctly.

I didn't note down behaviour or save the code as this was just frustrating me, instead I found it look better visually to just have the field empty and put the text in an nk_label.

RobLoach commented 5 months ago

Thanks another option haha. Could possibly be that the buffer size wasn't being set correctly or something too.