2417 Commits
Author SHA1 Message Date
Rob Loach a2a9608326 Update nuklear.h 2026-03-08 13:27:43 -04:00
Rob Loach 63c6d42dfc Apply suggestion from @RobLoach 2026-03-08 13:27:03 -04:00
Rob Loach 5f6e5710f9 Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into type_fmt 2026-02-09 13:31:14 -05: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
Rob Loach 4c8faf3b2f Merge pull request #875 from ZvRzyan18/swapchain_creation
Fix Vulkan Unsupported Composite Alpha
2026-02-06 23:41:05 -05:00
Rob Loach b0db2315cb Merge pull request #876 from ZvRzyan18/glfw_semaphore_fix
Fix Vulkan Reusing Signaled Semaphore
2026-02-06 23:40:44 -05:00
Rob Loach 2ddae39650 Merge pull request #884 from sleeptightAnsiC/fix__build_sizeof_bool
Fix(build): replace incorrect static asserts for size(nk_bool)
2026-02-06 23:36:13 -05:00
Rob Loach 1f37b78d30 Merge pull request #883 from sleeptightAnsiC/fix__style_configurator_unsafe_cast
fix(style_configurator): fix unsafe int to nk_bool pointer casts
2026-02-06 23:33:30 -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
sleeptightAnsiC f416ca9105 fix(style_configurator): fix unsafe int to nk_bool pointer casts
Nuklear changed a lot of stuff from integer types to nk_bool back in:
https://github.com/Immediate-Mode-UI/Nuklear/pull/185
This introduced an issue in demo/common/style_configurator.c where
the int pointer would be passed into nk_checkbox_label()
which expects nk_bool pointer instead, thus causing an unsafe cast.
This change fixes this issue by using a reference of additional variable.

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/812
2026-02-03 09:21:33 +01:00
ZvRzyan18 850bbd2d9c cleanup warnings 2026-02-03 14:43:23 +08: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 cef633cecb add simple CI for compiling from Nuklear/src/*.c sources
...in order to catch issues like this one:
https://github.com/Immediate-Mode-UI/Nuklear/issues/256
2026-01-27 17:53:47 +01: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
sleeptightAnsiC ae9ef5d585 fix(util): guard nk_strtod implementation with preprocessor
nk_strtod implementation was never guarder by the preprocessor,
so if you ever provided your own NK_STRTOD, the default one would
still be compiled. This fix was intentionally split into another commit,
because the lack of the guard was very suspicious to me...

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/851#issuecomment-3503880414
2026-01-27 17:32:59 +01:00
sleeptightAnsiC ad98bd924c fix(build): failure to build from nuklear/src/* sources
This fixes an issue, where you would not be able to build Nuklear from
sources (without amalgamated header), caused by nuklear_math/util.c
not declaring some function definitions, due to wrong preprocessor logic.

This fix is an "Option 3" mentioned in following comment...
https://github.com/Immediate-Mode-UI/Nuklear/issues/256#issuecomment-2949725477
... where we define NK_XXX_NEEDED macro at nk_xxx symbol definition
so the preprocessor will be able to correctly detect it in all cases.

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/256
2026-01-27 17:29:40 +01:00
Rob Loach b5f67b8888 Rebuild 2026-01-26 12:29:39 -05:00
Michał Ciesielski 0e872de6ac Fix the comment lines in section headers (#845) 2026-01-26 11:59:11 -05:00
Rob Loach b5f506a24a Merge pull request #487 from Ohjurot/d3d12_backend
Addressing #455 (D3D12 Backend)
2026-01-25 14:07:18 -05:00
Rob Loach d7f173823f Merge pull request #874 from therathatter/master
Fix D3D12 pixel shader not passing texture index
2026-01-25 14:06:23 -05:00
ZvRzyan18 2cf5cf9de6 fix sdl reusing signaled semaphore 2026-01-21 11:57:00 +08:00
ZvRzyan18 f8e049a5d4 fix glfw swapchain error creation 2026-01-21 08:41:42 +08:00
ZvRzyan18 7352d4b6e8 fix sdl swapchain creation error 2026-01-21 08:37:32 +08:00
therathatter ac8684480d Fix D3D12 pixel shader not passing texture index 2026-01-20 18:13:24 -06:00
sleeptightAnsiC 7a8e8aa3fc fix(nk_property): nk_do_property now uses NK_STRTOD via macro
nk_do_property was using 'nk_strtod' instead of 'NK_STRTOD'
which was not picking the user-provided implementation of NK_STRTOD

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/issues/851
2025-11-18 20:34:29 +01:00
Rob Loach 9afb3dd6d1 Merge pull request #852 from sleeptightAnsiC/feat__sdl3_renderer_demo
Add sdl3_renderer demo V4
2025-11-16 17:06:15 -05:00
sleeptightAnsiC ec5e8d711e Add new demo: sdl3_renderer
This is a highly updated demo for libSDL3. It fixes a lot of long
occuring issues and brings some improvements specific to SDL3 API.
The origin and development of this demo is quite long.
The exact track of development is something like this:
`Nuklear/demo/sdl_renderer` -> https://github.com/Immediate-Mode-UI/Nuklear/pull/772 -> https://github.com/Immediate-Mode-UI/Nuklear/pull/779 + https://github.com/Immediate-Mode-UI/Nuklear/pull/825 -> _this_ commit...
You may wish to read the linked PRs in order to get the full context.
Commit message is too small to describe everything. I'm sorry...
2025-11-15 22:42:10 +01:00
sleeptightAnsiCandRobert Winkler c4e370b4f0 Fix(nk_property): property widget not updating 'win->edit.active' state
Other "editable" widgets are updating the its window 'edit.active' state,
but not nk_property. SDL3 demo needs this in order to hook SDL_SetTextInput.
This patch was initially proposed by https://github.com/rswinkle
The only thing I changed in it, was a removal of 'edit.name' update,
nk_property is not using the name hash, so there is no reason to set it.

Origin: https://github.com/Immediate-Mode-UI/Nuklear/pull/852#issuecomment-3518277340
Co-authored-by: Robert Winkler <rob121618@gmail.com>
2025-11-15 21:09:09 +01:00
Rob Loach fcd64f85e5 Add nk_input_is_mouse_moved() (#632)
* Add nk_input_is_mouse_moved()

* Move the nk_input_is_mouse_moved() declaration
2025-10-25 10:03:01 -04:00
Rob Loach 8035d2662c Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into type_fmt 2025-10-25 09:48:53 -04:00
Rob Loach 86178a8aa4 Merge pull request #844 from Immediate-Mode-UI/fix_insert_replace_reset
Fix Insert Replace Reset
2025-10-25 09:46:18 -04:00
Rob Loach dfe2ab78fb Delete demo/x11_xft/nuklear_xlib.h 2025-10-25 09:43:42 -04:00
Rob Loach 530100f938 Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into fix_insert_replace_reset 2025-10-25 09:42:46 -04:00
Rob Loach 831f8d7f19 Merge pull request #807 from uintmax/demo-rawfb-wl-context
Fix Rawfb Wayland Demo
2025-10-25 09:40:09 -04:00
Rob Loach 3d0f61bac8 Merge pull request #843 from Immediate-Mode-UI/merge-x11-xft-fix-conflict
Build the X11 and XFT demos from the same sources
2025-10-25 09:38:30 -04:00
Rob Loach 8fe6f13e6b Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into fix-hovered-unicode4 2025-10-25 09:37:03 -04:00
Rob Loach 82193274ea Merge branch 'master' of github.com:Immediate-Mode-UI/Nuklear into merge-x11-xft 2025-10-25 09:32:07 -04:00
Rob Loach 242f35efa0 Merge pull request #836 from sleeptightAnsiC/fix__nk_widget_text__default_align
nk_widget_text: use left alignment by default instead of silent failing + small refactor
4.12.8
2025-10-25 09:29:41 -04:00
Rob Loach 9851a51300 Merge pull request #837 from lockie/hover-in-popup
Correctly handle hover in popup windows
2025-10-25 09:27:56 -04:00
Andrew Kravchuk 1374197ec2 Update source code too 2025-10-22 07:49:36 +02:00
Andrew Kravchuk e562d1b21f Correctly handle hover in popup windows 2025-10-10 12:11:35 +02:00
sleeptightAnsiC 6af4e06683 refactor(nk_widget_text): code for X and Y alignment now looks the same
Small refactor in nk_widget_text that makes the code look the same
for X and Y axis alignment. Before it was unconditionally setting
the label.y/.h values for NK_TEXT_ALIGN_TOP, instead of doing it
inside of the branch (unlike the other axis), which was quite
confusing and probably the reason why the bug existed here
in the first place (see previous commit for reference)
2025-10-08 18:03:56 +02:00
sleeptightAnsiC 83233e8eb9 fix(nk_widget_text): use left align by default, instead of silent fail
Fix nk_widget_text to use NK_TEXT_ALIGN_LEFT by default,
instead of silently failing when no x-axis alignment is provided.
For comparison, y-axis does not have this issue and defaults to TOP.
2025-10-08 17:32:15 +02:00
PavelSharp c2f210a26e Update CHANGELOG and Rebuild nuklear.h 2025-09-12 03:09:50 +03:00
PavelSharp 109e9bde19 fix: use ctx->current->flags instead of ctx->begin->flags when checking state in nk_window_is_hovered
fix: allow len == NK_UTF_SIZE in nk_utf_decode by adjusting NK_BETWEEN upper bound
2025-09-12 03:09:29 +03:00
invalidpagefault 16a6303319 Fix rawfb Wayland demo 2025-05-17 10:37:19 +02:00
Robert Winkler b150778150 Allow switching between INSERT and REPLACE modes, remove useless check 2025-04-28 17:10:44 -07:00
Robert Winkler 6161712a6a Fix allegro backend key event issues 2025-04-28 16:50:15 -07:00
Robert Winkler c5f4ee59e4 Add insert/overwrite/reset to allegro backend 2025-04-28 14:55:35 -07:00