The Battle for Wesnoth  1.15.9+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
20 {
21 namespace dialogs
22 {
23 
24 /**
25  * @ingroup GUIWindowDefinitionWML
26  *
27  * Dialog for editing gamemap scenarios.
28  * Key |Type |Mandatory|Description
29  * ------------------|---------------|---------|-----------
30  * title | @ref label |yes |Dialog title label.
31  * label | @ref text_box |yes |Input field for the map label.
32  * team_only_toggle | toggle_button |yes |Checkbox for whether to make the label visible to the player's team only or not.
33  */
35 {
36 public:
37  editor_edit_scenario(std::string& id,
38  std::string& name,
39  std::string& description,
40  int& turns,
41  int& experience_modifier,
42  bool& victory_when_enemies_defeated,
43  bool& random_start_time);
44 
45  /** The execute function. See @ref modal_dialog for more information. */
47 
48 private:
49  /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
50  virtual const std::string& window_id() const override;
51  /** Inherited from modal_dialog. */
52  virtual void pre_show(window& window) override;
53 };
54 } // namespace dialogs
55 } // namespace gui2
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.
Generic file dialog.
Definition: field-fwd.hpp:22
virtual void pre_show(window &window) override
Inherited from modal_dialog.
Dialog for editing gamemap scenarios.
Various uncategorised dialogs.
std::string name
Definition: sdl_ttf.cpp:70
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