-
Notifications
You must be signed in to change notification settings - Fork 34
Ported Imgui-knobs #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Logickin-Lambda
wants to merge
15
commits into
zig-gamedev:main
Choose a base branch
from
Logickin-Lambda:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
I am about to test these functions, so I am going to commit those for a backup.
The PlotLines() and PlotHistogram() are now tested and they can produce the exact same result from the web imgui demo.
The code is done, and testing is in sight.
As suggested by the code review, I have replaced my direct array access with a null pointer check.
Now we finally have the knobs for zgui which is based on the altschuler's imgui-knobs. Although it seemsingly works fully, I will do more tests before doing a pull request, along with put some images for the README section to demonstrate how to use the elements.
A simple example is added for knobs such that to demostrate how to create knobs for your imgui programs.
Seems like my function name was a bit different where I used snake case while the other code use camcel case, so I have unified my code to align the coding style of others.
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.
Thanks for waiting the setup of my new laptop before going back on working my proposal of porting the knob library.
As proposed in the issues, the library can be conditionally compiled by stating .with_knobs with true:
Once the knob part is included, simply call zgui.knobs.knob to create a knob:
For different knob style, resolution per step, arc shape, and color, we can apply with the additional parameter like shown:
The result based on the function call above (applied with zgui,sameLine() for the alignments):
Knobs.in.demo.mp4
Time for some code review, and let see if there are further requests to follow.