Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: artium on Sat 01/09/2018 09:39:30

Title: Why does GUI button icon changes in blocking mode
Post by: artium on Sat 01/09/2018 09:39:30
This happens in AGS 3.4.1, on a project that was created from a 3.4.0 default template.

When the game is in "blocking" mode, such as if a dialog is open or the character is saying something, then button's image will look distorted.

Is this a bug or could have I done something wrong?

Button parameters:
(https://i.imgur.com/DSisxVe.png)

How it looks normally:
(https://i.imgur.com/cJiEphz.png)

How it looks with distortion:
(https://i.imgur.com/NFJMdoi.png)
Title: Re: Why does GUI button icon changes in blocking mode
Post by: Matti on Sat 01/09/2018 09:53:00
The button is not distorted, it's greyed out. In general settings under "Visual" look up "When player interface is disabled, GUIs should" and change it to "Display normally".
Title: Re: Why does GUI button icon changes in blocking mode
Post by: artium on Sat 01/09/2018 12:15:52
Thank you!

Whichever method it use for graying out, it is not working well with this sprite. I would have expected an option to provide custom sprite for this, similar to mouse over image.
Title: Re: Why does GUI button icon changes in blocking mode
Post by: Matti on Sat 01/09/2018 12:48:20
You could put this in the repeatedly_execute_always():

Code (ags) Select

if (IsInterfaceEnabled()) Button1.NormalGraphic = 1; // or whatever the button name and sprite slot number is
else                      Button1.NormalGraphic = 2; // or whatever the button name and sprite slot number is