-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Change BaseButton.keep_pressed_outside
behavior to reflect the signal emission in addition to visual appearance
#2645
Comments
See also godotengine/godot#37790. |
BaseButton.keep_pressed_outside
behavior
I don't think this is always true, I had issues with it not getting called when implementing godotengine/godot#47538, which is why I make it capture the mouse instead |
Seems like I have the same issue that they had. I still think it's incorrect for this member to only effect the visual of the button, but not the logic of it. |
@Calinou How does the logistics work for fixing bugs in Godot? Is this something that would be voted on as a team or do people just fix the issues they find and open a pr? |
Anyone can open a PR, and if it gets approved then it can get merged |
BaseButton.keep_pressed_outside
behaviorBaseButton.keep_pressed_outside
behavior to reflect the signal emission in addition to visual appearance
I think I got something working, testing on iOS. How do I recompile the engine for Android? |
See Compiling for Android in the documentation. |
Hello, I have this behaviour on my buttons but I have noticed that on moving the mouse outside the button it is not resetting the texture of the button, i.e. keep_pressed_outside is not working. However, this confused me because I created a basic sample scene with a button and it does work properly and on releasing outside the pressed button signal is not raised, which contracticts what the documentation says 'this property only affects the visual appearance... signals will still be emitted'. I think clarification on whether releasing outside raises a signal or not? Either way, I think the issue is nested container related. |
Describe the project you are working on
Mobile game template
Describe the problem or limitation you are having in your project
Pressing a button, then dragging outside the button while still pressing and then releasing outside the button causes a buttonUp anyways.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
keep_pressed_outside in BaseButton seems wrong in my opinion. In the documentation, it says: Note: This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value.
I think it should also stop signals as the name implies. Unless it's renamed keep_visually_pressed_outside or something but I have seen a few other peoples having issues with keeping buttons not pressed when you press and drag away from the button and release. They have to do weird logic to satisfy that logic.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Don't Signal button pressed when keep_pressed_outside is false and you released outside the button.
If this enhancement will not be used often, can it be worked around with a few lines of script?
It should be easy enough to change this logic and the documentations. Let me know if you want me to implement it.
Is there a reason why this should be core and not an add-on in the asset library?
It is in the core code.
The text was updated successfully, but these errors were encountered: