d-gamedev-team/dimgui — pull request #6 by kiith-sa (2014-09-20 14:16:27+00:00)
Title: Text input support (and some fixes).

I started writing this a while ago but abandoned it for a few months. An unfortunate result is that
the commits are rather big/coarse and there are some interspersed fixes I made along the way.

The code is based on an abandoned imgui pull request: https://github.com/AdrienHerubel/imgui/pull/2/files
though there were various changes.

Changes:

* A text input widget. Takes a label, a buffer to store input, a reference to a slice of entered buffer in that buffer. There's also an optional parameter to force the widget to be immediately 'inputable' (somewhat out of place, but I found I needed it most of the time)
* Docs for the new stuff
* Optional 'unicode input' parameter for `imguiBeginFrame()` (needed for text input - user can get it from GLFW/SDL/others)
* Fixed demo sample build on Linux.
* Example usage of text input in the demo sample.
* Made renderer globals private (mainly to ensure I wasn't causing any unneeded dependencies).