Several links were either dead, redirecting to different pages,
displaying 404 or entirely different content. This patch replaces
them with alive/new/archived ones in order to preserve information.
* Add nk_input_is_mouse_hovering_delay_rect() to implement delayed popups
* Add tooltip convenience functions, and a default delay used only with appropriate convenience function
* Add 2 input hovering motionless input functions, use delayed version for delayed tooltips
* Add tooltip disappears when item is clicked functionality
* Add Doxygen comments above definitions
Remove the remaining nuklear sin/cos functions in the examples.
This follows reverting commit 07941526cc
in 6ef6f73051.
These nuklear math functions were tailored for internal use only,
since "nuklear only needs sine and cosine to generate circles" as
documented in `nuklear_math.c`.
Replacing the standard math library functions with nuklear's
approximation implementations breaks the examples in multiple places.
See https://github.com/Immediate-Mode-UI/Nuklear/issues/959
Co-authored-by: sleeptightAnsiC <91839286+sleeptightAnsiC@users.noreply.github.com>
* 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.
* 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>
* 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.