Represents and contains information about a single storyscreen part. More...
#include <part.hpp>
Public Types | |
enum | BLOCK_LOCATION { BLOCK_TOP , BLOCK_MIDDLE , BLOCK_BOTTOM } |
Currently used to indicate where the text block should be placed. More... | |
enum | RESULT { NEXT , SKIP , QUIT } |
Used to signal user actions. More... | |
Public Member Functions | |
part (const vconfig &part_cfg) | |
Constructs a storyscreen part from a managed WML node. More... | |
bool | show_title () const |
Whether the story screen title should be displayed or not. More... | |
const std::string & | text () const |
Retrieves the story text itself. More... | |
void | set_text (const std::string &text) |
Changes the story text. More... | |
const std::string & | title () const |
Retrieves the story screen title. More... | |
void | set_title (const std::string &title) |
Changes the story screen title. More... | |
const std::string & | music () const |
Retrieves the background music. More... | |
const std::string & | sound () const |
Retrieves a one-time-only sound effect. More... | |
const std::string & | voice () const |
Retrieves a voice track. More... | |
BLOCK_LOCATION | story_text_location () const |
Retrieves the area of the screen on which the story text is displayed. More... | |
const std::string & | story_text_alignment () const |
Retrieves the alignment of the story text within the text area. More... | |
const std::string & | title_text_alignment () const |
Retrieves the alignment of the title text against the screen. More... | |
const std::vector< floating_image > & | get_floating_images () const |
Retrieve any associated floating images for this story screen. More... | |
const std::vector< background_layer > & | get_background_layers () const |
Retrieve background layers for this story screen. More... | |
Private Member Functions | |
virtual void | resolve_wml (const vconfig &cfg) override |
Inherited from story_parser. More... | |
virtual bool | resolve_wml_helper (const std::string &key, const vconfig &node) override |
Inherited from story_parser. More... | |
Private Member Functions inherited from storyscreen::story_parser | |
story_parser ()=default | |
virtual | ~story_parser ()=default |
story_parser (const story_parser &)=delete | |
story_parser & | operator= (const story_parser &)=delete |
Static Private Member Functions | |
static BLOCK_LOCATION | string_tblock_loc (const std::string &s) |
Private Attributes | |
bool | show_title_ |
std::string | text_ |
std::string | text_title_ |
BLOCK_LOCATION | text_block_loc_ |
std::string | text_alignment_ |
std::string | title_alignment_ |
std::string | music_ |
std::string | sound_ |
std::string | voice_ |
std::vector< background_layer > | background_layers_ |
std::vector< floating_image > | floating_images_ |
Represents and contains information about a single storyscreen part.
storyscreen::part::part | ( | const vconfig & | part_cfg | ) |
Constructs a storyscreen part from a managed WML node.
part_cfg | Node object which should correspond to a [part] block's contents. |
Definition at line 97 of file part.cpp.
References resolve_wml().
|
inline |
Retrieve background layers for this story screen.
Definition at line 329 of file part.hpp.
References background_layers_.
|
inline |
Retrieve any associated floating images for this story screen.
Definition at line 323 of file part.hpp.
References floating_images_.
|
inline |
|
overrideprivatevirtual |
Inherited from story_parser.
Reimplemented from storyscreen::story_parser.
Definition at line 125 of file part.cpp.
References background_layers_, vconfig::has_attribute(), music_, vconfig::null(), storyscreen::story_parser::resolve_wml(), storyscreen::background_layer::set_file(), storyscreen::background_layer::set_keep_aspect_ratio(), storyscreen::background_layer::set_scale_horizontally(), storyscreen::background_layer::set_scale_vertically(), storyscreen::background_layer::set_tile_horizontally(), storyscreen::background_layer::set_tile_vertically(), show_title_, sound_, string_tblock_loc(), text_, text_alignment_, text_block_loc_, text_title_, title_alignment_, and voice_.
Referenced by part().
|
overrideprivatevirtual |
Inherited from story_parser.
Implements storyscreen::story_parser.
Definition at line 213 of file part.cpp.
References background_layers_, floating_images_, and vconfig::get_parsed_config().
|
inline |
|
inline |
Changes the story screen title.
Definition at line 281 of file part.hpp.
References text_title_, and title().
|
inline |
Whether the story screen title should be displayed or not.
Definition at line 257 of file part.hpp.
References show_title_.
|
inline |
|
inline |
Retrieves the alignment of the story text within the text area.
Definition at line 311 of file part.hpp.
References text_alignment_.
|
inline |
Retrieves the area of the screen on which the story text is displayed.
Definition at line 305 of file part.hpp.
References text_block_loc_.
|
staticprivate |
Definition at line 112 of file part.cpp.
References BLOCK_BOTTOM, BLOCK_MIDDLE, BLOCK_TOP, and s.
Referenced by resolve_wml().
|
inline |
Retrieves the story text itself.
Definition at line 263 of file part.hpp.
References text_.
Referenced by set_text().
|
inline |
Retrieves the story screen title.
Definition at line 275 of file part.hpp.
References text_title_.
Referenced by set_title().
|
inline |
Retrieves the alignment of the title text against the screen.
Definition at line 317 of file part.hpp.
References title_alignment_.
|
inline |
|
private |
Definition at line 354 of file part.hpp.
Referenced by get_background_layers(), resolve_wml(), and resolve_wml_helper().
|
private |
Definition at line 355 of file part.hpp.
Referenced by get_floating_images(), and resolve_wml_helper().
|
private |
Definition at line 350 of file part.hpp.
Referenced by music(), and resolve_wml().
|
private |
Definition at line 343 of file part.hpp.
Referenced by resolve_wml(), and show_title().
|
private |
Definition at line 351 of file part.hpp.
Referenced by resolve_wml(), and sound().
|
private |
Definition at line 344 of file part.hpp.
Referenced by resolve_wml(), set_text(), and text().
|
private |
Definition at line 347 of file part.hpp.
Referenced by resolve_wml(), and story_text_alignment().
|
private |
Definition at line 346 of file part.hpp.
Referenced by resolve_wml(), and story_text_location().
|
private |
Definition at line 345 of file part.hpp.
Referenced by resolve_wml(), set_title(), and title().
|
private |
Definition at line 348 of file part.hpp.
Referenced by resolve_wml(), and title_text_alignment().
|
private |
Definition at line 352 of file part.hpp.
Referenced by resolve_wml(), and voice().