Godot: Button released() signal not working

Created on 11 May 2016  Â·  14Comments  Â·  Source: godotengine/godot

Button released() signal is not working.
Also the same for TextureButton.

Using git commit 7b471068cf8e4d166d8b0569b489f595213c3b52 under Mageia 5 (Linux x64)

documentation junior job core

Most helpful comment

how about button_up / button_down signals, and then leave pressed as it is?
that should make "release" less confusing
won't change now for compatibility but could be fixed for 3.0

On Fri, Jun 17, 2016 at 5:11 PM, George Marques [email protected]
wrote:

I'm okay with keeping behavior and documenting, but it will go to my list
of confusing API names that I will always complain...

IMO button_down/button_up instead of pressed/released is way simpler and
unambiguous. And to use clicked as what is currently pressed since
there's already "Click on press" option, so it's easier to see that the
clicked signal will be emitted on press.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4625#issuecomment-226869853,
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z2-4dOKNH9tA5YDSC4VrcJiwrTDjcks5qMv9ygaJpZM4IcRV0
.

All 14 comments

I can reproduce it with 7b47106 too, and with Godot 2.0.2, on Mageia 6 (Linux x64).

It's supposed to be emitted here: https://github.com/godotengine/godot/blob/4a4f247/scene/gui/base_button.cpp#L88-L91
But obviously that doesn't work.

The released signal is only emitted when the button is in "click on press" mode, since it's just the same as pressed otherwise

same problem with official 2.0.2stable win64
( i'm just adding this useless message to be sure to receive further github notifications about this issue since I had to use the "click on press" mode workaround )

This is not a bug, if you want to receive pressed/released combo you have
to use the click on press mode. Buttons by default emit pressed when
released otherwise.

On Wed, May 11, 2016 at 8:15 PM, SuperUserNameMan [email protected]
wrote:

same problem with official 2.0.2stable win64
( i'm just adding this useless message to be sure to receive further
github notifications about this issue since I had to use the "click on
press" mode workaround )

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/godotengine/godot/issues/4625#issuecomment-218617619

Then I'd say it's not a bug, but it dearly needs to be documented, as the name of the signal is a bit misleading. As an end user I'd expect my button to emit released when released, not only if using a specific mode. Even by reading the source code I couldn't really understand what released was meant to be used with, as this class is full of various states with similar names I got me confused :p

I swear there was already an issue about this, with the same conclusion. I can't find it...

Can't the button send both signals when released? Also, IMO "Click on press" should be default.

When would you not want to get a released signal when a button is released?

Can't the button send both signals when released?

+1

@reduz, @punto-: Any objection to doing that?

I don't know, I think it would be the same to make it emit both together than not emitting it. People would then complain about why both pressed and released happen at the same time.. I vote for closing this and make sure this is well documented

I'm okay with keeping behavior and documenting, but it will go to my list of confusing API names that I will always complain...

IMO button_down/button_up instead of pressed/released is way simpler and unambiguous. And to use clicked as what is currently pressed since there's already "Click on press" option, so it's easier to see that the clicked signal will be emitted on press.

how about button_up / button_down signals, and then leave pressed as it is?
that should make "release" less confusing
won't change now for compatibility but could be fixed for 3.0

On Fri, Jun 17, 2016 at 5:11 PM, George Marques [email protected]
wrote:

I'm okay with keeping behavior and documenting, but it will go to my list
of confusing API names that I will always complain...

IMO button_down/button_up instead of pressed/released is way simpler and
unambiguous. And to use clicked as what is currently pressed since
there's already "Click on press" option, so it's easier to see that the
clicked signal will be emitted on press.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/4625#issuecomment-226869853,
or mute the thread
https://github.com/notifications/unsubscribe/AF-Z2-4dOKNH9tA5YDSC4VrcJiwrTDjcks5qMv9ygaJpZM4IcRV0
.

Fixed in de8cc30.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karroffel picture karroffel  Â·  144Comments

ghost picture ghost  Â·  105Comments

nunodonato picture nunodonato  Â·  143Comments

Angluca picture Angluca  Â·  100Comments

diiiiiiiii picture diiiiiiiii  Â·  87Comments