Quick Radio Button Question...
#1
I've had a look in the Wiki but it doesn't seem to be mentioned... Is it possible for a radio button to be different colours depending on whether it's focused or not?

E.g.

blue when it's focused...

Image


and white when a different button is focused...

Image


Also, can I use a diffuse to determine the colour, that way when I go on to add colour schemes all the colours will change easily (i guess this applies to things like slider controls and spin controls as well).

Thanks
 
Reply
#2
It's possible with variables but not everywhere (e.g. settings) because you need the control id.

Example
PHP Code:
<variable name="RadioButtonTextureOn">
    <
value condition="Control.HasFocus(id)">myradiobuttonon-fo.png</value>
    <
value>myradiobuttonon-nf.png</value>
</
variable
Image
Reply
#3
Thanks 'Black, so then the code for the button would like this right?


PHP Code:
<textureradiofocus>$VAR[RadioButtonOn]</textureradiofocus>
<
textureradionofocus>$VAR[RadioButtonOff]</textureradionofocus

 
Reply
#4
Almost but it has to be textureradioon / textureradioff.

PHP Code:
<textureradioon>$VAR[RadioButtonOn]</textureradioon>
<
textureradiooff>$VAR[RadioButtonOff]</textureradiooff
Image
Reply
#5
(2012-11-12, 19:16)Eddage Wrote: Also, can I use a diffuse to determine the colour, that way when I go on to add colour schemes all the colours will change easily (i guess this applies to things like slider controls and spin controls as well).

Not at the moment but I hope it's something the devs consider adding. I've run into the same issue with Immersive and it'd be really nice to be able to reuse the same textures for all color schemes.

Reply
#6
Not quite what you're after but along the same lines -

added <disabledColorDiffuse> so textures can be faded when not enabled
Reply
#7
(2012-11-13, 10:35)Hitcher Wrote: Not quite what you're after but along the same lines -

added <disabledColorDiffuse> so textures can be faded when not enabled

Ugh,...wouldn't adding colordiffuse to each texture tag instead of the control itself be the preferred route? I know I brought up the suggestion before and I think Pieh was in agreement but I guess that idea got lost in ether.

Good to know about the new tag though. Thanks Hitcher.

Edit: I see you also suggested it. Tongue

Reply

Logout Mark Read Team Forum Stats Members Help
Quick Radio Button Question...0