2009-05-21, 02:47
I am trying to do a little hackery to get the effect of a toggle button with 3 states, per the below:
This actually works pretty well, except that the 3-state button is part of a larger grouplist of buttons (the Aeon menu bar if you hadn't guessed ), and turning on allowhiddenfocus causes the "hidden" buttons to get focus when you are scrolling left and right through the list. It still works, but you have to press left/right 2-3 times in order to move onto or off of the 3-state button. Anyone know a way to fix this? :confused2:
Code:
<include name="Objects_MultiplexOpacityButtons">
<control type="button" id="9988">
<include>Objects_MediaMenuButton</include>
<label>$LOCALIZE[31065]: $LOCALIZE[31052]</label>
<onclick>Skin.SetBool(multiplexopacitythin)</onclick>
<onclick>Skin.Reset(multiplexopacitythick)</onclick>
<onclick>Skin.SetString(multiplexopacitylevel,thin)</onclick>
<onclick>SetFocus(9989)</onclick>
<visible allowhiddenfocus="true">Window.IsActive(25) + Control.IsVisible(52) + ![Skin.HasSetting(multiplexopacitythin) | Skin.HasSetting(multiplexopacityfine)]</visible>
</control>
<control type="button" id="9989">
<include>Objects_MediaMenuButton</include>
<label>$LOCALIZE[31065]: $LOCALIZE[31053]</label>
<onclick>Skin.SetBool(multiplexopacityfine)</onclick>
<onclick>Skin.Reset(multiplexopacitythin)</onclick>
<onclick>Skin.SetString(multiplexopacitylevel,fine)</onclick>
<onclick>SetFocus(9990)</onclick>
<visible allowhiddenfocus="true">Window.IsActive(25) + Control.IsVisible(52) + Skin.HasSetting(multiplexopacitythin)</visible>
</control>
<control type="button" id="9990">
<include>Objects_MediaMenuButton</include>
<label>$LOCALIZE[31065]: $LOCALIZE[386]</label>
<onclick>Skin.SetBool(multiplexopacitythick)</onclick>
<onclick>Skin.Reset(multiplexopacityfine)</onclick>
<onclick>Skin.SetString(multiplexopacitylevel,thick)</onclick>
<onclick>SetFocus(9988)</onclick>
<visible allowhiddenfocus="true">Window.IsActive(25) + Control.IsVisible(52) + Skin.HasSetting(multiplexopacityfine)</visible>
</control>
</include>
This actually works pretty well, except that the 3-state button is part of a larger grouplist of buttons (the Aeon menu bar if you hadn't guessed ), and turning on allowhiddenfocus causes the "hidden" buttons to get focus when you are scrolling left and right through the list. It still works, but you have to press left/right 2-3 times in order to move onto or off of the 3-state button. Anyone know a way to fix this? :confused2: