Commit Graph
910 Commits
Author SHA1 Message Date
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 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
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 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 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 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
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 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
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
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
Rob Loach 8d78a3b50b Merge pull request #946 from sleeptightAnsiC/disable_demo_optimizations
disable optimizations and other costly CFLAGS from demos
2026-05-04 20:39:18 -04:00
sleeptightAnsiC eda8438bbd disable optimizations for MSVC demos too
removes /O flags from CL and FXC, for all demos using build.bat
intentionally split into different commit because we rarely test those

Fixes: https://github.com/Immediate-Mode-UI/Nuklear/pull/946#issuecomment-4306256773
2026-05-04 21:49:10 +02:00
Rob Loach 2b1b6410e9 keys: Capture F1-F12, and ALT keys 2026-04-24 23:09:11 -04:00
Rob Loach a4e125f4bf Merge pull request #942 from RobLoach/math-overview
demo: Use Nuklear math functions for examples
2026-04-23 09:57:36 -04:00
Rob Loach 4d827bb3ed Merge pull request #932 from RobLoach/glfw-framebuffersize
glfw: Use framebuffer size
2026-04-23 09:57:00 -04:00
Rob Loach c133df117e Merge pull request #931 from RobLoach/glfw-vulkan-scaling
glfw: Fix scaling in Vulkan with Retina
2026-04-23 09:54:09 -04:00
Rob Loach ed2c055c24 Merge pull request #928 from RobLoach/suggestions-from-gvanem
demo: Fix sdl_vulkan for Windows, from @gravnem
2026-04-23 09:52:45 -04:00
sleeptightAnsiC 39688d28ea disable optimizations and other costly CFLAGS from demos
Demos must compile as fast as possible, in order to be quick to
reiterate and retest. Given that each needs to link and recompile
amalgamation every time, the difference between -O2 and -O0 is
noticeable. This also slightly affects CI times. This topic was
discussed under several occasions, for example:
https://github.com/Immediate-Mode-UI/Nuklear/pull/894#issuecomment-3880985649
https://github.com/Immediate-Mode-UI/Nuklear/issues/895#issuecomment-3884228468
2026-04-21 21:18:42 +02:00
Rob Loach d4c0ef2f69 Merge pull request #940 from rswinkle/sdl3_renderer_issues
Fix minor sdl3_renderer issues
2026-04-21 10:14:04 -04:00
Robert Winkler 063968520f demo: Quality of Life updates
- Meaningful titles across all Demos
- Switch to CTRL+Q to exit the demos
2026-04-20 10:07:02 -04:00
Rob Loach 07941526cc demo: Use Nuklear math functions for examples 2026-04-19 23:14:29 -04:00
Andrew Kravchuk ce181dde10 demo: Handle forcible cursor moving in allegro demo (#817) 2026-04-17 13:48:28 +02: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
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
Robert Winkler 2880afd0a9 Add C linkage 2026-04-11 19:15:04 -07:00
Robert Winkler a23c9b04de Fix minor sdl3_renderer issues 2026-04-11 15:53:39 -07:00
Rob Loach 312dd1b328 glfw: Use framebuffer size 2026-03-25 22:35:09 -04:00
Rob Loach c90846a261 glfw: Fix scaling in Vulkan with Retina 2026-03-25 22:21:43 -04:00
Rob Loach ac73d50166 demo: Fix sdl_vulkan for Windows, from @gravnem 2026-03-25 15:44:28 -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 d52dc65ed2 The plural of vertex is vertices 2026-03-23 18:01:06 -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
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
Mirian ShilakadzeandRob Loach 4aff9c7c8a demo/sdl3_renderer/main.c: call nk_input_begin at the end of SDL_AppInit (#865)
* demo/sdl3_renderer/main.c: call nk_input_begin at the end of SDL_AppInit

* Fix shutdown sequence for nk_sdl_app

---------

Co-authored-by: Rob Loach <RobLoach@users.noreply.github.com>
2026-03-04 18:26:31 -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
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
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