Is there a way to disable button WITHOUT shading to grey?

I am using buttons in my game that have an image on them (dice). I want them disabled until they are playable however I do not want them to be grey’d out. Is there a way to do this without adding a ton of blocks?

1 Like

You will evidently need a few more blocks, but not a ton.

The idea is that, instead of disabling the button, you set a global variable, let’s call it “enable_button” and set it by default to true. When the button needs disabling, you set that variable to false instead of actually disabling the button.
Then in the button.click event block, you enclose ALL of the processing in a conditional block “if enable_button do”.
If the user clicks the button when enabled, which is the default, it work normally. But when “enable_button” is false, then the logic skips everything that the button would be doing, so is effectively defeated. You still can click it, but there will be zero effect.
Until “enable_button” is returned to true.

3 Likes

I kinda figured I’d have to do that LOL. I just figured I’d put it out there in case I missed a setting or something. Thanks.

1 Like

Hi,

On the scrButtons screen, you will find the Disabled button, which is not pressed or turned gray.

https://x.thunkable.com/projects/5cd84f23e3097f3353fdad45/project/properties/designer/

2 Likes

What a great idea!
It helped me!
Thanks! :smile:

1 Like

I am not finding the blocks used to do that?

1 Like

Everything is very simple - you need to cover the button with a transparent cover:

  1. Add a Column1 size to the project and insert a button into it.
  2. Add another Column2 to Column1 (in front of the button) and make its background red
  3. On the Advanved tab for Column2, set the position = absolute property, and in the Start block add Column2.width = 100% and Column.height = 100% blocks

Run the project. If the red Column2 covered the button, then set instead of the red color for Column2 a transparent background.

2 Likes