* Add missing style items to configurator...
Looks like I forgot knob completely and left out all the color factors
everywhere.
Also more symbols were added since I first wrote this. Will have to
remember to update it again once Rob's latest PR goes through.
In the process I discovered a couple issues, I left some comments just
in case but I'll fix them myself in separate commits.
* Fix knob issues, specifically...
use cursor_width for the cursor width and don't overwrite
the state with HOVER so the knob can actually be ACTIVE so it can
actually use the active colors (background, knob, and cursor).
* Fix slider issues, use style->bar_height, etc.
A remaining issue is that style->cursor_size.y has no effect
on vertex buffer based backends which is probably the majority
of them now.
Also nk_fill_circle and nk_stroke_circle should really be
called _ellipse, even if it's currently broken on vertex buffer
based backends and uses rect.w/2 as the uniform radius.
For x11 it correctly draws a major axis aligned ellipse.
* Check y for NULL too
There are some rare cases where the x and y offsets are split across
tables and the table with y gets incorrectly garbage collected in
nk_clear(). This prevents that from causing a segfault.
* Remove redundant nk_zero_struct() calls
There are some rare cases where the x and y offsets are split across
tables and the table with y gets incorrectly garbage collected in
nk_clear(). This prevents that from causing a segfault.
While browsing the documentation I noticed that the code blocks are
currently broken on the Layouting page.
I confess I'm not familiar with Doxygen, but simply removing a space
from the indentation seems to fix the issue!
Fixes https://github.com/Immediate-Mode-UI/Nuklear/issues/915
* Add basic tooltip positioning
* More flexible tooltip API, allow arbitrary offset
* Simplify and combine functions as discussed...
Combine position and offset parameters a single call using the latter as the
origin. Credit to @sleeptightAnsiC for the obvious idea.
* Add examples to overview, fix vararg versions
* Add more options (vertially centered origins), and more demos
* Simplify naming
* tooltip offsets with a default style
* Minor fixes, update style_configurator with new tooltip styling
* demo/sdl3_renderer/main.c: call nk_input_begin at the end of SDL_AppInit
* Fix shutdown sequence for nk_sdl_app
---------
Co-authored-by: Rob Loach <RobLoach@users.noreply.github.com>
While not required, this cleans up the folder structure by moving the `doc` folder to a hidden file at `.Doxyfile`. Compiled documentation is still build to the `doc` folder, which is gitignored.
* fix(demo/sdl3_renderer): Makefile should now support Win + Emsdk
Fixed several issues that would prevent this demo from being compilable
on Windows with Emscripten: (1) there was a typo preventing proper
resolution of BINEXT, (2) in case of using Emscripten, Windows was taking
a precedense due to OS always being defined, (3) BINEXT now has a
special case for Emscipten, (4) pkg-config provided by w64devkit has no
--path flag, so we retry with --exists too, (5) compiler invocation was
missing system flags, which could break on some MSYS2 runtimes,
(6) compiler invocation now uses all kinds of C/CPP/LD flags so you can
easily inject something like --shell-file now, and probably more...
This was done in order to help with implementing and testing for:
https://github.com/Immediate-Mode-UI/Nuklear/issues/888
* refactor(demo/sdl3_renderer): consistent syntax and flow in Makefile
Use ${} for variable expansion and $() for invoking functions.
Use $(or ...) for all branches instead of ifeq(...) blocks.
Hopefully, this will make it easier to read and understand.
* fix(demo/sdl3_renderer): append user provided C/CPP/LD flags in Makefile
Before it was overwriting those flags entirely, meaning that it could
delete some required ones (e.g. from pkg-config). Now it will append
them correctly, so your flags will take priority where it matters.
* Update nuklear.h
fixed pointer and size type defs for MinGW64
* -- added __clang__ macro for windows clang and clang-cl to also work
* updated the template nuklear.h to fix NK_SIZE_TYPE and NK_POINTER_TYPE
* Update src/nuklear.h
* Apply suggestion from @RobLoach
---------
Co-authored-by: Rob Loach <RobLoach@users.noreply.github.com>
Fixes the issue where you would not be able to provide
your own `bool` symbol when it's sizeof is not equal to 4.
This was bloking all custom code from supplying C99 _Bool,
or C++/C23 bool, or any other custom bool like in case of SDL3 demo.
New checks should be way more sane. The old ones never worked,
despite of comment that you could use `char` for it.
Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/849