The Battle for Wesnoth
1.21.0-dev
Loading...
Searching...
No Matches
gui
dialogs
game_save.cpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2008 - 2025
3
by Jörg Hinrichs <joerg.hinrichs@alice-dsl.de>
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
#define GETTEXT_DOMAIN "wesnoth-lib"
17
18
#include "
gui/dialogs/game_save.hpp
"
19
20
#include "
gettext.hpp
"
21
22
namespace
gui2::dialogs
23
{
24
25
REGISTER_DIALOG
(game_save)
26
27
game_save
::
game_save
(
std
::
string
&
filename
, const
std
::
string
& title)
28
:
modal_dialog
(window_id())
29
{
30
register_text(
"txtFilename"
,
false
,
filename
,
true
);
31
register_label(
"lblTitle"
,
true
, title);
32
}
33
34
REGISTER_DIALOG
(
game_save_message
)
35
36
game_save_message
::
game_save_message
(
std
::
string
&
filename
,
37
const
std
::
string
& title,
38
const
std
::
string
&
message
)
39
:
modal_dialog
(window_id())
40
{
41
register_label(
"lblTitle"
,
true
, title);
42
register_text(
"txtFilename"
,
false
,
filename
,
true
);
43
register_label(
"lblMessage"
,
true
,
message
);
44
}
45
46
REGISTER_DIALOG
(
game_save_oos
)
47
48
game_save_oos
::
game_save_oos
(
bool
& ignore_all,
49
std
::
string
&
filename
,
50
const
std
::
string
& title,
51
const
std
::
string
&
message
)
52
:
modal_dialog
(window_id())
53
{
54
register_label(
"lblTitle"
,
true
, title);
55
register_text(
"txtFilename"
,
false
,
filename
,
true
);
56
register_label(
"lblMessage"
,
true
,
message
);
57
register_bool(
"ignore_all"
,
true
, ignore_all);
58
59
/* Always need the ignore_all flag. */
60
set_always_save_fields(
true
);
61
}
62
63
}
// namespace dialogs
gui2::dialogs::game_save_message
Definition
game_save.hpp:35
gui2::dialogs::game_save_oos
Definition
game_save.hpp:48
gui2::dialogs::game_save
Definition
game_save.hpp:24
gui2::dialogs::message
Main class to show messages to the user.
Definition
message.hpp:36
gui2::dialogs::modal_dialog
Abstract base class for all modal dialogs.
Definition
modal_dialog.hpp:146
game_save.hpp
gettext.hpp
REGISTER_DIALOG
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
Definition
modal_dialog.hpp:89
gui2::dialogs
Definition
achievements_dialog.cpp:35
std
STL namespace.
filename
std::string filename
Filename.
Definition
spritesheet_generator.cpp:67
Generated by
1.9.8