golang-ui / nuklear

This project provides Go bindings for nuklear.h — a small ANSI C GUI library.
https://github.com/vurtun/nuklear
MIT License
1.57k stars 98 forks source link

Help with text entry #42

Closed wilyarti closed 6 years ago

wilyarti commented 6 years ago

I have been unable to determine how to get text entry input widget working. I have been looking at the functions in nk.go and their return types but haven't got very far (widget doesn't display).

te := nk.NewTextEdit()
nk.NkTexteditText(te, "foo", 100)

I understand the documentation is limited. I don't understand C code so reading through the nuklear.h file was difficult.

I just need a text entry field to send some arguments to a go program. I have got the buttons working.

Also is there a way to display scrolling text like the output of a terminal window?

Any pointers would be most appreciated! I was very excited to use this library after trying for a few days to get it running on FreeBSD.

wilyarti commented 6 years ago

I figured it out after looking through the header files.