-
-
Notifications
You must be signed in to change notification settings - Fork 13
Abilty to most precisely manage the control points in custom curve via polar coordinates and the ability to align #71
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
base: master
Are you sure you want to change the base?
Conversation
b832e8a to
197c8ac
Compare
gui/main.cpp
Outdated
| modified |= ImGui::DragFloat("##pos2x", &p1.x, 0.5, p_min, p_max); | ||
| ImGui::SameLine(0, g.Style.ItemInnerSpacing.x); | ||
| modified |= ImGui::DragFloat("##pos2y", &p1.y, 0.01, 0, 10); | ||
| ImGui::SameLine(0, g.Style.ItemInnerSpacing.x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this SameLine only be called when the Button is created? (move inside the if below)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I did amend the commit with the correction... I also addressed the line 699
|
Hey, thanks for this feature! I always felt like the whole Custom Curve mode was kind of left behind. The polar coordinate system implementation looks good! After looking at the video you attached I realized that this context window needs a bit of a UI overhaul, but that's outside the scope of this PR, and I'll leave this comment somewhere in my notes. The only thing I can suggest is to maybe put the "Magnitude" and "Angle" labels on top (like headers in a table), and then save some space by not having to add them to each line, like so:
(so like a table) Besides that, all looks fine, I'll have a second look at it once I'll be able to run the code just to validate everything. Thanks for the contribution! |
- There is an align button - There is the ability to change the the coordinates from cartesian to polar
197c8ac to
a525b34
Compare
My pleasure! Custom Curve is the one I'm using the most so I'm very happy to provide contributions like this, I hope people like it.
I'll take a look at this then, this will require quite a bit of change regarding how the widgets are grouped. I will be on it as soon as I can. |
|
Ok, changed to a grid layout. I decided not doing an amend this time in case we need to discuss further. I thought it is better and we can squash it later. Here's a video/demo: Screencast.From.2026-01-08.18-27-53.mp4 |
ead1f3f to
d35cdd7
Compare
d35cdd7 to
460a321
Compare
AndyFilter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added upper and lower bounds to DragFloats so please test if it works well for you too.
|
|
||
| struct Ex_Vec2 : ImVec2 { | ||
| bool is_locked = false; | ||
| bool use_polar_coordinates = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure whether this should be point-specific or global. Have you considered making this global, like show_custom_curve_control_points (and similar) in main.cpp? If so, what was the conclusion? If not, then please consider.
|
|
||
| debug: | ||
| @echo "Building GUI for debugging..." | ||
| $(MAKE) all CXXFLAGS='-Wall -std=c++17 -g -O0 -I External/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be better to break up the CXXFLAGS to separate the optimisation flags and modify just them. Then just build the CXXFLAGS from with the optimisation flags. In case anything will change to the compilation pipeline in the future.
Greetings!
I've been using YeetMouse's implementation of Custom Curve and I'm enjoying it a lot but if one feels limited when one tries to align the control points to achieve continuity between two segments so this merge request adds the ability to easily align.
The ability to modify the position of such control points via polar coordinates was also added. I was doubting whether or not show the angle as the scale of the axis varies independently but after some testing I think it is very useful.
Perhaps this video might better showcase the changes:
Screencast.From.2026-01-07.16-42-41.mp4
Thank you a lot.