Commit Graph
2410 Commits
Author SHA1 Message Date
Rob Loach 75ca60976d Initial move 2026-02-23 02:34:15 -05:00
Rob Loach 3bcdec2029 Merge pull request #898 from rswinkle/property_focus_previous
Fix previous property focus issues
2026-02-17 15:34:33 -05:00
Richard Gill 994f788684 Merge pull request #860 from Shamar/xcb-client-message
demo/xcb_cairo/nuklear_xcb.h: do not discard xcb_client_message_event_t
2026-02-17 15:18:32 +01:00
Giacomo Tesio dc4e69d503 nuklear_xcb.h: move EMPTY_CLIENT_MESSAGE within nk_xcb_handle_event's scope 2026-02-17 13:23:28 +01: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 c4c46a04a5 Update nuklear.h with paq.sh 2026-02-16 14:32:09 -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
sleeptightAnsiC 3f71ae1d74 demo/sdl3_renderer: Rewrite SDL3 Makefile to support Emscripten (#894)
* 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.
2026-02-13 15:12:56 -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
Giacomo Tesio 4265779513 demo/xcb_cairo/nuklear_xcb.h: do not discard xcb_client_message_event_t
Currently nk_xcb_handle_event discard everything that was sent from
other clients through xcb_send_event.

To enable a minimal IPC over such channel, this patch adds a new option
NK_XCB_CLIENT_MESSAGE to the nk_xcb_event_type enum and stores the
message recieved in xcb_ctx->last_client_message.

This can be useful in particular when a background process or thread
completes a data retrieval or processing and want to wake up the GUI.
2025-11-16 14:00:07 +01: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 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