Selected toggle button

Discuss GUI programming with the MUI Royale plugin here
Post Reply
Mazze
Posts: 69
Joined: Thu May 06, 2010 8:08 pm

Selected toggle button

Post by Mazze »

How can I create a toggle button in selected state?

I have tried
<button id="dot_tool_btn" notify="selected" toggle="true" selected="true">Dots</button>
but it renders the button in unselected state.

Regards,
Matthias
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Selected toggle button

Post by airsoftsoftwair »

This seems to be a bug. I'll fix this for the next release. Until then, you can just use mui.Set() to set the selection state.
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Selected toggle button

Post by airsoftsoftwair »

Actually, the bug is only in mapping the "true" or "false" strings to numbers, so if you just use 1 instead of "true" it should work:

Code: Select all

<button toggle="true" selected="1">Test</button>
Mazze
Posts: 69
Joined: Thu May 06, 2010 8:08 pm

Re: Selected toggle button

Post by Mazze »

Great, thanks.
Post Reply