It's Possible to modify default.xml adding Variables OR <textureradioon> with VAR?
#1
Goodmorning,
I wanted today to use a variable to change the default "radiobutton" images that are included into default.xml
I tried with the use of a variable so after the <textureradiofocus>$VAR[BUTTONRADIO] but without any success.
The texture path is defined inside the include file in the most simple way i think:
<variable  name="BUTTONRADIO">
<value>path/file.png</value>
</variable>

but with those information instead of see the image that i defined i don't see the texture at all
obviously the main point is to make use of conditions in order to display a different image if the criteria are true.

Some suggestion?
Thanks in advance
Reply
#2
Maybe it's because <textureradiofocus> is not a correct control tag for a radio button control?  See the Wiki for the tags you can use.
Reply
#3
(2018-12-17, 16:32)JackTirol Wrote: Maybe it's because <textureradiofocus> is not a correct control tag for a radio button control?  See the Wiki for the tags you can use.
 mhmmm this is quiet interesting it's <textureradioonfocus> and not <textureradiofocus>

strangely the control works: i mean if i modify the <textureradiofocus> with a different path i can see displayed the image but, as we said, not if i use a variable.
I will try by changing it on <textureradioonfocus> as the wiki say and see if in that way i can use a Var for the path.

Tried by changing <textureradiofocus> with <textureradioonfocus>$VAR[nameofthevariable]</textureradioonfocus>
but the new variable seems like if doesn't work. No image displayed show up.
Tried also with <textureradioon>
Same problem.

Seems more a problem by using the variable for the path/file.png instead of a problem of how it's code
Quote:    <default type="radiobutton">
        <posx>0</posx>
        <posy>0</posy>
        <width>120</width>
        <height>76</height>
        <radiowidth>120</radiowidth>
        <radioheight>76</radioheight>
        <align>center</align>
        <aligny>center</aligny>
        <font>Font-Condensed-S32</font>
        <label></label>
        <textcolor>grey</textcolor>
        <focusedcolor>blue</focusedcolor>
        <disabledcolor>black</disabledcolor>
        <textureradioonfocus>buttons/radio/radio-button-fo.png</textureradioonfocus>
        <textureradionofocus>buttons/radio/radio-button-nf.png</textureradionofocus>
        <textureradioondisabled></textureradioondisabled>
        <textureradiooffdisabled></textureradiooffdisabled>
        <textoffsetx>5</textoffsetx>
        <pulseonselect>false</pulseonselect>
    </default>
This is the code inside. Changing manually the file on textureradioonfocus i obtain exactly what i want but for some kind of reason, if instead of the path i put $VAR[variablename], the variable image doesn't appear.
As far as i can guess seems more a problem about reading the variable inside the field textureradioon. Or maybe for some kind of reason the variable doesn't get used from the default.xml file
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
It's Possible to modify default.xml adding Variables OR <textureradioon> with VAR?00