204 const std::string&
file()
const
264 const std::string&
text()
const
A config object defines a single node in a WML file, with access to child nodes.
const std::string & file() const
The path to the file to load the image from.
void set_scale_horizontally(bool b)
Sets whether the layer should be scaled horizontally.
bool tile_horizontally() const
Whether the layer should be tiled 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.
bool scale_vertically() const
Whether the layer should be scaled vertically.
bool keep_aspect_ratio() const
Whether the aspect ratio should be preserved while scaling.
bool tile_vertically() const
Whether the layer should be tiled vertically.
bool is_base_layer() const
Whether is this layer the base layer.
bool scale_horizontally() const
Whether the layer should be scaled horizontally.
void set_base_layer(bool b)
Sets whether is this layer a base layer.
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.
Represents and contains information about image labels used in story screen parts.
const std::chrono::milliseconds & display_delay() const
Delay after displaying this image and before displaying the next image, in milliseconds.
bool centered() const
Whether the image coordinates specify the location of its center (true) or top-left corner (false).
void assign(const floating_image &fi)
Copy constructor and operator=() implementation details.
int ref_x() const
Returns the referential X coordinate of the image.
int ref_y() const
Returns the referential Y coordinate of the image.
floating_image & operator=(const floating_image &fi)
bool resize_with_background() const
If true, the size of the image is changed in the same way that the ref_x and ref_y are mapped to use ...
floating_image(const floating_image &fi)=default
bool resize_with_background_
std::chrono::milliseconds delay_
floating_image(floating_image &&fi)=default
Represents and contains information about a single storyscreen part.
const std::string & story_text_alignment() const
Retrieves the alignment of the story text within the text area.
const std::string & voice() const
Retrieves a voice track.
static BLOCK_LOCATION string_tblock_loc(const std::string &s)
BLOCK_LOCATION text_block_loc_
const std::string & title() const
Retrieves the story screen title.
const std::string & music() const
Retrieves the background music.
std::vector< floating_image > floating_images_
std::string title_alignment_
std::vector< background_layer > background_layers_
const std::vector< background_layer > & get_background_layers() const
Retrieve background layers for this story screen.
std::string text_alignment_
const std::vector< floating_image > & get_floating_images() const
Retrieve any associated floating images for this story screen.
const point & title_position() const
Retrieves the percentage based position of the title text.
const std::string & sound() const
Retrieves a one-time-only sound effect.
virtual void resolve_wml(const vconfig &cfg) override
Inherited from story_parser.
void set_title(const std::string &title)
Changes the story screen title.
const std::string & title_text_alignment() const
Retrieves the alignment of the title text against the screen.
RESULT
Used to signal user actions.
@ NEXT
Jump to next story part.
@ QUIT
Quit game and go back to main menu.
@ SKIP
Skip all story parts for this set.
bool show_title() const
Whether the story screen title should be displayed or not.
BLOCK_LOCATION story_text_location() const
Retrieves the area of the screen on which the story text is displayed.
const std::string & text() const
Retrieves the story text itself.
void set_text(const std::string &text)
Changes the story text.
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.
Small helper class to encapsulate the common logic for parsing storyscreen WML.
A variable-expanding proxy for the config class.
static map_location::direction s