36 #include "config_auto.h"
39 #ifndef GRAPHICS_DISABLED
51 toggle_value_ =
false;
52 is_check_box_entry_ =
false;
96 int tv,
bool check_box_entry,
const char* val,
98 cmd_event_ = command_event;
100 text_ =
new char[strlen(txt) + 1];
101 strncpy(text_, txt, strlen(txt));
102 text_[strlen(txt)] =
'\0';
110 toggle_value_ = tv != 0;
111 is_check_box_entry_ = check_box_entry;
116 svmn->parent_ =
this;
118 if (child_ ==
NULL) {
122 while (cur->next_ !=
NULL) { cur = cur->next_; }
133 if ((parent_ !=
NULL) && (menu_bar)) {
134 if (is_check_box_entry_) {
135 sv->
MenuItem(parent_->text_, text_, cmd_event_, toggle_value_);
136 }
else { sv->
MenuItem(parent_->text_, text_, cmd_event_); }
137 }
else if ((parent_ !=
NULL) && (!menu_bar)) {
138 if (description_ !=
NULL) { sv->
PopupItem(parent_->text_, text_,
139 cmd_event_, value_, description_);
140 }
else { sv->
PopupItem(parent_->text_, text_); }
142 if (child_ !=
NULL) { child_->
BuildMenu(sv, menu_bar);
delete child_; }
143 if (next_ !=
NULL) { next_->
BuildMenu(sv, menu_bar);
delete next_; }
146 #endif // GRAPHICS_DISABLED