30 , x_(cfg[
"x"].to_int())
31 , y_(cfg[
"y"].to_int())
32 , delay_(cfg[
"delay"].to_int())
33 , resize_with_background_(cfg[
"resize_with_background"].to_bool())
34 , centered_(cfg[
"centered"].to_bool())
39 : scale_horizontally_(true)
40 , scale_vertically_(true)
41 , tile_horizontally_(false)
42 , tile_vertically_(false)
43 , keep_aspect_ratio_(true)
44 , is_base_layer_(false)
50 : scale_horizontally_(true)
51 , scale_vertically_(true)
52 , tile_horizontally_(false)
53 , tile_vertically_(false)
54 , keep_aspect_ratio_(true)
55 , is_base_layer_(false)
101 , text_block_loc_(
part::BLOCK_BOTTOM)
102 , text_alignment_(
"left")
103 , title_alignment_(
"left")
106 , background_layers_()
114 if(
s.empty() !=
true) {
117 }
else if(
s ==
"middle") {
135 bl.
set_file(cfg[
"background"].str());
175 text_ = cfg[
"story"].str();
198 music_ = cfg[
"music"].str();
202 sound_ = cfg[
"sound"].str();
206 voice_ = cfg[
"voice"].str();
218 if(key ==
"background_layer") {
223 else if(key ==
"image") {
A config object defines a single node in a WML file, with access to child nodes.
bool has_attribute(config_key_type key) const
void set_scale_horizontally(bool b)
Sets whether the layer should be scaled horizontally.
void set_keep_aspect_ratio(bool b)
Sets whether the aspect ratio should be preserved.
void set_tile_vertically(bool b)
Sets whether the layer should be tiled vertically.
void set_file(const std::string &str)
Sets the path to the image file.
void set_tile_horizontally(bool b)
Sets whether the layer should be tiled horizontally.
void set_scale_vertically(bool b)
Sets whether the layer should be scaled vertically.
floating_image(const config &cfg)
WML-based constructor.
Represents and contains information about a single storyscreen part.
static BLOCK_LOCATION string_tblock_loc(const std::string &s)
BLOCK_LOCATION text_block_loc_
std::vector< floating_image > floating_images_
part(const vconfig &part_cfg)
Constructs a storyscreen part from a managed WML node.
std::string title_alignment_
std::vector< background_layer > background_layers_
std::string text_alignment_
virtual void resolve_wml(const vconfig &cfg) override
Inherited from story_parser.
virtual bool resolve_wml_helper(const std::string &key, const vconfig &node) override
Inherited from story_parser.
BLOCK_LOCATION
Currently used to indicate where the text block should be placed.
@ BLOCK_BOTTOM
Bottom of the screen.
@ BLOCK_MIDDLE
Center of the screen.
@ BLOCK_TOP
Top of the screen.
virtual void resolve_wml(const vconfig &cfg)
Takes care of initializing and branching properties.
A variable-expanding proxy for the config class.
bool has_attribute(const std::string &key) const
< Synonym for operator[]
config get_parsed_config() const
Definitions for the interface to Wesnoth Markup Language (WML).
Storyscreen parts and floating images representation.
static map_location::direction s