Since it was not as apparent as I thought it is I added some
documentation warning to set the same flags each time you
include "nuklear.h" except `NK_IMPLEMENTATION` which is only
allowed to be defined once in *one* source file.
Functions `nk_combo`, `nk_combo_seperator`, `nk_combo_string`,
`nk_combo_callback`, `nk_combobox`, `nk_combobox_seperator`, `nk_combobox_string`,
`nk_combobox_callback` all calculated the the height of the combo box
panel wrong and forces a scrollbar even if it was not required. The
calculation is now fixed and should produce the right result.
This is basically a hack to fill the gaps. I have absoultly no idea why
I get some of these gaps but hopefully it is fixed and does not come
back to hunt me in the future.
I removed the default vertex type and instead create an API to allow the
user to specify the vertex struct layout. Of course you are still
bound on what the library actual has on vertex data but the type and
sequence of the data is now configurable. This commit is quite
experiental and could introduce some bugs, but so far it look fine.
This commit fixed some bugs from the last commit as well as some general
changes and fixes of some old bugs. For overview of all changes please
look inside `CHANGELOG.md`.
This is a rather experiemental commit to remove some internal complexity
that build up over time handling panel padding and border. There still
could be some bugs but I tried my best to keep everything working.
Previously it was only possible to scroll windows and groups by mouse.
No it is possible to scroll popups, as well as nonblocking popups like
menus, contextuals and comboboxes. In addition I fixed a drawing bug
in dynamically growing panels.
To account for hash collisions which can be quite nasty I added
the string representation of the window name for additional
assurance. I also added an assert to check and alert if two windows
have the same name.
`nk_canvas_begin` now takes a background color directly instead of
requiring the user of the API to clear the window background with
another draw call.
It is now possible to temporarily push some style values like color,
style items, font, ... into a stack modify the value and as soon as
you are done just pop the changes. Main benefit is less boilerplate
code to manually save and restore configuration properties.
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`.