The Battle for Wesnoth
1.21.0-dev
Loading...
Searching...
No Matches
gui
dialogs
addon
install_dependencies.cpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2016 - 2025
3
by Jyrki Vesterinen <sandgtx@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
#include "
install_dependencies.hpp
"
17
18
#include "
gettext.hpp
"
19
#include "
gui/widgets/addon_list.hpp
"
20
#include "
gui/widgets/label.hpp
"
21
#include "
tstring.hpp
"
22
23
namespace
gui2::dialogs
24
{
25
26
REGISTER_DIALOG
(install_dependencies)
27
28
void
install_dependencies
::pre_show()
29
{
30
find_widget<label>(
"label"
).
set_label
(
t_string
(
31
_n
(
32
"The selected add-on has the following dependency, which is outdated or not currently installed. Do you wish to install it before continuing?"
,
33
"The selected add-on has the following dependencies, which are outdated or not currently installed. Do you wish to install them before continuing?"
,
34
addons_.size())
35
));
36
37
find_widget<addon_list>(
"dependencies"
).set_addons(addons_);
38
}
39
40
}
addon_list.hpp
gui2::dialogs::install_dependencies
Definition
install_dependencies.hpp:26
gui2::styled_widget::set_label
virtual void set_label(const t_string &text)
Definition
styled_widget.cpp:309
t_string
Definition
tstring.hpp:135
gettext.hpp
_n
static std::string _n(const char *str1, const char *str2, int n)
Definition
gettext.hpp:104
label.hpp
install_dependencies.hpp
REGISTER_DIALOG
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
Definition
modal_dialog.hpp:89
gui2::dialogs
Definition
achievements_dialog.cpp:35
tstring.hpp
Generated by
1.9.8