Skip to content
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

Allow dragging particles "Min" and "Max" values at the same time #4315

Closed
Tracked by #60036
nonunknown opened this issue Mar 31, 2022 · 4 comments · Fixed by godotengine/godot#81260
Closed
Tracked by #60036

Comments

@nonunknown
Copy link

Describe the project you are working on

Godot Kart Racing

Describe the problem or limitation you are having in your project

When you mess with particles, and want the size to be always the same value in min-max parameters you have to do manually!

Describe the feature / enhancement and how it helps to overcome the problem or limitation

the solution is a shortcut key, look the image below:

image

when the user want the both min and max to be the same he can simply HOLD ALT key and move the slider of min or max param and both will have same value!

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

  • User hold ALT key and params move at same time!

If this enhancement will not be used often, can it be worked around with a few lines of script?

Its an usability feature.

Is there a reason why this should be core and not an add-on in the asset library?

its essential to core usability!

@Calinou Calinou changed the title Usability - Move Particle params at same time Allow dragging particles "Min" and "Max" values at the same time Mar 31, 2022
@Calinou
Copy link
Member

Calinou commented Mar 31, 2022

Related to #144.

User hold ALT key and params move at same time!

One issue with Alt + mouse button actions is that it won't work on most Linux window managers by default, because they intercept Alt for window manipulation. This can be fixed by the user by changing the window manipulation key to Meta (also called Super), but window managers will probably not do this by default for a long time (if ever).

@nonunknown
Copy link
Author

never heard of the keys mentioned above, maybe holding RSHIFT or CTRL+SHIFT?

@KoBeWi
Copy link
Member

KoBeWi commented Apr 1, 2022

As a workaround, change min when increasing value and change max when decreasing. The other value will get automatically clamped.

@Calinou
Copy link
Member

Calinou commented Aug 30, 2023

We could also provide an additional way (e.g. a key modifier) to adjust min/max properties to be closer or further away from each other, so that you can effectively adjust randomness in one go.

Regarding the implementation of this proposal, we can probably add some code to EditorPropertyFloat which automatically detects whether there's a property named <name>_max when editing <name>_min and vice versa. This can be done using Object.get(property.trim_suffix("min") + "_max") then using Object.get() and checking whether the return value is a float. When this is detected, we can display a toggleable button next to the property to link property editing together. The upside of this approach is that it doesn't require dedicated programming for scripts that use exported properties following the _min/_max naming scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants