-
-
Notifications
You must be signed in to change notification settings - Fork 991
/
help.hpp
74 lines (59 loc) · 1.96 KB
/
help.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
Copyright (C) 2003 - 2018 by David White <dave@whitevine.net>
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
*/
#pragma once
#include <string>
class config;
class terrain_type;
class unit;
class unit_type;
namespace help
{
struct help_manager
{
help_manager(const config* game_config);
~help_manager();
};
struct section;
void init_help();
/**
* Open a help dialog using a toplevel other than the default.
*
* This allows for complete customization of the contents, although not in a
* very easy way.
*/
void show_help(const section& toplevel, const std::string& show_topic = "");
/**
* Open the help browser, show topic with id show_topic.
*
* If show_topic is the empty string, the default topic will be shown.
*/
void show_help(const std::string& show_topic = "");
/**
* Open the help browser, show unit with id unit_id.
*
* If show_topic is the empty string, the default topic will be shown.
*/
void show_unit_help(const std::string& unit_id, bool has_variations = false, bool hidden = false);
/**
* Open the help browser, show the variation of the unit matching.
*/
void show_variation_help(const std::string& unit_id, const std::string& variation, bool hidden = false);
/**
* Open the help browser, show terrain with id terrain_id.
*
* If show_topic is the empty string, the default topic will be shown.
*/
void show_terrain_help(const std::string& unit_id, bool hidden = false);
void show_unit_description(const unit_type& t);
void show_unit_description(const unit& u);
void show_terrain_description(const terrain_type& t);
} // End namespace help.