kmartin7
08-25-2004, 02:04 PM
I have the following code in the onClick event for a label:
isChecked = Button.GetState("checkbox");
if (isChecked ~=true) then
Audio.ToggleMute(CHANNEL_BACKGROUND);
Button.SetState("checkbox", BTN_DOWN);
isChecked = true;
else
Audio.ToggleMute(CHANNEL_BACKGROUND);
Button.SetState("checkbox", BTN_UP);
isChecked = false;
end
I am trying to allow the user to click on the label and set an associated button's (checkbox) state. When I click on the label, the background music toggles like it should, and changes the button state to BTN_DOWN, but when I click it again, the music toggles but the button state does NOT change. Any ideas?
Kurt
isChecked = Button.GetState("checkbox");
if (isChecked ~=true) then
Audio.ToggleMute(CHANNEL_BACKGROUND);
Button.SetState("checkbox", BTN_DOWN);
isChecked = true;
else
Audio.ToggleMute(CHANNEL_BACKGROUND);
Button.SetState("checkbox", BTN_UP);
isChecked = false;
end
I am trying to allow the user to click on the label and set an associated button's (checkbox) state. When I click on the label, the background music toggles like it should, and changes the button state to BTN_DOWN, but when I click it again, the music toggles but the button state does NOT change. Any ideas?
Kurt