2512 Commits
Author SHA1 Message Date
Robert Winkler 4a6686d746 menu: switch to a hovered title while another menu is open
Once a menu is open, moving the pointer onto another title closes the
first and opens the second. Text, image, and symbol titles all do this.
2026-11-29 16:13:24 -05:00
Rob Loach c8bfb4df12 buffer: Make init() clip match reset() clip 2026-11-26 01:40:30 -05:00
Robert Winkler fa7240a788 Fix unnecessary combo flips
When user given height is less than content height, use that (will have
a scrollbar) so we don't flip unnecessarily

Opposite of Menu example of larger than needed requested height, in
which case we use real content height to determine whether to flip
2026-11-26 01:36:11 -05:00
Robert Winkler 7fee1db123 Same unecessary scrollbar issue for combos 2026-11-26 01:36:11 -05:00
Robert Winkler f1b960e4b2 Fix the same bug for contextual menus, then a related bug for unnecessary scrollbars 2026-11-26 01:36:11 -05:00
Robert Winkler bd7d582f4c Fix bugs: Use real height not user given max height...
...for determining whether a popup will fit as a dropdown vs needing to
drop "up".

Additionally, pin the direction so a popup menu won't flip back and
forth as you expand/collapse a tree inside of it.
2026-11-26 01:36:11 -05:00
Robert Winkler a0f5b25bb1 Fix some bugs in menus/combos (flickering) and context menu insufficient width handling 2026-11-26 01:36:11 -05:00
Robert Winkler fb492abf08 First pass at smart popup positioning when it's clipped by window 2026-11-26 01:36:11 -05:00
TomJGooding bab18497df demo(overview): update splitter description
Simply the description for the 'Splitter' layout and prevent cut off
text.

