While the last commit fixed some issues it still had a bug which
caused wrong scrollbar target size calculation. So this commit
hopefully fixes the problem.
Previously if a group had a scrollbar and is not completly visible
inside the window then the its scrollbar would use the clipped
height instead of its actual height as scroll reference. This should
now be fixed and work correctly.
In addition I split the tab/node button style into two one for the
minimized and one for the maximized state change.
Previously window borders were wrongfully drawn with already updated
size onto a window drawn with old size. This is now fixed and scaling
is a delayed by one frame.
In addition I hopefully finally fixed a window movement bug which
occurs if you drag one window header over another one really fast.
This would cause the previously not selected window to be wrongfully
selected and moved.
This commit adds another init function to font atlas which allows to
specify one allocator for temporary and one for permanent allocation.
In general this makes it managing memory a little bit more fine
grained. This is not a breaking change and the old API still works
without problems.
For some reason `xlib` still draws text even if the scissor rect has
a width or height of `0`. I don't know if this is a bug on my end or
on xlib but whatever the source it is now fixed.
It's now possible to define a specific color for each line or
column entry inside a chart. This purely extends the API and all
previous implementation still work.
This is a breaking change to hopefully noone. I removed all drawing
callbacks inside `nk_style` structs. The reason is that they are
quite ugly and a lot of work to maintain in the future. In addition
I added `nk_selectable_image_text`, `nk_selectable_image_label`,
`nk_select_image_text` and `nk_select_image_label` for combined
text and image selectables.
While mouse grabbing already works in x-direction for vertical and
in y-direction for horizontal scrollbars moving over scrollbar
boundries in the other direction would fail. The problem is now fixed
and scrollbar should work as expected. Note: interestingly slider
already work correctly even though I did not do anything to make it
work correctly.
Hopefully fixed selection bug for empty lines and made edit widget
usable while being only partially visible. I also added two addition
modes for a vim like expierence with view, insert and replace mode
instead of default replace mode, but only added the new behavior into
the x11 demo so far.
This commit fixes a stupid reallocation bug I had inside the library.
Basically I get a pointer inside a growing buffer which can be
invalidated by a second allocation and regrowth of said buffer.
Under normal circumstances I do not do this but in one instance I
actually did. That is for allocation temporary normals. This issue
should now be fixed and work correctly.
This fixes some small harmless unitialized variable access violations
found by either valgrind or ASAN. Nothing really ground breaking but
still cleaner.
Previously you had to first activate a window by clicking if it was
visually blocked by another window to move it around which was a
little bit blocky. It should now be possible to directly move and
activate a window.
Previously buttons would show up as hovered if another widget was
being hovered in another window. This behavior is now fixed and
everything should work correctly now.
Fixed some non-portable implementation details inside window and
table memory pool which could cause problems for platforms other
than x86/x64 and fixed some strict aliasing problems.
Tables inside windows get removed if a windows is not longer in use
inside `nk_free_window`. But I noticed that they are only removed
if they were not used the last frame, because of a copy & paste bug.
I removed the additional check and every table should now rightfully
be marked as free. I don't know if this bug actually caused any
problems, since I checked memory consumption and there were no
symptoms of wrong behavior before.
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.