ok so i have created checkboxes In XML using this code
Code:
<CheckButton name="HealthBarCheckbox" inherits="UICheckButtonTemplate" enableMouse="true" text="Health Bar (Reload Is Required)">
<Size>
<AbsDimension x="33" y="31" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="20" y="-40" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealthBarCheckbox_OnClick();</OnClick>
</Scripts>
<HighlightColor r="0.72" g="0.53" b="0.04" />
</CheckButton>
the function listed here is below if that is necessary
Code:
function HealthBarCheckbox_OnClick()
if( select(4, GetAddOnInfo("MerlinsUI_HPBar")) ) then
DisableAddOn("MerlinsUI_HPBar")
MerlinsUIRelaodAlert:Show();
else
EnableAddOn("MerlinsUI_HPBar")
MerlinsUIRelaodAlert:Show();
end
end
now My question is when the addon is enabled how to i change the graphic for the checkbox to be checked by default?
for example if addon is enabled then the box is checked even after a ui reload but if it is disabled the box is not checked.
Thanks in advance