31 #ifndef CRAB_RADIOBUTTONMENU_H 32 #define CRAB_RADIOBUTTONMENU_H 34 #include "crab/ui/menu.h" 35 #include "crab/ui/RadioButton.h" 39 namespace pyrodactyl {
55 void load(rapidxml::xml_node<char> *node) {
56 if (nodeValid(
"desc", node))
57 _desc.load(node->first_node(
"desc"));
59 if (nodeValid(
"menu", node))
60 Menu::load(node->first_node(
"menu"));
63 void draw(
const int &xOffset = 0,
const int &yOffset = 0) {
64 _desc.draw(xOffset, yOffset);
65 Menu::draw(xOffset, yOffset);
68 int handleEvents(
const Common::Event &event,
const int &xOffset = 0,
const int &yOffset = 0) {
69 int result = Menu::handleEvents(event, xOffset, yOffset);
74 for (
int i = 0; i < (int)_element.
size(); ++i)
75 _element[i]._state = (i == result);
91 #endif // CRAB_RADIOBUTTONMENU_H
size_type size() const
Definition: array.h:315
Definition: moveeffect.h:37
Definition: HoverInfo.h:41