Fixes https://github.com/Immediate-Mode-UI/Nuklear/issues/1001
2026-11-04 23:31:23 -05:00
TomJGooding f317273960 docs: spelling 2026-11-04 23:29:34 -05:00
TomJGooding 90bf632f1f fix version in nuklear.h
Fix the version number in `nuklear.h`.
Nuklear [v4.13.4](https://github.com/Immediate-Mode-UI/Nuklear/releases/tag/v4.13.4)
was released on 2026-10-31, but the header still shows the previous
version.

Fixes https://github.com/Immediate-Mode-UI/Nuklear/issues/1004
2026-11-04 23:29:18 -05:00
Rob Loach 709bd63cdf Check nk_add_value result in tree push 2026-11-01 13:59:08 -05:00
snowyukitty f101764f7a Remove standalone property focus repro demo v4.13.4 2026-10-31 18:14:26 -04:00
snowyukitty 66fc090b1b Fix property and text edit focus isolation 2026-10-31 18:14:26 -04:00
Rob Loach b3c2a08385 Fix nk_str utf8 NUL and remove_runes off-by-one 2026-10-29 22:55:54 -04:00
Rob Loach 8407f477c7 Apply global_alpha once in stroke_poly_line 2026-10-25 23:59:33 -04:00
Rob Loach 161d49e9bb Fix font NULL fallback glyph and merge range 2026-10-24 13:15:10 -04:00
Dipolitoanddipolito 9f7750296f SDL3_OpenGl3 Fix touchpad scroll (#991)
Co-authored-by: dipolito <dipolito@gui-thinkpad.gui-thinkpad.local>
2026-09-20 17:11:10 -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 e3e18dc1e4 Forgot to update Makefile for new CI stuff 2026-09-05 13:23:49 -04:00
Robert Winkler 44fb5944e2 First pass at link widget 2026-09-05 13:23:49 -04:00
Rob Loach 3a46e383c6 sdl3: Enable alpha blending for geometry rendering 2026-09-04 23:54:34 -04:00
MatandRob Loach b6888748a4 Update demo/sdl3_opengl3/main.c
Co-authored-by: Rob Loach <robloach@gmail.com>
2026-09-04 23:54:07 -04:00
Matt d43d2d6996 Added sdl3 and opengl 3 demo 2026-09-04 23:54:07 -04:00
Robert Winkler a1856105f4 Let user choose property precision 2026-09-01 23:42:30 -04:00
Rob Loach 0dbc52f864 Merge pull request #972 from sleeptightAnsiC/ci_add_msvc
add CI workflow for MSVC and fix GDI demo
2026-07-21 08:36:13 -04:00
Rob Loach 65fefb1016 Fix README example frame loop 2026-07-19 23:49:50 -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
Rob Loach 974bdb08f7 sdl3: Update to SDL_GetTicksNS() 2026-07-08 00:25:38 -04:00
Rob Loach e4e7b86bb1 sdl3: Add keypad enter 2026-07-08 00:22:35 -04:00
sleeptightAnsiC ff2ff046aa fix(overview): custom tooltip position was impossible to select + use proper nk_edit
For some reason the 'static' was missing from cur_pos preventing
selection of custom tooltip position. This was broken since:
https://github.com/Immediate-Mode-UI/Nuklear/commit/063968520f7bb8129b7a164906be055da3634cd3
Also fixed TODO note by using nk_edit_string_zero_terminated rather
than reimplementing the wheel with text_len and '\0'

Refs: https://github.com/Immediate-Mode-UI/Nuklear/pull/900
Refs: https://github.com/Immediate-Mode-UI/Nuklear/pull/937
2026-07-06 00:06:27 -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
sleeptightAnsiC 4937c7d5d1 CI: add msvc.yml for testing demos with build.bat
Adds CI workflow for all Windows-specific demos that require MSVC.
Because each build.bat hardcodes path to the same MSVC toolchain,
the workflow uses arch:x86 and toolset:14.0 for compatibility.

Refs: https://github.com/Immediate-Mode-UI/Nuklear/issues/895
2026-06-30 20:49:15 +02:00
sleeptightAnsiC a7353204d0 fix: demo/gdi/main.c not compiling due to missing brace
This file was failing with syntax error which appears to be broken since
https://github.com/Immediate-Mode-UI/Nuklear/commit/063968520f7bb8129b7a164906be055da3634cd3
I suspect none of the Windows-specific demos were actually tested.

Refs: https://github.com/Immediate-Mode-UI/Nuklear/pull/937
2026-06-30 20:35:42 +02:00
sleeptightAnsiC e634a0dfa1 CI: bump ccpp.yml to ubuntu-26.04 and add sdl3_renderer job
current ubuntu-latest (24.04.3 LTS) doesn't have package for libsdl3-dev
26.04 is still in "preview" but it let's us test demo/sdl3_renderer

Refs: https://github.com/Immediate-Mode-UI/Nuklear/pull/894
Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/897
2026-06-29 22:30:34 -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 328ec189f3 Merge pull request #954 from sleeptightAnsiC/fix_x11_image_corruption
fix(x11): nk_stbi_image_to_xsurf corrupting memory when channels != bpl
2026-05-20 04:44:47 +02:00
Rob Loach e5a3839a87 Merge pull request #960 from TomJGooding/fix-demo-remove-nuklear-math
fix(demo): remove nuklear math functions
2026-05-16 12:59:44 -04:00
Rob Loach 4cd4f4f7c7 Merge pull request #957 from RobLoach/emscripten-macro-deprecated
Update emscripten macro
2026-05-15 17:47:11 -04:00
TomJGoodingandsleeptightAnsiC 1fbf007ef2 fix(demo): remove nuklear math functions
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>
2026-05-15 19:47:33 +01:00
TomJGooding 6ef6f73051 Revert "demo: Use Nuklear math functions for examples"
This reverts commit 07941526cc.
2026-05-15 18:33:12 +01:00
Rob Loach dcbe452779 Update emscripten macro 2026-05-12 22:30:59 -04:00
sleeptightAnsiCandTomJGooding cbf81289ae fix(x11): nk_stbi_image_to_xsurf corrupting memory when channels != bpl
nk_stbi_image_to_xsurf could corrupt memory when image channels
did not match screen surface depth. I fixed it by checking DefaultDepth
ahead of time and only then calling stbi_load* with previously
calculated channels value. Also exported nk_xsurf_image_free with NK_API

TBH, I have no idea about Xlib and don't know what I'm doing,
and a lot of things in nk_stbi_image_to_xsurf was already questionable.

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/950
Obsoletes: https://github.com/Immediate-Mode-UI/Nuklear/pull/952
Co-authored-by: TomJGooding <101601846+TomJGooding@users.noreply.github.com>
2026-05-09 16:04:53 +02: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