'Pressing' a button through code

nucky9nucky9 Posts: 2Member
edited September 17 in Programming

Hi,

I have a series of buttons in my scene. When pressed the buttons get a nice blue outline due to the default theme (see image at the end), and also deactivate (due to code I added). The problem is that when my main scene starts, I want one of the buttons to start with the pressed look (i.e. deactivated with the blue outline). I can cause the button to be deactivated without any problem, but I can't figure out a way to cause the blue outline to be activated. I've tried button.pressed = true, but that doesn't work.

So my question is two-fold:
1) Is it being in the 'pressed' state that causes the blue outline to appear around the button? What part of the theme would I need to change in order to change the colour/size of this outline?
2) How can I trigger this with code?

Thanks!

Tagged:

Tags :

Answers

Sign In or Register to comment.