30 gui::menu(true, max_height, -1, &
gui::menu::bluebg_style),
34 chosen_topic_(nullptr),
35 selected_item_(&toplevel, 0)
51 if (sec.
id !=
"toplevel" &&
expanded_.insert(&sec).second) {
77 for (
const auto &
t : sec.
topics) {
86 topic_list::const_iterator tit =
88 if (tit != sec.
topics.end()) {
91 if (
t.id.size()<2 ||
t.id[0] !=
'.' ||
t.id[1] !=
'.')
112 for (std::vector<visible_item>::const_iterator it =
visible_items_.begin();
134 if (sec !=
nullptr) {
167 std::vector<gui::indented_menu_item> menu_items;
168 utils::optional<std::size_t>
selected;
169 for(std::vector<visible_item>::const_iterator items_it =
visible_items_.begin(),
173 menu_items.push_back(items_it->get_menu_item(*
this));
179 t(nullptr), sec(_sec),
level(lev) {}
182 t(_t), sec(nullptr),
level(lev) {}
188 return {
level, img, sec->title};
197 return sec !=
nullptr && *sec == _sec;
202 return t !=
nullptr && *
t == _t;
207 return t == vis_item.
t && sec == vis_item.
sec;
const std::string menu_expand
const std::string menu_contract
const std::string open_section_img
bool is_visible_id(const std::string &id)
const std::string closed_section_img
const std::string topic_img
help::section default_toplevel
const topic * find_topic(const section &sec, const std::string &id)
Search for the topic with the specified identifier in the section and its subsections.
uint32_t get_mouse_state(int *x, int *y)
A wrapper for SDL_GetMouseState that gives coordinates in draw space.
void play_UI_sound(const std::string &files)
A section contains topics and sections along with title and ID.
A topic contains a title, an id and some text.
static map_location::DIRECTION s