Skip to content

Hacked2/add gui framework - #85

Merged
dertseha merged 102 commits into
main-rehackedfrom
hacked2/add-gui-framework
Aug 29, 2026
Merged

dertseha merged 102 commits into
main-rehackedfrom
hacked2/add-gui-framework

Conversation

@dertseha

@dertseha dertseha commented Aug 27, 2026

Copy link
Copy Markdown
Member

Adds DearImGui for the UI.

This took longer, and in the end it questions the feasibility of an MS-DOS build :/ Any tried UI framework (Dear ImGui, Nuklear (first choice), and even Clay) showed a poor rendering performance (with a lot of text/elements on screen) when running the MS-DOS build under DOSBox. Dear ImGui is probably the slowest, yet has the most features, and also is the same as for the previous implementation, allowing for familiarity. That it also introduces C++ to the main program is an additional sad part, even though hidden behind a wrapper. Yet I failed to have proper text/edit boxes laid out with Nuklear, so I let go of that "principle".

I also realize that the UI part is not the core feature to build on. It should be the view of the whole thing, and in theory, replaceable. I could also make a TUI or REPL with the intended command system, or spend extra time for optimization later on. It became almost like a bikeshed-decision.

Start with something, then reiterate.


The included font code was for supporting a self-served pixel-font for Nuklear or Clay (worked great!); for DearImGui I failed to integrate it non-aliased. As with the previous points above, especially if the MS-DOS part, such details can be added later. Either by code, or a dedicated font file.

dertseha added 30 commits July 31, 2026 06:24
Now that this is done, all of this seems like this is rather an adapter between Nuklear and SDL. oh well.
Why was the compiler not complaining for this one, but for all the others? I am starting to get confused when and which variant truly is meant to initialize a structure with zero.
…UI is getting bad;

- performance drops significantly when showing these few strings and moving mouse
- even worse, layouting is getting annoying. trying to use an edit box shows that it doesn't behave like an edit box should (auto scroll)
…ramework

# Conflicts:
#	app/source/main.c
#	nuklear-sdl-bridge/main/include/hacked/nuklear/NuklearSdlBridge.h
#	nuklear-sdl-bridge/main/source/NuklearSdlBridge.c
Since MS-DOS build is slow either way, and the small font was mainly for low resolutions anyway, drop the importance of this detail for now and rather get the rest working. After all, it is mainly about the visual aspect that makes the MS-DOS part slow. all the internals can be implemented first, then visuals can follow and be ported/optimized.
@dertseha
dertseha merged commit 1b59cb8 into main-rehacked Aug 29, 2026
7 checks passed
@dertseha
dertseha deleted the hacked2/add-gui-framework branch August 29, 2026 11:10
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.

1 participant