-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Have "changing" and "changed" signals in Range controls #6007
Comments
I would keep |
personally, I'd prefer released() as suggested in closed issue 7056 |
Is this being addressed at all? |
@Favorlock It seems nobody is currently working on this feature. Pull requests are welcome 🙂 I'd go for adding new |
I slightly updated the first post as I had this use case again but had to clarify something. It's not just about dragging |
For mouse detection I'd add Maybe we could approach this the Qt way and implement a They also define a signal called sliderMoved(value) which emits the value inconditionally and it serves to preview the changes even with tracking set to false as it would only notify a value at the end of the user interaction. |
Can I request the slider documentation be updated with the list of signals as well? I have great difficulty finding which signals are available for controls. https://docs.godotengine.org/en/3.2/classes/class_slider.html#class-slider |
I found a GDScript solution, which works fine with mouse dragging (not tested on a touchscreen though) extends VSlider
signal drag_started
signal drag_stopped
func _input(event):
if event is InputEventMouseButton:
if event.is_pressed():
emit_signal("drag_started")
else:
emit_signal("drag_stopped") reference: https://stackoverflow.com/a/51687109 |
This is going to emit even when the value didn't change. Also I'm not sure it will work properly with spinboxes. |
Currently, there is only one
value_changed
signal in Sliders, which is called continuously as the user drags the thumb. This is fine to be able to see the change as we change the value, however when the change is heavy, having it to update continuously results in lag.The idea is to have two signals then:
changing
which is called when the value changes,changed
when the user finished to drag the slider, OR, has clicked once without dragging (having also changed the value).Names aren't specially important, just pick some that make sense.
Note: I think it would also make UndoRedo easier to implement because we would know when editing finishes.
The text was updated successfully, but these errors were encountered: