2012-12-02, 21:58
I have a bunch of radio button toggles that i want to be enabled when the skin is installed, how do i achieve this?
<condition="!StringCompare(Skin.String(nameOfString),option2) + !StringCompare(Skin.String(nameOfString),option3) + !StringCompare(Skin.String(nameOfString),option4) + !StringCompare(Skin.String(nameOfString),option5)">somethingForOption1
(2014-04-13, 19:55)Sranshaft Wrote: Could you not use <condition=IsEmpty(Skin.String(nameofString)>Option1</condition>?
<condition="IsEmpty(Skin.String(nameofString) | StringCompare(Skin.String(nameofString),option1)">Option1</condition>
<control type="button" id="1" description="TVType">
<label>- TV items type</label>
<label2>$VAR[TVTypeLabel]</label2>
<onclick condition="IsEmpty(Skin.String(TVShelfAutoItemsType))">Skin.SetString(TVShelfAutoItemsType,aired)</onclick>
<onclick condition="StringCompare(Skin.String(TVShelfAutoItemsType),aired)">Skin.Reset(TVShelfAutoItemsType)</onclick>
</control>
<variable name="TVTypeLabel">
<value condition="StringCompare(Skin.String(TVShelfAutoItemsType),aired)">recently aired</value>
<value>recently added</value>
</variable>
<control type="button" id="1" description="TVType">
<label>- TV items type</label>
<label2>$VAR[TVTypeLabel]</label2>
<onclick condition="StringCompare(Skin.String(TVShelfAutoItemsType),aired)">Skin.Reset(TVShelfAutoItemsType)</onclick>
<onclick condition="IsEmpty(Skin.String(TVShelfAutoItemsType))">Skin.SetString(TVShelfAutoItemsType,aired)</onclick>
</control>
<onclick condition="stringcompare(Skin.String(STRING),Apple)">Skin.SetString(STRING,Orange)</onclick>
<onclick condition="stringcompare(Skin.String(STRING),Banana)">Skin.SetString(STRING,Apple)</onclick>
<onclick condition="stringcompare(Skin.String(STRING),Orange)">Skin.SetString(STRING,Banana)</onclick>
<onclick condition="stringcompare(Skin.String(STRING),Apple)">Skin.SetString(STRING,Orange)</onclick>
<onclick condition="StringCompare(Skin.String(TVShelfAutoItemsType),aired)">Skin.Reset(TVShelfAutoItemsType)</onclick>
<onclick condition="IsEmpty(Skin.String(TVShelfAutoItemsType))">Skin.SetString(TVShelfAutoItemsType,aired)</onclick>
<onclick condition="StringCompare(Skin.String(TVShelfAutoItemsType),aired)">Skin.Reset(TVShelfAutoItemsType)</onclick>
# Settings button
<control type="button" id="1" description="TVType">
<label>- TV items type</label>
<label2>$VAR[TVTypeLabel]</label2>
<onclick condition="StringCompare(Skin.String(TVType),aired)">Skin.Reset(TVType)</onclick>
<onclick condition="IsEmpty(Skin.String(TVType))">Skin.SetString(TVType,aired)</onclick>
<onclick condition="StringCompare(Skin.String(TVType),aired)">Skin.Reset(TVType)</onclick>
</control>
# The label for the settings page & user-display
<variable name="TVTypeLabel">
<value condition="StringCompare(Skin.String(TVType),aired)">recently aired</value>
<value>recently added</value>
</variable>
# The user-display in the skin that implements this setting
<content>
<include condition="IsEmpty(Skin.String(TVType))">TVRecentlyAdded</include>
<include condition="StringCompare(Skin.String(TVType),aired)">TVRecentlyAired</include>
</content>
IsEmpty(Skin.String(TVType))
!IsEmpty(Skin.String(TVType))
(2014-04-16, 19:06)Hitcher Wrote:How does this address the fact that even after resetting the string, the IsEmpty() condition doesn't fire?andCode:IsEmpty(Skin.String(TVType))
for the includes.Code:!IsEmpty(Skin.String(TVType))
(2014-04-16, 19:06)Hitcher Wrote: Are the includes loaded on another window to the setting button?Yes. The includes are loaded when the items are supposed to be displayed to the user, ie in a different window outside the skin settings window.
<control type="togglebutton" id="1">
<label>- TV items type recently aired</label>
<altlabel>- TV items type recently added</altlabel>
<usealttexture>Skin.HasSetting(TVType)</usealttexture>
<onclick>Skin.SetBool(TVType)</onclick>
</control>
<content>
<include condition="Skin.HasSetting(TVType)">TVRecentlyAdded</include>
<include condition="!Skin.HasSetting(TVType)">TVRecentlyAired</include>
</content>