x


Gui.Enable transperancy

I am disabling my GUI, although i dont want the textures to be transparent. The manual1 does describe the behaviour clearly, but can i counter it?

more ▼

asked Apr 01 '10 at 01:51 PM

Tijmen gravatar image

Tijmen
3 1 1 4

A little more specific and you will get an answer.

Apr 01 '10 at 06:10 PM KHopcraft
(comments are locked)
10|3000 characters needed characters left

4 answers: sort voted first

A similar question was posted here a few days ago. Some of the suggestions there include:

  • using guiText/guiTextures
  • switching your text fields to use the GUI.Label style (ie non-interactive)
  • catching input before calling the GUI

Hopefully it will be useful to you.

more ▼

answered Apr 16 '10 at 02:06 AM

straydogstrut gravatar image

straydogstrut
1.2k 29 38 60

(comments are locked)
10|3000 characters needed characters left

Found a nice solution to this, looks like the behavior is not to hardcode alpha to .5, but to multiply it by .5. Therefore, setting the color to (1,1,1,2) results in the same color after this hardcoded math is done. So, for disabled controls, just do

GUI.color = new Color(1,1,1,2);

and set it back when done and your control's appearance will not change. Least it's working for me in the editor so far.

more ▼

answered Jun 07 '10 at 08:08 PM

RElam 1 gravatar image

RElam 1
80 4 4 8

(comments are locked)
10|3000 characters needed characters left

As far as I know, this is hard-coded behavior and can't be changed.

more ▼

answered Apr 02 '10 at 01:13 AM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

(comments are locked)
10|3000 characters needed characters left

You can specify how GUI elements should behave in which situations by creating your own guiskin, or modifying an existing one. Look up "GUISkin" in the help.

more ▼

answered Apr 01 '10 at 09:11 PM

Lucas Meijer 1 gravatar image

Lucas Meijer 1 ♦♦
8k 19 43 85

Are you sure about that? Because there are no settings I can find that override the "make all controls semi-transparent when GUI.enabled == false" behavior.

Apr 02 '10 at 01:14 AM Eric5h5

I thought it the transparency was just part of the texture used. I might be wrong, will have to look it up.

Apr 02 '10 at 11:17 AM Lucas Meijer 1 ♦♦
(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:

x3695
x216
x178
x135

asked: Apr 01 '10 at 01:51 PM

Seen: 2696 times

Last Updated: Apr 01 '10 at 01:51 PM