The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
campaign_difficulty.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2010 - 2025
3 by Iris Morelle <shadowm2006@gmail.com>
4 Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY.
12
13 See the COPYING file for more details.
14*/
15
16#pragma once
17
18#include "config.hpp"
20
21namespace gui2::dialogs
22{
24{
25public:
26 /**
27 * @param campaign The campaign the difficulty is being chosen for
28 */
29 campaign_difficulty(const config& campaign);
30
31 /**
32 * Returns the selected difficulty define after displaying.
33 * @return 'CANCEL' if the dialog was canceled.
34 */
35 std::string selected_difficulty() const
36 {
38 }
39
40private:
42 std::string campaign_id_;
44
45 virtual const std::string& window_id() const override;
46
47 virtual void pre_show() override;
48
49 virtual void post_show() override;
50};
51} // namespace dialogs
A config object defines a single node in a WML file, with access to child nodes.
Definition config.hpp:157
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
virtual const std::string & window_id() const override
The ID of the window to build.
std::string selected_difficulty() const
Returns the selected difficulty define after displaying.
Abstract base class for all modal dialogs.
Definitions for the interface to Wesnoth Markup Language (WML).