Godot: Add a pressed scale parameter for BaseButton

Created on 23 Jun 2017  路  8Comments  路  Source: godotengine/godot

Operating system or device - Godot version:
ALL

Issue description:

When pressed on a button, it's common to scale up the button if no Pressed Texture is provided.

Steps to reproduce:

Link to minimal example project:

archived

Most helpful comment

...and also tween that scaling up, and tween its color, and play an animation on it, and play a sound, and rotate it a little bit... even if that was supported by StyleBoxes, you would be better served by an Animation or some script at the moment ;)

All 8 comments

...and also tween that scaling up, and tween its color, and play an animation on it, and play a sound, and rotate it a little bit... even if that was supported by StyleBoxes, you would be better served by an Animation or some script at the moment ;)

I see that a default behaviour seems to be desired. But most of the time, you will just be annoyed if additional things happen and you don't know how to turn them of if you don't want them. And as soon as you actually care about those "advanced" UI features you will investigate a lot of time anyways.
And there are a LOT of options to achieve the behaviour you want.

  • scene for a custom button which than can have as many gdScript implemented features, that even css looks old compared to it :)
  • or adding different style boxes with different expand margin values for the different states. Pressed, Hover, Normal, disabled.

For your specific issue it seems you want something really easy out of the box to save some time and still get the scaling up as a default behaviour.
In this case I propose to just load another UI theme. As I mentioned before, the Buttons are designed by different style boxes for all possible states. A theme which has a style box with bigger expand margin for the pressed state would result in what you are looking for.
any button you create would be scaled up as default behaviour.

...and there should be an anchor point option for that depending on art style. I think it's too much for default.

@volzhs
I think add anchor point for the node is a much more important feature.
Without this,scale will be weird.

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about its current status here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

@kubecz3k this was a feature request for improving the builtin state animation capabilities of StyleBoxes.

As far as I understand this issue, it's unlikely that this request will happen since as it's mentioned above Godot has all the parts that are needed and developers usually do this stuff the way it suits them.
@alexzheng do you still think the request is valid?

Archiving since there is no any real interest in the feature since creation of this issue, and there is no discussion at this point.

Was this page helpful?
0 / 5 - 0 ratings