How can I make a Button glow?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MaaaxiKing

I want a button to glow when I click it.

Have you tried using a texture button?

Sinowa-Programming | 2020-06-18 17:58

No, how do you imagine that?

MaaaxiKing | 2020-06-18 18:13

Do you mean that you want a light source on the button when clicked and it goes away when done.

Sinowa-Programming | 2020-06-18 18:48

Yes, but I want it so that the light goes over the edge of the button too.

MaaaxiKing | 2020-06-18 18:50

2d or 3d? (sorry for long response internet outage)

Sinowa-Programming | 2020-06-18 22:05

:bust_in_silhouette: Reply From: rakkarage

you can create a set of custom StyleBoxTextures that you can use to define a button in a theme or in the CustomStyles section of the button
the focus style will highlight the selected button and the pressed style will highlight the pressed button etc
example custom buttons and theme here: GitHub - rakkarage/PixelInterface: Pixel-perfect fonts and user interface elements.

The link doesn’t work :frowning:

MaaaxiKing | 2020-06-19 08:39

Sorry, today morning I couldn’t open any github websites. Now I can, but I still don’t know why it didn’t work.

MaaaxiKing | 2020-06-19 14:50

:bust_in_silhouette: Reply From: Calinou

You can use a StyleBoxFlat as a pressed style. Increase its shadow size and give it a light color such as white or yellow.