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 | TEXT_ALIGNMENT { TEXT_LEFT, TEXT_CENTERED, TEXT_RIGHT } |
Currently used to indicate where the page title 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... | |
BLOCK_LOCATION | story_text_location () const |
Retrieves the area of the screen on which the story text is displayed. More... | |
TEXT_ALIGNMENT | 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 | |
void | resolve_wml (const vconfig &cfg) |
Takes care of initializing and branching properties. More... | |
Static Private Member Functions | |
static BLOCK_LOCATION | string_tblock_loc (const std::string &s) |
static TEXT_ALIGNMENT | string_title_align (const std::string &s) |
Private Attributes | |
bool | show_title_ |
std::string | text_ |
std::string | text_title_ |
BLOCK_LOCATION | text_block_loc_ |
TEXT_ALIGNMENT | title_alignment_ |
std::string | music_ |
std::string | sound_ |
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 174 of file part.cpp.
References resolve_wml().
|
inline |
Retrieve background layers for this story screen.
Definition at line 333 of file part.hpp.
References background_layers_.
Referenced by storyscreen::part_ui::prepare_background().
|
inline |
Retrieve any associated floating images for this story screen.
Definition at line 328 of file part.hpp.
References floating_images_.
Referenced by storyscreen::part_ui::prepare_floating_images(), and storyscreen::part_ui::render_floating_images().
|
inline |
Retrieves the background music.
Definition at line 308 of file part.hpp.
References music_.
Referenced by storyscreen::part_ui::show().
Takes care of initializing and branching properties.
Definition at line 214 of file part.cpp.
References background_layers_, vconfig::child(), game_events::conditional_passed(), floating_images_, resources::game_events, resources::gamedata, vconfig::get_children(), vconfig::get_parsed_config(), game_data::get_variable_const(), vconfig::has_attribute(), vconfig::has_child(), i, music_, vconfig::null(), vconfig::ordered_begin(), vconfig::ordered_end(), game_events::manager::pump(), game_events::t_pump::put_wml_message(), 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(), string_title_align(), text_, text_block_loc_, text_title_, title_alignment_, and lg::wml_error().
Referenced by part().
|
inline |
|
inline |
Changes the story screen title.
Definition at line 303 of file part.hpp.
References text_title_, and title().
|
inline |
Whether the story screen title should be displayed or not.
Definition at line 283 of file part.hpp.
References show_title_.
Referenced by storyscreen::part_ui::render_story_box().
|
inline |
Retrieves a one-time-only sound effect.
Definition at line 313 of file part.hpp.
References sound_.
Referenced by storyscreen::part_ui::show().
|
inline |
Retrieves the area of the screen on which the story text is displayed.
Definition at line 318 of file part.hpp.
References text_block_loc_.
Referenced by storyscreen::part_ui::prepare_geometry(), storyscreen::part_ui::render_story_box(), and storyscreen::part_ui::render_story_box_borders().
|
staticprivate |
Definition at line 188 of file part.cpp.
References BLOCK_BOTTOM, BLOCK_MIDDLE, and BLOCK_TOP.
Referenced by resolve_wml().
|
staticprivate |
Definition at line 201 of file part.cpp.
References TEXT_CENTERED, TEXT_LEFT, and TEXT_RIGHT.
Referenced by resolve_wml().
|
inline |
Retrieves the story text itself.
Definition at line 288 of file part.hpp.
References text_.
Referenced by storyscreen::part_ui::render_story_box(), and set_text().
|
inline |
Retrieves the story screen title.
Definition at line 298 of file part.hpp.
References text_title_.
Referenced by storyscreen::part_ui::render_title_box(), and set_title().
|
inline |
Retrieves the alignment of the title text against the screen.
Definition at line 323 of file part.hpp.
References title_alignment_.
Referenced by storyscreen::part_ui::render_title_box().
|
private |
Definition at line 353 of file part.hpp.
Referenced by get_background_layers(), and resolve_wml().
|
private |
Definition at line 354 of file part.hpp.
Referenced by get_floating_images(), and resolve_wml().
|
private |
Definition at line 350 of file part.hpp.
Referenced by music(), and resolve_wml().
|
private |
Definition at line 344 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 345 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_location().
|
private |
Definition at line 346 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().