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 point & | title_position () const |
| Retrieves the percentage based position of the title text. 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_ |
| point | title_perc_pos_ |
| 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 336 of file part.hpp.
References background_layers_.
|
inline |
Retrieve any associated floating images for this story screen.
Definition at line 330 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_, BLOCK_BOTTOM, BLOCK_MIDDLE, BLOCK_TOP, cfg, config::has_attribute(), loc, music_, 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_, utils::split(), string_tblock_loc(), text_, text_alignment_, text_block_loc_, text_title_, title_alignment_, title_perc_pos_, and voice_.
Referenced by part().
|
overrideprivatevirtual |
Inherited from story_parser.
Implements storyscreen::story_parser.
Definition at line 262 of file part.cpp.
References background_layers_, floating_images_, and vconfig::get_parsed_config().
|
inline |
|
inline |
Changes the story screen title.
Definition at line 282 of file part.hpp.
References text_title_, and title().
|
inline |
Whether the story screen title should be displayed or not.
Definition at line 258 of file part.hpp.
References show_title_.
|
inline |
|
inline |
Retrieves the alignment of the story text within the text area.
Definition at line 312 of file part.hpp.
References text_alignment_.
|
inline |
Retrieves the area of the screen on which the story text is displayed.
Definition at line 306 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 264 of file part.hpp.
References text_.
Referenced by set_text().
|
inline |
Retrieves the story screen title.
Definition at line 276 of file part.hpp.
References text_title_.
Referenced by set_title().
|
inline |
Retrieves the percentage based position of the title text.
Definition at line 324 of file part.hpp.
References title_perc_pos_.
|
inline |
Retrieves the alignment of the title text against the screen.
Definition at line 318 of file part.hpp.
References title_alignment_.
|
inline |
|
private |
Definition at line 364 of file part.hpp.
Referenced by get_background_layers(), resolve_wml(), and resolve_wml_helper().
|
private |
Definition at line 365 of file part.hpp.
Referenced by get_floating_images(), and resolve_wml_helper().
|
private |
Definition at line 357 of file part.hpp.
Referenced by music(), and resolve_wml().
|
private |
Definition at line 350 of file part.hpp.
Referenced by resolve_wml(), and show_title().
|
private |
Definition at line 358 of file part.hpp.
Referenced by resolve_wml(), and sound().
|
private |
Definition at line 351 of file part.hpp.
Referenced by resolve_wml(), set_text(), and text().
|
private |
Definition at line 354 of file part.hpp.
Referenced by resolve_wml(), and story_text_alignment().
|
private |
Definition at line 353 of file part.hpp.
Referenced by resolve_wml(), and story_text_location().
|
private |
Definition at line 352 of file part.hpp.
Referenced by resolve_wml(), set_title(), and title().
|
private |
Definition at line 355 of file part.hpp.
Referenced by resolve_wml(), and title_text_alignment().
|
private |
Definition at line 362 of file part.hpp.
Referenced by resolve_wml(), and title_position().
|
private |
Definition at line 359 of file part.hpp.
Referenced by resolve_wml(), and voice().