My menu API allows for you to specify an argument of whether you want a checkbox/collapsable menu/clickable toggle/key toggle =)
I think it's pretty elegant for a menu API
BaseMenu menu("Combat Arms Hacks"); // This makes a menu with the title being Combat Arms Hacks
MenuFolder folder("Direct X", TOGGLE_MOUSE | TOGGLE_KEYBOARD); // This makes the menu expandable/collapsable and allows the user to toggle the folder via clicking or hitting the right/left keys.
MenuItem showFps("Show FPS", MENU_CHECKBOX, TOGGLE_MOUSE | TOGGLE_KEYBOARD, &MyShowFPSCallback); // This makes a MenuItem that has a checkbox to show whether it's toggled or not, and when it's clicked or the right/left key is pressed it'll call the MyShowFPSCallback with a bool stating whether it's on or off.