Skip to content

feat: config inclusion#955

Open
sleeptightAnsiC wants to merge 2 commits into
Immediate-Mode-UI:masterfrom
sleeptightAnsiC:feat_user_config
Open

feat: config inclusion#955
sleeptightAnsiC wants to merge 2 commits into
Immediate-Mode-UI:masterfrom
sleeptightAnsiC:feat_user_config

Conversation

@sleeptightAnsiC

Copy link
Copy Markdown
Contributor

Resolves: #886

See linked issue and commit message for more details and reasoning.

I found this to be a rather good moment to submit this feature as I was updating some of my private repos with it. Also I'm planning to share some code that reuses demo/sdl3_renderer with different main.c for the purpose of #726 (comment) and #888 (comment), and having its config split into another file will be helpful there.

Comment thread src/nuklear.h Outdated
@sleeptightAnsiC sleeptightAnsiC force-pushed the feat_user_config branch 2 times, most recently from 3acb495 to e146fe5 Compare May 8, 2026 20:54
@sleeptightAnsiC sleeptightAnsiC changed the title feat: include "nk_user_config.h" when NK_USER_CONFIG is defined feat: include "nk_user_config.h" when NK_INCLUDE_USER_CONFIG is defined May 8, 2026
@sleeptightAnsiC sleeptightAnsiC marked this pull request as ready for review May 8, 2026 21:23
Comment thread src/nuklear.h Outdated
@sleeptightAnsiC sleeptightAnsiC force-pushed the feat_user_config branch 2 times, most recently from 9ba68d1 to ab3b09c Compare May 12, 2026 08:43
@sleeptightAnsiC sleeptightAnsiC changed the title feat: include "nk_user_config.h" when NK_INCLUDE_USER_CONFIG is defined feat: include "nuklear_config.h" when NK_INCLUDE_CONFIG is defined May 12, 2026
Comment thread .github/ci_compile_sources.sh
Comment thread demo/sdl3_renderer/main.c
Comment thread src/nuklear_internal.h
@sleeptightAnsiC sleeptightAnsiC marked this pull request as draft May 31, 2026 20:07
@sleeptightAnsiC

This comment was marked as resolved.

@sleeptightAnsiC sleeptightAnsiC force-pushed the feat_user_config branch 3 times, most recently from 0ad44bc to 62c16ab Compare May 31, 2026 23:10
@sleeptightAnsiC sleeptightAnsiC marked this pull request as ready for review May 31, 2026 23:36
@sleeptightAnsiC sleeptightAnsiC requested a review from RobLoach May 31, 2026 23:36
@sleeptightAnsiC

sleeptightAnsiC commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Just beware I snuck another commit into this PR that just rewords one comment. I was already touching this exact code and it was harmless. It's related to request from #961 (don't squash it though)

Comment thread nuklear.h Outdated
sleeptightAnsiC and others added 2 commits June 30, 2026 15:54
Adds a way to inject config header with predefined macros and includes.
This is not so important for regular users of amalgamated ./nuklear.h
but becomes useful when building from ./src/*.c with actual build system
See linked issue for more details and reasoning about this.

Resolves: Immediate-Mode-UI#886
Origin: Immediate-Mode-UI#961 (comment)
Fixes: Immediate-Mode-UI#961
Co-authored-by: TomJGooding <101601846+TomJGooding@users.noreply.github.com>
@sleeptightAnsiC sleeptightAnsiC requested a review from RobLoach June 30, 2026 13:56
@sleeptightAnsiC sleeptightAnsiC changed the title feat: include "nuklear_config.h" when NK_INCLUDE_CONFIG is defined feat: config inclusion Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add a way to reuse Nuklear configuration across multiple source files

2 participants