30# include "config_auto.h"
33#ifndef GRAPHICS_DISABLED
51 toggle_value_ =
false;
52 is_check_box_entry_ =
false;
60 auto *s =
new SVMenuNode(-1, txt,
false,
false);
89 const char *val,
const char *desc)
90 : text_(txt), value_(val), description_(desc) {
91 cmd_event_ = command_event;
96 toggle_value_ = tv != 0;
97 is_check_box_entry_ = check_box_entry;
102 svmn->parent_ =
this;
104 if (child_ ==
nullptr) {
108 while (cur->next_ !=
nullptr) {
121 if ((parent_ !=
nullptr) && (menu_bar)) {
122 if (is_check_box_entry_) {
123 sv->
MenuItem(parent_->text_.c_str(), text_.c_str(), cmd_event_, toggle_value_);
125 sv->
MenuItem(parent_->text_.c_str(), text_.c_str(), cmd_event_);
127 }
else if ((parent_ !=
nullptr) && (!menu_bar)) {
128 if (description_.length() > 0) {
129 sv->
PopupItem(parent_->text_.c_str(), text_.c_str(), cmd_event_, value_.c_str(),
130 description_.c_str());
132 sv->
PopupItem(parent_->text_.c_str(), text_.c_str());
135 if (child_ !=
nullptr) {
139 if (next_ !=
nullptr) {
void PopupItem(const char *parent, const char *name)
void MenuItem(const char *parent, const char *name)
SVMenuNode * AddChild(const char *txt)
void BuildMenu(ScrollView *sv, bool menu_bar=true)