The Battle for Wesnoth  1.17.0-dev
mp_join_game.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 2021
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #define GETTEXT_DOMAIN "wesnoth-lib"
16 
18 
19 #include "chat_log.hpp"
20 #include "font/text_formatting.hpp"
21 #include "formatter.hpp"
22 #include "formula/string_utils.hpp"
23 #include "game_config.hpp"
24 #include "game_config_manager.hpp"
26 #include "gettext.hpp"
28 #include "gui/core/timer.hpp"
33 #include "gui/widgets/button.hpp"
34 #include "gui/widgets/chatbox.hpp"
35 #include "gui/widgets/image.hpp"
36 #include "gui/widgets/label.hpp"
37 #include "gui/widgets/listbox.hpp"
41 #include "log.hpp"
42 #include "mp_ui_alerts.hpp"
44 #include "saved_game.hpp"
45 #include "statistics.hpp"
46 #include "units/types.hpp"
47 #include "utils/scope_exit.hpp"
48 #include "wesnothd_connection.hpp"
49 
50 static lg::log_domain log_mp_connect_engine("mp/connect/engine");
51 #define DBG_MP LOG_STREAM(debug, log_mp_connect_engine)
52 #define LOG_MP LOG_STREAM(info, log_mp_connect_engine)
53 #define WRN_MP LOG_STREAM(warn, log_mp_connect_engine)
54 #define ERR_MP LOG_STREAM(err, log_mp_connect_engine)
55 
56 namespace gui2::dialogs
57 {
58 
59 REGISTER_DIALOG(mp_join_game)
60 
61 mp_join_game::mp_join_game(saved_game& state, wesnothd_connection& connection, const bool first_scenario, const bool observe_game)
62  : level_()
63  , state_(state)
64  , network_connection_(connection)
65  , update_timer_(0)
66  , first_scenario_(first_scenario)
67  , observe_game_(observe_game)
68  , stop_updates_(false)
69  , player_list_(nullptr)
70  , flg_dialog_(nullptr)
71 {
72  set_show_even_without_video(true);
73 }
74 
76 {
77  if(update_timer_ != 0) {
79  update_timer_ = 0;
80  }
81 }
82 
83 /*
84  * Fetch the selected game's config from the server and prompts an initial faction selection.
85  */
87 {
88  // Ask for the next scenario data, if applicable
89  if(!first_scenario_) {
90  network_connection_.send_data(config("load_next_scenario"));
91  }
92 
93  bool has_scenario_and_controllers = false;
94  while(!has_scenario_and_controllers) {
95  config revc;
96 
99 
101  });
102 
103  if(const config& err = revc.child("error")) {
104  throw wesnothd_error(err["message"]);
105  } else if(revc.child("leave_game")) {
106  return false;
107  } else if(config& next_scenario = revc.child("next_scenario")) {
109  } else if(revc.has_attribute("version")) {
110  level_.swap(revc);
111 
112  has_scenario_and_controllers = true;
113  } else if(config& controllers = revc.child("controllers")) {
114  int index = 0;
115  for(const config& controller : controllers.child_range("controller")) {
116  if(config& side = get_scenario().child("side", index)) {
117  side["is_local"] = controller["is_local"];
118  }
119  ++index;
120  }
121 
122  has_scenario_and_controllers = true;
123  }
124  }
125 
126  if(level_["started"].to_bool()) {
128  return true;
129  }
130 
131  if(first_scenario_) {
132  state_.clear();
134 
135  // Make sure that we have the same config as host, if possible.
137  }
138 
140 
141  // If we're just an observer, we don't need to find an appropriate side and set faction selection
142  if(observe_game_) {
143  return true;
144  }
145 
146  // Search for an appropriate vacant slot. If a description is set (i.e. we're loading from a saved game),
147  // then prefer to get the side with the same description as our login. Otherwise just choose the first
148  // available side.
149  const config* side_choice = nullptr;
150 
151  int side_num_choice = 1, side_num_counter = 1;
152  for(const config& side : get_scenario().child_range("side")) {
153  // TODO: it can happen that the scenario specifies that the controller
154  // of a side should also gain control of another side.
155  if(side["controller"] == "reserved" && side["current_player"] == preferences::login()) {
156  side_choice = &side;
157  side_num_choice = side_num_counter;
158  break;
159  }
160 
161  if(side["controller"] == "human" && side["player_id"].empty()) {
162  if(!side_choice) { // Found the first empty side
163  side_choice = &side;
164  side_num_choice = side_num_counter;
165  }
166 
167  if(side["current_player"] == preferences::login()) {
168  side_choice = &side;
169  side_num_choice = side_num_counter;
170  break; // Found the preferred one
171  }
172  }
173 
174  if(side["player_id"] == preferences::login()) {
175  // We already own a side in this game
176  return true;
177  }
178 
179  ++side_num_counter;
180  }
181 
182  if(!side_choice) {
183  observe_game_ = true;
184  return true;
185  }
186 
187  // If the client is allowed to choose their team, do that here instead of having it set by the server
188  if((*side_choice)["allow_changes"].to_bool(true)) {
189  if(!show_flg_select(side_num_choice, true)) {
190  return false;
191  }
192  }
193 
194  return true;
195 }
196 
197 static std::string generate_user_description(const config& side)
198 {
199  // Allow the host to override, since only the host knows the ai_algorithm.
200  if(const config::attribute_value* desc = side.get("user_description")) {
201  return desc->str();
202  }
203 
204  const std::string controller_type = side["controller"].str();
205  const std::string reservation = side["current_player"].str();
206  const std::string owner = side["player_id"].str();
207 
208  if(controller_type == "ai") {
209  return _("Computer Player");
210  } else if(controller_type == "null") {
211  return _("Empty slot");
212  } else if(controller_type == "reserved") {
213  return VGETTEXT("Reserved for $playername", {{"playername", reservation}});
214  } else if(owner.empty()) {
215  return _("Vacant slot");
216  } else if(controller_type == "human" || controller_type == "network") {
217  return owner;
218  } else {
219  return _("empty");
220  }
221 }
222 
224 {
225  window.set_enter_disabled(true);
226  window.set_escape_disabled(true);
227 
228  //
229  // Set title
230  //
231  label& title = find_widget<label>(&window, "title", false);
232  // FIXME: very hacky way to get the game name...
233  title.set_label((formatter() << level_.child("multiplayer")["scenario"] << " " << font::unicode_em_dash << " " << get_scenario()["name"].t_str()).str());
234 
235  //
236  // Set up sides list
237  //
239 
240  //
241  // Initialize chatbox and game rooms
242  //
243  chatbox& chat = find_widget<chatbox>(&window, "chat", false);
244 
246 
247  chat.room_window_open(N_("this game"), true, false);
248  chat.active_window_changed();
249  chat.load_log(default_chat_log, false);
250 
251  //
252  // Set up player list
253  //
254  player_list_.reset(new player_list_helper(&window));
255 
256  //
257  // Set up the network handling
258  //
260 
261  //
262  // Set up the Lua plugin context
263  //
264  plugins_context_.reset(new plugins_context("Multiplayer Join"));
265 
266  plugins_context_->set_callback("launch", [&window](const config&) { window.set_retval(retval::OK); }, false);
267  plugins_context_->set_callback("quit", [&window](const config&) { window.set_retval(retval::CANCEL); }, false);
268  plugins_context_->set_callback("chat", [&chat](const config& cfg) { chat.send_chat_message(cfg["message"], false); }, true);
269 }
270 
271 bool mp_join_game::show_flg_select(int side_num, bool first_time)
272 {
273  if(const config& side_choice = get_scenario().child("side", side_num - 1)) {
274  if(!side_choice["allow_changes"].to_bool(true)) {
275  return true;
276  }
277 
278  const config& era = level_.child("era");
279  if(!era) {
280  ERR_MP << "no era information\n";
281  return false;
282  }
283 
284  config::const_child_itors possible_sides = era.child_range("multiplayer_side");
285  if(possible_sides.empty()) {
286  WRN_MP << "no [multiplayer_side] found in era '" << era["id"] << "'.\n";
287  return false;
288  }
289 
290  const std::string color = side_choice["color"].str();
291 
292  std::vector<const config*> era_factions;
293  //make this safe against changes to level_ that might make possible_sides invalid pointers.
294  config era_copy;
295  for(const config& side : possible_sides) {
296  config& side_new = era_copy.add_child("multiplayer_side", side);
297  era_factions.push_back(&side_new);
298  }
299 
300  const bool is_mp = state_.classification().is_normal_mp_game();
301  const bool lock_settings = get_scenario()["force_lock_settings"].to_bool(!is_mp);
302  const bool use_map_settings = level_.child("multiplayer")["mp_use_map_settings"].to_bool();
303  const mp_game_settings::SAVED_GAME_MODE saved_game = level_.child("multiplayer")["savegame"].to_enum<mp_game_settings::SAVED_GAME_MODE>(mp_game_settings::SAVED_GAME_MODE::NONE);
304 
305  ng::flg_manager flg(era_factions, side_choice, lock_settings, use_map_settings, saved_game == mp_game_settings::SAVED_GAME_MODE::MIDGAME);
306 
307  {
308  gui2::dialogs::faction_select flg_dialog(flg, color, side_num);
309  flg_dialog_ = &flg_dialog;
310  ON_SCOPE_EXIT(this) {
311  flg_dialog_ = nullptr;
312  };
313 
314  if(!flg_dialog.show() && !first_time) {
315  return true;
316  }
317  }
318 
319  config faction;
320  config& change = faction.add_child("change_faction");
321  change["change_faction"] = true;
322  change["name"] = preferences::login();
323  change["faction"] = flg.current_faction()["id"];
324  change["leader"] = flg.current_leader();
325  change["gender"] = flg.current_gender();
326  // TODO: the host cannot yet handle this and always uses the first side owned by that player.
327  change["side_num"] = side_num;
328 
330  }
331 
332  return true;
333 }
334 
336 {
337  if(stop_updates_) {
338  return;
339  }
340 
341  tree_view& tree = find_widget<tree_view>(get_window(), "side_list", false);
342 
343  tree.clear();
344  team_tree_map_.clear();
345  const std::map<std::string, string_map> empty_map;
346 
347  int side_num = 0;
348  for(const auto& side : get_scenario().child_range("side")) {
349  ++side_num;
350  if(!side["allow_player"].to_bool(true)) {
351  continue;
352  }
353 
354  // Check to see whether we've added a toplevel tree node for this team. If not, add one
355  if(team_tree_map_.find(side["team_name"].str()) == team_tree_map_.end()) {
356  std::map<std::string, string_map> data;
358 
359  item["label"] = t_string::from_serialized(side["user_team_name"]);
360  data.emplace("tree_view_node_label", item);
361 
362  tree_view_node& team_node = tree.add_node("team_header", data);
363  team_node.add_sibling("side_spacer", empty_map);
364 
365  team_tree_map_[side["team_name"].str()] = &team_node;
366  }
367 
368  std::map<std::string, string_map> data;
370 
371  const std::string color = !side["color"].empty() ? side["color"] : side["side"].str();
372 
373  item["label"] = (formatter() << "<span color='" << font::get_pango_color_from_id(color) << "'>" << side["side"] << "</span>").str();
374  data.emplace("side_number", item);
375 
376  std::string leader_image = ng::random_enemy_picture;
377  std::string leader_type = side["type"];
378  std::string leader_gender = side["gender"];
379  std::string leader_name;
380 
381  // If there is a unit which can recruit, use it as a leader.
382  // Necessary to display leader information when loading saves.
383  for(const config& side_unit : side.child_range("unit")) {
384  if(side_unit["canrecruit"].to_bool()) {
385  leader_type = side_unit["type"].str();
386  leader_gender = side_unit["gender"].str();
387  break;
388  }
389  }
390 
391  if(const unit_type* ut = unit_types.find(leader_type)) {
392  const unit_type& type = ut->get_gender_unit_type(leader_gender);
393 
394  leader_image = formatter() << type.image() << "~RC(" << type.flag_rgb() << ">" << color << ")";
395  leader_name = type.type_name();
396  }
397 
398  item["label"] = leader_image;
399  data.emplace("leader_image", item);
400 
401  std::string description = generate_user_description(side);
402  if(!leader_name.empty()) {
403  description += formatter() << " (<i>" << leader_name << "</i>)";
404  }
405 
406  item["label"] = description;
407  data.emplace("leader_type", item);
408 
409  item["label"] = (formatter() << "<span color='#a69275'>" << side["faction_name"] << "</span>").str();
410  data.emplace("leader_faction", item);
411 
412  std::string gender_icon = "icons/icon-random.png";
413  if(leader_gender != "null") {
414  gender_icon = formatter() << "icons/icon-" << leader_gender << ".png";
415  item["tooltip"] = leader_gender;
416  }
417 
418  item["label"] = gender_icon;
419  data.emplace("leader_gender", item);
420 
421  item.clear();
422 
423  // Don't show gold for saved games
424  // TODO: gold icon
425  if(side["allow_changes"].to_bool()) {
426  item["label"] = side["gold"].str() + " " + _("Gold");
427  data.emplace("side_gold", item);
428  }
429 
430  const int income_amt = side["income"];
431  if(income_amt != 0) {
432  const std::string income_string = formatter() << (income_amt > 0 ? "+" : "") << income_amt << " " << _("Income");
433 
434  item["label"] = income_string;
435  data.emplace("side_income", item);
436  }
437 
438  tree_view_node& node = team_tree_map_[side["team_name"].str()]->add_child("side_panel", data);
439 
440  grid& row_grid = node.get_grid();
441 
442  auto* select_leader_button = find_widget<button>(&row_grid, "select_leader", false, false);
443  if(select_leader_button) {
444  if(side["player_id"] == preferences::login() && side["allow_changes"].to_bool(true)) {
445  //
446  // Small wrapper function in order to set the handled and halt parameters and prevent
447  // crashes in case the dialog closes and the original button to which the callback was
448  // bound had already been destroyed. The other use of show_flg_select doesn't need these
449  // parameters, so it's easier not to declare them as function arguments.
450  //
451  const auto handler = [this, side_num](bool& handled, bool& halt) {
452  show_flg_select(side_num);
453  // note: this function is called from a std::function object stored in the widget
454  // and show_flg_select which internally calls
455  // show_dialog -> pump -> ... -> network_handler -> ... -> generate_side_list
456  // might destroy that std::function object while it is executed, this means that
457  // using the captured variables 'this' and 'side_num' after this will result in
458  // unexpected behaviour or crashes.
459  handled = halt = true;
460  };
461 
462  connect_signal_mouse_left_click(*select_leader_button, std::bind(handler, std::placeholders::_3, std::placeholders::_4));
463  } else {
464  select_leader_button->set_visible(widget::visibility::hidden);
465  }
466  }
467 
468  if(income_amt == 0) {
469  find_widget<image>(&row_grid, "income_icon", false).set_visible(widget::visibility::invisible);
470  find_widget<label>(&row_grid, "side_income", false).set_visible(widget::visibility::invisible);
471  }
472  }
473 }
474 
476 {
477  if(flg_dialog_) {
478  if(window* w = flg_dialog_->get_window()) {
479  w->set_retval(retval::CANCEL);
480  }
481  }
482 }
483 
485 {
486  // If the game has already started, close the dialog immediately.
487  if(level_["started"].to_bool()) {
489  return;
490  }
491 
492  config data;
493  if(!network_connection_.receive_data(data)) {
494  return;
495  }
496 
497  // Update chat
498  find_widget<chatbox>(get_window(), "chat", false).process_network_data(data);
499 
500  if(!data["message"].empty()) {
501  gui2::show_transient_message(_("Response") , data["message"]);
502  }
503 
504  if(data["failed"].to_bool()) {
506 
508  } else if(data.child("start_game")) {
510 
511  level_["started"] = true;
513  } else if(data.child("leave_game")) {
515 
517  }
518 
519  if(data.child("stop_updates")) {
520  stop_updates_ = true;
521  } else if(const config& c = data.child("scenario_diff")) {
522  // TODO: We should catch config::error and then leave the game.
524 
526  } else if(const config& change = data.child("change_controller")) {
527  if(config& side_to_change = get_scenario().find_child("side", "side", change["side"])) {
528  side_to_change.merge_with(change);
529  }
530 
531  if(flg_dialog_ && flg_dialog_->get_side_num() == change["side"].to_int()) {
533  }
534  } else if(data.has_child("scenario") || data.has_child("snapshot") || data.child("next_scenario")) {
535  level_ = first_scenario_ ? data : data.child("next_scenario");
536 
538  }
539 
540  if(data.has_child("turn")) {
541  ERR_MP << "received replay data\n" << data << "\n in mp join\n";
542  }
543 
544  // Update player list
545  if(data.has_child("user")) {
546  player_list_->update_list(data.child_range("user"));
547  }
548 }
549 
551 {
552  if(config& scenario = level_.child("scenario")) {
553  return scenario;
554  } else if(config& snapshot = level_.child("snapshot")) {
555  return snapshot;
556  }
557 
558  return level_;
559 }
560 
562 {
563  if(update_timer_ != 0) {
565  update_timer_ = 0;
566  }
567 
568  if(window.get_retval() == retval::OK) {
569  if(const config& stats = level_.child("statistics")) {
571  statistics::read_stats(stats);
572  }
573 
575 
577  } else if(observe_game_) {
578  network_connection_.send_data(config("observer_quit", config { "name", preferences::login() }));
579  } else {
580  network_connection_.send_data(config("leave_game"));
581  }
582 }
583 
584 } // namespace dialogs
void send_data(const configr_of &request)
Queues the given data to be sent to the server.
void active_window_changed()
Definition: chatbox.cpp:111
An error occurred during when trying to communicate with the wesnothd server.
Dialog was closed with the CANCEL button.
Definition: retval.hpp:38
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
Definition: config.cpp:419
const unit_type * find(const std::string &key, unit_type::BUILD_STATUS status=unit_type::FULL) const
Finds a unit_type by its id() and makes sure it is built to the specified level.
Definition: types.cpp:1262
std::string era()
Definition: game.cpp:695
config & find_child(config_key_type key, const std::string &name, const std::string &value)
Returns the first child of tag key with a name attribute containing value.
Definition: config.cpp:866
Variant for storing WML attributes.
static game_config_view wrap(const config &cfg)
bool has_attribute(config_key_type key) const
Definition: config.cpp:211
bool has_child(config_key_type key) const
Determine whether a config has a child or not.
Definition: config.cpp:411
const std::string & flag_rgb() const
Definition: types.cpp:723
void game_has_begun()
child_itors child_range(config_key_type key)
Definition: config.cpp:361
void show_transient_message(const std::string &title, const std::string &message, const std::string &image, const bool message_use_markup, const bool title_use_markup, const bool restore_background)
Shows a transient message to the user.
static void progress(loading_stage stage=loading_stage::none)
void load_game_config_for_game(const game_classification &classification, const std::string &scenario_id)
const attribute_value * get(config_key_type key) const
Returns a pointer to the attribute with the given key or nullptr if it does not exist.
Definition: config.cpp:771
void fresh_stats()
Definition: statistics.cpp:783
unit_type_data unit_types
Definition: types.cpp:1481
void clear()
Definition: saved_game.cpp:792
faction_select * flg_dialog_
static lg::log_domain log_mp_connect_engine("mp/connect/engine")
void set_escape_disabled(const bool escape_disabled)
Disable the escape key.
Definition: window.hpp:299
window * get_window() const
Returns a pointer to the dialog&#39;s window.
A label displays a text, the text can be wrapped but no scrollbars are provided.
Definition: label.hpp:57
bool receive_data(config &result)
Receives the next pending data pack from the server, if available.
void level_to_gamestate(const config &level, saved_game &state)
static std::string _(const char *str)
Definition: gettext.hpp:93
FLG stands for faction, leader and gender.
Definition: flg_manager.hpp:29
bool show(const unsigned auto_close_time=0)
Shows the window.
wesnothd_connection & network_connection_
A single unit type that the player may recruit.
Definition: types.hpp:45
std::string get_scenario_id() const
Definition: saved_game.cpp:648
virtual void set_label(const t_string &label)
Base container class.
Definition: grid.hpp:31
static game_config_manager * get()
void swap(config &cfg)
Definition: config.cpp:1428
std::string get_pango_color_from_id(const std::string &id)
Returns a hex color string from a color range.
std::ostringstream wrapper.
Definition: formatter.hpp:39
const t_string & type_name() const
The name of the unit in the current language setting.
Definition: types.hpp:141
std::unique_ptr< plugins_context > plugins_context_
unsigned lobby_network_timer
Definition: game_config.cpp:88
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal_function &signal)
Connects a signal handler for a left mouse button click.
Definition: dispatcher.cpp:172
A class that represents a TCP/IP connection to the wesnothd server.
bool show_flg_select(int side_num, bool first_time=false)
virtual void send_chat_message(const std::string &message, bool allies_only) override
Inherited form chat_handler.
Definition: chatbox.cpp:246
void load_log(std::map< std::string, chatroom_log > &log, bool show_lobby)
Definition: chatbox.cpp:96
void read_stats(const config &cfg)
Definition: statistics.cpp:773
A tree view is a control that holds several items of the same or different types. ...
Definition: tree_view.hpp:60
void close_faction_select_dialog_if_open()
Will close the Faction Select dialog if it&#39;s open.
void apply_diff(const config &diff, bool track=false)
A function to apply a diff config onto this config object.
Definition: config.cpp:1106
static void add_color_info(const game_config_view &v, bool build_defaults)
int get_retval()
Definition: window.hpp:365
boost::iterator_range< const_child_iterator > const_child_itors
Definition: config.hpp:205
std::string login()
std::unique_ptr< player_list_helper > player_list_
logger & err()
Definition: log.cpp:77
Default, unset return value.
Definition: retval.hpp:32
The user set the widget invisible, that means:
bool use_map_settings()
Definition: game.cpp:495
Contains the gui2 timer routines.
std::map< std::string, t_string > string_map
Definition: widget.hpp:26
std::size_t add_timer(const uint32_t interval, const std::function< void(std::size_t id)> &callback, const bool repeat)
Adds a new timer.
Definition: timer.cpp:127
static t_string from_serialized(const std::string &string)
Definition: tstring.hpp:154
int w
#define N_(String)
Definition: gettext.hpp:101
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
Definition: unicode.cpp:72
#define VGETTEXT(msgid,...)
Handy wrappers around interpolate_variables_into_string and gettext.
config & add_child(config_key_type key)
Definition: config.cpp:505
const std::string random_enemy_picture("units/random-dice.png")
const std::string & image() const
Definition: types.hpp:179
static void display(std::function< void()> f)
#define ON_SCOPE_EXIT(...)
Run some arbitrary code (a lambda) when the current scope exits The lambda body follows this header...
Definition: scope_exit.hpp:43
std::map< std::string, tree_view_node * > team_tree_map_
The user sets the widget hidden, that means:
game_classification & classification()
Definition: saved_game.hpp:55
const std::string unicode_em_dash
Definition: constants.cpp:44
std::map< std::string, chatroom_log > default_chat_log
Definition: chat_log.cpp:18
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
void set_wesnothd_connection(wesnothd_connection &c)
Definition: chatbox.hpp:88
Standard logging facilities (interface).
tree_view_node & add_sibling(const std::string &id, const std::map< std::string, string_map > &data)
Adds a sibbling for a node at the end of the list.
#define ERR_MP
bool wait_and_receive_data(config &data)
Unlike receive_data, waits until data is available instead of returning immediately.
#define WRN_MP
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
static std::string generate_user_description(const config &side)
Dialog was closed with the OK button.
Definition: retval.hpp:35
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:60
mock_char c
void set_retval(int retval)
Convenience wrapper to set the window&#39;s exit code.
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:65
lobby_chat_window * room_window_open(const std::string &room, const bool open_new, const bool allow_close=true)
Check if a room window for "room" is open, if open_new is true then it will be created if not found...
Definition: chatbox.cpp:386
tree_view_node & add_node(const std::string &id, const std::map< std::string, string_map > &data, const int index=-1)
Definition: tree_view.cpp:57
std::pair< std::string, unsigned > item
Definition: help_impl.hpp:410
bool remove_timer(const std::size_t id)
Removes a timer.
Definition: timer.cpp:168
void set_enter_disabled(const bool enter_disabled)
Disable the enter key.
Definition: window.hpp:286