Hacked2/add gui framework - #85
Merged
Merged
Conversation
…ounter-productive
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.