x


set a skin to "on" state programatically

Hi,

I would like to set the style of a gui component to "on" but I fail to find how I can achieve that by code. This is not a button or toggle, and I have to set it via code not via user input.

I looked at GUIStyle.Draw help section. It seems to give options to set the on state but I do not understand nor find examples on how to use this function.

Thanks for your input.

Bye,

Jean

more ▼

asked Nov 02 '10 at 05:53 AM

Jean Fabre gravatar image

Jean Fabre
3.1k 68 75 103

I would love to see this answered. I would like to make ButtonB go to its "on normal" state when the mouse is over ButtonA.

May 27 '11 at 04:54 AM jahroy
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Looking for an answer to the same question...

more ▼

answered Mar 21 '11 at 05:29 PM

v2k gravatar image

v2k
14 2 2 4

Should have been a comment really... create an answer if you actually have the answer :)

Mar 23 '11 at 07:59 AM Jean Fabre

ah indeed. oops!

May 09 '11 at 06:12 PM v2k
(comments are locked)
10|3000 characters needed characters left

I've had the same issue in the past and I ended up writing a class customized to my needs with toggle buttons. However, depending on your end goal, the GUI.Toolbar might work out for you. Here's a link: GUI.Toolbar

more ▼

answered May 27 '11 at 05:23 AM

GlennHeckman gravatar image

GlennHeckman
335 7 10 19

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x111
x54
x4

asked: Nov 02 '10 at 05:53 AM

Seen: 1091 times

Last Updated: May 27 '11 at 05:23 AM