Hi,
I am trying to get an icon for a button to changed based on whether a var is set or not. I can get it to work if @toggle is enabled for the var, but if @toggle is disabled (which is what I want) then the icon switching stops working as well.
Here is the working button code. If you swap the comments (//) on the toggle lines then the icon switching stops working. If there is a way to have the icon changing with toggle disabled that would be great!
<?xml version="1.0"?>
<button 3dborders="no" backcol="none" display="icon" icon_size="large" textcol="none">
<icon1>#DOpusBasic:copysourcedest_down</icon1>
<function type="normal">
<instruction>@toggle:if $lst:vViewPin</instruction>
<instruction>//@toggle:disable</instruction>
<instruction />
<instruction>//if var exists</instruction>
<instruction>@ifset:$lst:vViewPin</instruction>
<instruction>@set lst:vViewPin</instruction>
<instruction />
<instruction>//if var does not exist</instruction>
<instruction>@ifset:else</instruction>
<instruction>@set lst:vViewPin=on</instruction>
<instruction>@icon:copysourcedest_up,$lst:vViewPin</instruction>
</function>
</button>
Many thanks,
Ving