(2016-12-21, 23:10)RyeHumor Wrote: I too am working with variables. But I'm new, trying to figure how to set and use them. Rather than using <variable> I am doing things like:
<onclick condition="!Player.HasVideo">Skin.ToggleSetting(RyeBSValue)</onclick>
I'm storing my variables in my settings.xml using commands like onclick, onfocus ondasher, and ondancer ETC.
I'm using them in the usual way:<visible>Skin.HasSetting(RyeBSValue)
I'm really new to this but could this work for you? As a newbie, I don't see why <variable> is needed.
What you're doing is just straight conditions. As the name implies, variables are useful for being variable... A basic example would be, let's say I have designed a view and I want this view to be in multiple areas of the skin (Movies, Music, Programs) but certain elements need to change depending on area. Let's say I have a label that says "About This Movie:" just before the plot but I need to have it so it changes to "About This Album:" when in Music. Rather than having to have two separate label controls with visible tags to determine when they appear I can have a single label control that references a variable.
Also, what you appear to be doing there has nothing to do with variables.
Here is my basic example in actual code for you, maybe it'll help in some way:
<control type="label">
<left>100</left>
<top>580</top>
<width>560</width>
<height>20</height>
<align>left</align>
<aligny>center</aligny>
<font>font_18</font>
<textcolor>ff5aabdf</textcolor>
<shadowcolor>black</shadowcolor>
<label>$VAR[ABOUTTHISITEM]</label>
</control>
<variable name="ABOUTTHISITEM">
<value condition="Window.IsVisible(Movies)">About This Movie:</value>
<value condition="Window.IsVisible(Music)">About This Album:</value>
<value></value>
<variable>
If you have any direct questions, feel free to shoot me a PM.