This patch hacks the chart API to support display of multiple data sets in a
single chart instances. Tested briefly with the line chart.
Signed-off-by: Jan Viktorin <iviktorin@fit.vutbr.cz>
Previously I only used the `__FILE__` and a user `ID` to make
sure to get an unqiue identifier out of it. Like @ands pointed out
this is not enough. Since it is possible to have multipe instances
with the same `title` in the same `__FILE__`. So to fix that I had
the idea to string concat `__FILE__` and `__LINE__` into a string.
This allows to have the same sequence of `IDs` in different places
in one `__FILE__`.
Previously it was not possible to check if currently any window or
widget is active. To fix that I added function `nk_item_any_active`.
To get correct result you should only call it after all UI code
ran but before calling `nk_clear`. There is currently no other way to
achive the same result inside UI code.
It is now possible to control button click behavior to trigger either
on button pressed or button released. By default nuklear now used
on button pressed but `#define NK_BUTTON_TRIGGER_ON_RELEASE` lets
you change button behavior to trigger on release. I furthermore
enhanced slider dragging behavior to not force you to hover the
slider at all times.
All platform and renderbackend independent examples are now optional
demos for all platforms in `demo/`. Moving some demos from `example/`
provides an easier way to test GUI concepts for users and simplifies
maintenance.
All modifed state changed by the demo rendering functions is now set
to default values after being called. I tried to save and restore all
relavent state but for some reason function glBlendEquationSeperate
is not defined for me. So I decided to make it as easy as possible
for me and just set everything to default. This means you have to
either save and restore or reset your own OpenGL state after calling
`nk_xxx_render`. I know it is not perfect but I have no better
solution at this point in time.
Editfield width inside properties were previously calculate by text
length + padding and always the size of the edit cursor, even in case
were no one is editing the property. Now the cursor size is only
added while editing.
Text manipulation in SDL1.2 is quite a pain to say the least. But
since this demo is already quite limited in some aspects I think it
is fine to just get things running. That being said if used seriously
then text input still needs some work.
I personally do not have a retina display, but I added some changes
to all `GLFW` demos/examples. If there are still issues please
report back to me what is not working correct (please test out clipping
by playing around with scrollbars as well)