SDL iOs implementation provides key press and release in
one frame and while nuklear previously was keeping track
of transistions it did not check it. It hopefully should now be
possible to correctly interpret up and down key in the same frame.
Edit widget width `NK_EDIT_SIG_ENTER` flag now keep their active
state after enter was pressed. Main reason is to be able to keep
typing after commiting.
Taking in an extern demo is almost always a bad idea since I will be
the one to keep to date and I am not always able to do so. Emscript
was the last time I tried. For now on if anyone has a neat demo
please keep it in your own repository and I will create a link to it.
`nk_window_is_closed` previously checked if the window is hidden
instead of checking if it is closed. This behavior is now fixed and I
added an additional function `nk_window_is_hidden` to check if a
window is currently hidden.
Nuklear now has three different property versions for int, float and
added by this commit a double version. Internally an additional change
happend. Now the type of the property is actually taken into account
and floating pointer errors due to casting are less of an issue.
Since floating point to and from string conversion is a total pain
and really complex it is really hard to provide a realtive simple
non-standard library solution. But to solve both problems I now added
a way to overwrite the library intern float to string conversion
implementation if you really need more precision.
Since nuklear internal string to number conversion is quite imprecise,
and a correct solution is way to complex (I dare you to look at the
implementation of strtod, dtoa, ...) I now provide a new define to
overwrite the library function with either your own or the standard
libray implementation.
Under certain circumstances it is possible that because of floating
point error `nk_widget` will mark a widget as read only if used in
combination with `nk_layout_row`. The fix is rather simple in this
case since the additional floating point precision is not really needed
it is possible to just cast to int and remove the problem all togther.
There is now a difference between hiding a window with
`nk_window_show` and closing a window by clicking the close button in
the window header or calling `nk_window_close`. Only in the case of
activly closing a window will be removed at the end of the frame
besides getting removed if not updated inside the frame.
To support both string formats with string combined with length as
well as zero terminated strings I added a zero terminated string
version to `nk_edit_xxxx` with `nk_edit_string_zero_terminated`.
Fixed scrollbar auto hiding behavior to also work correctly if
the window is not hovered or manipulated in any way.
In addition I fixed a small panel padding bug in `nk_layout_widget`
for all panels outside windows which require a test on
`layout->flags` instead of `window->flags`.
The dynamic immediate mode layout API with `nk_layout_row_begin`,
`nk_layout_row_push` and `nk_layout_row_end` caused an infinite
scrollbar bug by wrongfully calculating the required widget sizes.
This bug is now fixed and everything is correctly calculated.
Previously I packed standard library variable arguments as well as
file operation into one define `NK_INCLUDE_STANDARD_IO`. This caused
some problems and I split the define into two. So if you want the old
behavior you need to define `NK_INCLUDE_STANDARD_IO` as well as
`NK_INCLUDE_STANDARD_VARARGS`. If you only want file operations but
not variable arguments only define `NK_INCLUDE_STANDARD_IO` and
if you only want varargs but not file operations please only define
`NK_INCLUDE_STANDARD_VARARGS`.
If you move the cursor to fast while scaling a window there is a
chance the mouse will miss the scaler and the scaling operation will
halt. Dragging in itself is quite hard but I implemented the hack I
use for property, window moving and slider for the window scaler and
scaling hopefully now works correctly.
This is quite an old bug and a result of being nearly stateless.
If you move/scale a window and another window is behind it the other
window will be acitvated and the move/scale operation will be stopped.
To fix this I now require no mouse down for activating by hovering.
I hope this does not cause any problems and fixes the problem for good.
I had a long standing bug inside nuklear which prevents you from
swapping out a font while the code is being build. This bug is now
fixed but the fix requires _ALL_ `nk_user_font` data structures
provided by `nk_style_set_font` to be persistent.
A previous push request added some macros into the header file and
I missed that it was outside the header include guard. This should
now be fixed and not cause problem if included multiple times in
different location.
Demos for x11 and sdl have been update so that `nk_xxx_handle_event'
return true (1) if the given event was usefull and processed by
nuklear and false (1) if not.
Since it was requested I added a small snippet showing how to create
notebook tabs (header with buttons, selecting content). The added
demo is basically just a combination of already existing widgets +
some small styling changes and can be extended to easily support
case with more tabs then space in the header part. I will have
to think about if it is possible to create an API for this without
taking away the simplicity of it.