Previoulsy if you select text while using the vertex buffer
output inside a single line edit widget you would get a drawing bug
and the selected text would get transparent. This was caused by
overdraw by the selected text while the unselected text is still
visible.
To fix this behavior the text background is cleared before drawing.
This will cost another rectangle for each text which is quite
wasteful. Probably have to think about way to only draw the
rectangle if really necessary.
If a currently active `zr_edit_string` or `zr_edit_buffer` string
buffers is modified outside both of these function then the
controlling cursor could get out of bounds.
To make sure this does not happen anymore I added some check to
make sure cursors are always valid.
Need to revert a previously added change to read only
edit boxes which deactivated the input but thereby
also deactivated the scrollbar behavior which is not
wanted.
Previously if you want to edit the content if a zr_property the
cursor would appear at the beginning of the line which makes
editing the content cumbersome since you then have to move the
cursor to the end of the line to start editing. In addition
it was required to commit the edited value inside the zr_property
by clicking outside the zr_property.
With this commit if you click inside the property to start editing
the cursor will be placed at the end of the text input. In addition
it is now possible to commit written changes by pressing enter.
zr_edit_string and zr_edit_buffer with varying flags did not have the
correct implementation for the read only mode flag and allowed
writing in some instances and showed a cursor while active
for other. Some additional check have been added to make sure that
read only edit buffer cannot be modified anymore.
If you already have stb_rect_pack.h and stb_truetype.h inside your
project zahnrad will cause symbol collisions since it will import
the implementation a second time.
To prevent this from happening I added two defines which can be set
to 1 to disable the implementation generation of both stb_truetype.h
as well as stb_rect_pack.h in zahnrad.