Page 1 of 1

MenuClass

Posted: Mon Jan 09, 2017 12:39 pm
by chris
The MenuClass page is missing any information on how to set a menu item as MENUTOGGLE and MX. It only describes how to read/set the currently selected state.

Re: MenuClass

Posted: Mon Jan 09, 2017 6:06 pm
by ssolie

Re: MenuClass

Posted: Mon Jan 09, 2017 6:29 pm
by chris
Not really, as that doesn't explain how to set the items as selectable. Something akin to the notes in the includes would suffice:

Code: Select all

#define MA_Toggle       (MA_Dummy + 9)
    /* (BOOL) If TRUE, the item represents an option which can be switched on
     * or off. The user will be able to toggle the state of the item between
     * checked (on) and unchecked (off), and the item will have a checkmark
     * symbol at its left side indicating its state. The actual state of the
     * item can be read at any time via the MA_Selected attribute or with the
     * MM_GETSTATE method. Defaults to FALSE.
     */

#define MA_MX           (MA_Dummy + 10)
    /* (uint32) If non-zero, the item represents an option which is mutually
     * exclusive with certain other options, that are therefore switched off
     * when this one gets switched on. The attribute's value is a bit mask
     * indicating what other items in the same menu or sub-menu panel must be
     * excluded (i.e. unselected) when the item is selected. Bit 0 represents
     * the first item, bit 1 the second one, and so on. A typical value for
     * MA_MX is ~(1 << N), with N being the bit number of the item itself:
     * that means "exclude all items except this one". A mutual exclude item
     * will have a special symbol (usually resembling a radio button) at its
     * left side indicating its state. The actual state of the item can be
     * read at any time via the MA_Selected attribute or with the MM_GETSTATE
     * method. Defaults to zero, i.e. no mutual exclusion at all.
     */
Possibly with an MX example as that can be a little confusing if you've not used it before.

Re: MenuClass

Posted: Tue Jan 10, 2017 5:56 pm
by ssolie
chris wrote:
ssolie wrote:Something akin to the notes in the includes would suffice...
If it is already documented in the includes then I think that is enough. The wiki is not meant to replace the includes.

Re: MenuClass

Posted: Tue Jan 10, 2017 6:38 pm
by chris
I don't see what the point of the wiki is, then, if it's only going to half-document something? I see why you'd want to keep the more esoteric features out of the wiki, but toggle and MX features are pretty standard. At the moment, you have to go to a different file completely to get this information, which isn't helpful if you don't have the SDK in front of you (as I didn't when I was looking for this myself).

Re: MenuClass

Posted: Fri Jan 13, 2017 12:19 am
by ssolie
chris wrote:I don't see what the point of the wiki is...
The point of the wiki is to explain what is not already explained in the includes and autodocs. Ideally, there would be direct links to the includes and autodocs but that isn't done yet.