The Battle for Wesnoth
1.15.10+dev
overlay.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2003 - 2018 by Fabian Mueller <fabianmueller5@gmx.de>
3
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY.
11
12
See the COPYING file for more details.
13
*/
14
15
#pragma once
16
17
#include "
halo.hpp
"
18
19
struct
overlay
20
{
21
22
overlay
(
const
std::string& img,
23
const
std::string& halo_img,
24
halo::handle
handle
,
25
const
std::string& overlay_team_name,
26
const
std::string& item_id,
27
const
bool
fogged,
28
float
item_z_order = 0)
29
:
image
(img)
30
,
halo
(halo_img)
31
,
team_name
(overlay_team_name)
32
,
id
(item_id)
33
,
halo_handle
(handle)
34
,
visible_in_fog
(fogged)
35
,
z_order
(item_z_order)
36
{}
37
38
39
overlay
(
const
config
& cfg)
40
:
image
(cfg[
"image"
])
41
,
halo
(cfg[
"halo"
])
42
,
team_name
(cfg[
"team_name"
])
43
,
name
(cfg[
"name"
].t_str())
44
,
id
(cfg[
"id"
])
45
,
halo_handle
()
46
,
visible_in_fog
(cfg[
"visible_in_fog"
].to_bool())
47
,
z_order
(cfg[
"z_order"
].to_double(0))
48
{
49
}
50
51
std::string
image
;
52
std::string
halo
;
53
std::string
team_name
;
54
t_string
name
;
55
std::string
id
;
56
57
halo::handle
halo_handle
;
58
bool
visible_in_fog
;
59
float
z_order
;
60
61
};
overlay::z_order
float z_order
Definition:
overlay.hpp:59
t_string
Definition:
tstring.hpp:123
overlay::halo_handle
halo::handle halo_handle
Definition:
overlay.hpp:57
overlay::visible_in_fog
bool visible_in_fog
Definition:
overlay.hpp:58
halo.hpp
overlay::overlay
overlay(const std::string &img, const std::string &halo_img, halo::handle handle, const std::string &overlay_team_name, const std::string &item_id, const bool fogged, float item_z_order=0)
Definition:
overlay.hpp:22
overlay
Definition:
overlay.hpp:19
overlay::id
std::string id
Definition:
overlay.hpp:55
overlay::name
t_string name
Definition:
overlay.hpp:54
overlay::halo
std::string halo
Definition:
overlay.hpp:52
halo
Definition:
display.hpp:44
image
Functions to load and save images from/to disk.
Definition:
image_modifications.cpp:34
overlay::team_name
std::string team_name
Definition:
overlay.hpp:53
config
A config object defines a single node in a WML file, with access to child nodes.
Definition:
config.hpp:59
halo::handle
std::shared_ptr< halo_record > handle
Definition:
halo.hpp:29
overlay::overlay
overlay(const config &cfg)
Definition:
overlay.hpp:39
overlay::image
std::string image
Definition:
overlay.hpp:51
Generated by
1.8.13