Commit Graph
303 Commits
Author SHA1 Message Date
Rob Loach fe431c600d Check nk_add_value result in tree push 2026-10-17 15:59:05 -04:00
Robert Winkler 5b6f8b1d2b Fix related sizing issues with combos and tree_elements 2026-09-10 10:53:19 -04:00
Robert Winkler 96663736f2 Fix incorrect tooltip width 2026-09-10 10:53:19 -04:00
Robert Winkler 44fb5944e2 First pass at link widget 2026-09-05 13:23:49 -04:00
Robert Winkler a1856105f4 Let user choose property precision 2026-09-01 23:42:30 -04:00
sleeptightAnsiC 8109cfbabe fix: nk_font_config oversampling 3x horizontaly by default (#973)
* 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
2026-07-16 01:59:28 -04:00
schlangz 92edf7ba9b fix: clear popup.buf.active in nk_nonblock_begin when closing (#968) 2026-07-16 01:58:57 -04:00
sleeptightAnsiC 5157955006 doc: update section in nuklear_math.c to proper doxygen comment
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...
2026-07-06 00:05:02 -04:00
sleeptightAnsiC 4ebddf3a52 doc: replace dead/redirecting links with new/archived ones
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.
2026-07-06 00:05:02 -04:00
Rob Loach 2667d0a19a button: Add chevron and hamburger symbol (#933) 2026-05-29 22:27:34 -04:00
Robert Winkler 859d17b71a Add Delayed Tooltips (#943)
* 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
2026-05-26 11:34:03 -04:00
Rob Loach 50853aa65b docs: Clean up packer (#930) 2026-05-23 20:58:40 -04:00
Rob Loach f0acfa432c Merge pull request #951 from RobLoach/remove-nk_widget_fitting
Remove nk_widget_fitting()
2026-05-20 04:45:50 +02:00
Rob Loach dcbe452779 Update emscripten macro 2026-05-12 22:30:59 -04:00
Rob Loach 5a54a9f677 Merge pull request #949 from RobLoach/alt-function-keys
keys: Capture F1-F12, and ALT keys
2026-05-04 21:10:10 -04:00
Rob Loach 6cb54183b3 Merge pull request #945 from sleeptightAnsiC/doc_stack_code_block
fix(docs): snippet under "Stack" section lacked C code block
2026-05-04 20:38:44 -04:00
sleeptightAnsiCandStewBC 239f723ddb fix: nk_option_text* unticking itself when not visible
Every branch in those functions returns `is_active` but not those two,
which was clearly a bug that could manifest in rare occasions.
See linked issue for more information.

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/853
Co-authored-by: StewBC <swessels@email.com>
2026-04-30 21:44:57 -04:00
Rob Loach 95c15e29bf Remove nk_widget_fitting()
Fixes #947
2026-04-30 21:37:30 -04:00
Rob Loach 068de25d2d slider: Fix float type conversion (#948) 2026-04-28 05:40:17 -04:00
Rob Loach 2b1b6410e9 keys: Capture F1-F12, and ALT keys 2026-04-24 23:09:11 -04:00
sleeptightAnsiC 70607df096 fix(docs): snippet under "Stack" section lacked C code block
This was the last place without proper code block. I mentioned it in
https://github.com/Immediate-Mode-UI/Nuklear/pull/916#pullrequestreview-3925723888
It doesn't really change much, because syntax highlight is mostly blank
here, but since I already found it, I though I would keep it consistent.
2026-04-21 18:19:39 +02:00
Rob Loach 7f87c67e52 Increase size so you can actually click them (#924) 2026-04-20 10:09:34 -04:00
Rob Loach 409de195d1 Merge pull request #941 from TomJGooding/docs-layouting-remove-dangling-and
docs: fix typos in layouting documentation
2026-04-20 00:04:32 -04:00
Rob Loach 76d7e8e51e Merge pull request #926 from rswinkle/typos_and_minor_issues
Typos and minor issues
2026-04-17 13:34:28 +02:00
Rob Loach fee5a7c4de docs: Fix Warnings and Notes (#925)
* docs: Fix Warnings and Notes

* docs: Add a space
2026-04-17 12:53:12 +02:00
Robert Winkler ab51b8d387 Update configurator and more (#934)
* 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.
2026-04-17 12:51:55 +02:00
TomJGooding b48694e499 docs: fix typo in nk_layout_space_push docs 2026-04-12 10:05:28 +01:00
TomJGooding 206f05c661 docs(layouting): remove dangling 'and' 2026-04-12 09:17:58 +01:00
Rob Loach 8c9b376376 Fix NK_MEMCPY() size type conversions with nk_size (#913) 2026-03-30 11:03:51 -04:00
Rob Loach d293cc27fa docs: Move the CHANGELOG to Release Notes (#909) 2026-03-25 15:29:07 -04:00
Robert Winkler 88380b4e4b Committed is spelled with two t's
Add macro for backward compatibility
2026-03-24 14:30:02 -07:00
Robert Winkler dcae93cc6f Correct reference to non-existent nk_window_focus 2026-03-24 14:24:20 -07:00
Robert Winkler d52dc65ed2 The plural of vertex is vertices 2026-03-23 18:01:06 -07:00
Robert Winkler 4ec94c871b Increase size so you can actually click them 2026-03-22 20:39:47 -07:00
Robert Winkler 7002929a46 Remove redundant nk_zero_struct() calls 2026-03-16 14:42:46 -07:00
Robert Winkler a2d7087251 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.
2026-03-16 14:36:43 -07:00
Rob LoachandsleeptightAnsiC a9fef84be2 mouse: Add the Back/Forward Mouse Buttons (#906)
* input: Add Back/Foreward Mouse buttons

* rebuild

* Add remaining renderers

* Add mouse tests

* Apply suggestion from @RobLoach

* allegro: Fix switch warning?

* Clean up code

* Update demo/d3d12/nuklear_d3d12.h

Co-authored-by: sleeptightAnsiC <91839286+sleeptightAnsiC@users.noreply.github.com>

* Update demo/d3d11/nuklear_d3d11.h

Co-authored-by: sleeptightAnsiC <91839286+sleeptightAnsiC@users.noreply.github.com>

* Switch input context from d3d9 to gdi for X buttons

* Update context from d3d9 to gdi for XBUTTON events

* Change context from d3d9 to gdip for XBUTTON events

* Refactor mouse button handling in nuklear_allegro5.h

* Fix allegro

* Remove break

* Add doc comments

---------

Co-authored-by: sleeptightAnsiC <91839286+sleeptightAnsiC@users.noreply.github.com>
2026-03-16 09:12:18 -04:00
TomJGooding feb1e321af docs(layouting): fix code blocks
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
2026-03-10 19:19:54 +00:00
Rob Loach 987c8b89eb Return if value changed for property_*() and combobox*() functions (#912) 2026-03-08 17:51:33 -04:00
Robert Winkler 1fb586537b Add Tooltip Positioning (#911)
* 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
2026-03-08 17:50:35 -04:00
Robert Winkler a94e6ed970 Return if value changed for property_*() and combobox*() functions 2026-03-07 23:46:26 -07:00
Robert Winkler 675ce7fc98 Add prefix to problematic stb_truetype equal() func 2026-02-28 16:19:11 -07:00
JS Deck 3010177b45 Fix property edit field value would be discarded on focus lost when clicking on an earlier property 2026-02-16 14:43:49 -07:00
JS Deck b13eccac53 Add cast to nk_strtoi and nk_strtod 2026-02-16 14:32:09 -07:00
JS Deck 9fd14bbe58 Fix property edit field mouse click activation when it's earlier in the window 2026-02-16 14:31:57 -07:00
blueandRob Loach a329721db9 Fixed NK_SIZE_TYPE and NK_POINTER_TYPE on MinGW and Windows clang/clang-cl (#811)
* 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>
2026-02-06 23:52:36 -05:00
sleeptightAnsiC 595a81f2ae Fix(build): replace incorrect static asserts for size(nk_bool)
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
2026-02-06 16:33:10 +01:00
Rob Loach 25f33c8780 Merge pull request #862 from sleeptightAnsiC/fix__math_util_build
Fix several issues related to building from Nuklear/src/* files
2026-02-02 18:57:35 -08:00
sleeptightAnsiC 690f63eaed Fix(build): guard nk_pow, nk_ifloord, nk_log10 with preprocessor
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
2026-01-27 17:34:36 +01:00
sleeptightAnsiC a3c6571e62 fix(demo): nuklear_sdl3_renderer now provides NK_DTOA
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.
2026-01-27 17:33:25 +01:00