The Battle for Wesnoth  1.15.12+dev
edit_scenario.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2018 by Fabian Mueller <fabianmueller5@gmx.de>
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 #pragma once
16 
18 
19 namespace gui2::dialogs
20 {
21 
22 /**
23  * @ingroup GUIWindowDefinitionWML
24  *
25  * Dialog for editing gamemap scenarios.
26  * Key |Type |Mandatory|Description
27  * ------------------|---------------|---------|-----------
28  * title | @ref label |yes |Dialog title label.
29  * label | @ref text_box |yes |Input field for the map label.
30  * team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
31  */
33 {
34 public:
35  editor_edit_scenario(std::string& id,
36  std::string& name,
37  std::string& description,
38  int& turns,
39  int& experience_modifier,
40  bool& victory_when_enemies_defeated,
41  bool& random_start_time);
42 
43  /** The execute function. See @ref modal_dialog for more information. */
45 
46 private:
47  virtual const std::string& window_id() const override;
48 
49  virtual void pre_show(window& window) override;
50 };
51 } // namespace dialogs
editor_edit_scenario(std::string &id, std::string &name, std::string &description, int &turns, int &experience_modifier, bool &victory_when_enemies_defeated, bool &random_start_time)
virtual const std::string & window_id() const override
The execute function.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
Dialog for editing gamemap scenarios.
int turns()
Definition: game.cpp:553
Abstract base class for all modal dialogs.
bool random_start_time()
Definition: game.cpp:523
base class of top level items, the only item which needs to store the final canvases to draw on...
Definition: window.hpp:64