The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
generate_map.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2008 - 2025
3 by Mark de Wever <koraq@xs4all.nl>
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
20
21#include <cstdint>
22#include <memory>
23
24class map_generator;
25
26namespace gui2::dialogs
27{
29{
30public:
31 explicit editor_generate_map(const std::vector<std::unique_ptr<map_generator>>& mg);
32
34
36
37 utils::optional<uint32_t> get_seed();
38
39private:
40 virtual const std::string& window_id() const override;
41
42 virtual void pre_show() override;
43
44 /** Callback for generator list selection changes. */
46
47 /** Callback for the generator settings button. */
48 void do_settings();
49
50 /** Available map generators */
51 const std::vector<std::unique_ptr<map_generator>>& map_generators_;
52
53 /** Last used map generator, must be in map_generators_ */
55
56 /** Current map generator index */
58
59 /** random seed integer input*/
60 std::string random_seed_;
61};
62
63} // namespace gui2::dialogs
virtual void pre_show() override
Actions to be taken before showing the window.
int current_map_generator_
Current map generator index.
utils::optional< uint32_t > get_seed()
void do_generator_selected()
Callback for generator list selection changes.
void do_settings()
Callback for the generator settings button.
const std::vector< std::unique_ptr< map_generator > > & map_generators_
Available map generators.
map_generator * last_map_generator_
Last used map generator, must be in map_generators_.
std::string random_seed_
random seed integer input
virtual const std::string & window_id() const override
The ID of the window to build.
void select_map_generator(map_generator *mg)
map_generator * get_selected_map_generator()
Abstract base class for all modal dialogs.