* fix: nk_font_config oversampling 3x horizontaly by default
See linked issue for additional information.
According to the commit that introduced this, it was supposed to:
_"oversample the default font to make it look better_"
but it was oversampling every single font, potentially making it blurry.
This fix preserves old behavior for code that may still expect it,
but nk_font_config will now use oversample_h=1 by default.
Some demos achieve sharp font by scaling their pixel_size and in this
case there won't be any difference, but if someone used badly behaving font
and didn't notice it only worked because of oversampling, that font
may now appear differently (this is unlikely but still possible).
Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/855
Refs: https://github.com/Immediate-Mode-UI/Nuklear/commit/1d7f0244f97e2d35a57bc90586863ab89bea9be3
* doc: add code comment about fallback in nk_font_atlas_bake
split into another commit in case the previous one will need to be reverted
This was the last place in the library that used old /// comments.
I updated it in order to keep it consistent with everything else.
It probably doesn't make sense for internal details to appear in public
documentation, but I will worry about this later...
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
* 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.
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
* 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
Those 3 internal functions are only used by nk_dtoa implementation,
which means that you will get -Wunused-function warnings when providing
your own NK_DTOA. Now we are guarding those with NK_DTOA_NEEDED ifdef.
This change was intentionally split into separate commit so it
will be easy to git-bisect and git-revert in case of any issues.
https://github.com/Immediate-Mode-UI/Nuklear/pull/862#pullrequestreview-3480471232
There was a note inside nuklear_sdl3_renderer saying that SDL3 does not
have "dtoa", so I simulated it's behavior with printf. This helps us
test the actual NK_DTOA preprocessor path.