There is function `NK_INTERN int nk_to_upper(int c)` in `UTIL` section. Implementation is almost the same to `NK_INTERN int nk_to_lower(int c)`. But only `nk_to_lower` used in Nuklear's code. To remove this warning we can:
1) Comment i.e. remove `nk_to_upper` from code. But it can break someone's code, if he used it in module with `NK_IMPLEMENTATION` defined.
2) Hide it under define. Same.
3) Just use it somewhere in code.
I replaced two calls of `nk_to_lower` to `nk_to_upper`. It removes the warning, code works the same. The bad side - complication of the code. "Why `nk_to_upper` is used here, but not `nk_to_lower` as one line up?"
Maybe there exists better solution? Or just add the comment about this line to code?
When NDEBUG defined:
nuklear.h: In function 'nk_popup_begin':
nuklear.h:20753:22: warning: variable 'panel' set but not used [-Wunused-but-set-variable]
nuklear.h: In function 'nk_nonblock_begin':
nuklear.h:20850:22: warning: variable 'panel' set but not used [-Wunused-but-set-variable]
Added another version of `nk_tree` that does not store internal state
to hold the tree state (minimized/maximized). Main advantages is
possibily less memory consumptions and more user control.
In addition a new set of button overloads were added to directly pass
in a button style struct which allows an easier way to have custom
button visuals for specific buttons.
Added additional `nk_group` version which uses an external scrollbar
offset instead of internally managing the memory. In addition
`nk_list_view` is introduced which allows drawing huge lists inside a
`nk_group`(#269).
I simplified a lot of API calls by pulling panel memory management
inside the library. All API calls which previously required a panel
as parameter are now handling their panel themself.
Previously every widget border was drawn by two overlapping rectangles
to limit the number of primitives required to be supported by any
potential backend. The biggest problem from using this approach
is drawing overhead and no real way to get widget transparency. So
I changed border drawing to use stroked rectangles instead of a
second filled rectangle drawing call.
using memcmp and decide whether to draw a new frame or not:
* added NK_ZERO_COMMAND_MEMORY macro
* when NK_ZERO_COMMAND_MEMORY is defined, inside
nk_command_buffer_push function there is an additional call
to NK_MEMSET after allocating memory for new drawing command
For more information please look inside the changelog. This is more of
an internal fix and hopefully does not break any existing code. I also
removed `nk_strfmt` from the API and made it internal only.
If you had any kind of popups like for example comboboxes inside a
deeper panel structure using nk_group, then `nk_xxx_close` would only
unblock input for the first level and not the whole panel stack. This is
now fixed and works correctly.