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. | |
| bool | scale_background () const |
| Whether the background image should be scaled to fill the screen or not. | |
| const std::string & | background () const |
| Path to the background image. | |
| bool | show_title () const |
| Whether the story screen title should be displayed or not. | |
| const std::string & | text () const |
| Retrieves the story text itself. | |
| void | set_text (const std::string &text) |
| Changes the story text. | |
| const std::string & | title () const |
| Retrieves the story screen title. | |
| void | set_title (const std::string &title) |
| Changes the story screen title. | |
| const std::string & | music () const |
| Retrieves the background music. | |
| const std::string & | sound () const |
| Retrieves a one-time-only sound effect. | |
| BLOCK_LOCATION | story_text_location () const |
| Retrieves the area of the screen on which the story text is displayed. | |
| TEXT_ALIGNMENT | title_text_alignment () const |
| Retrieves the alignment of the title text against the screen. | |
| const std::vector < floating_image > & | get_floating_images () const |
| Retrieve any associated floating images for this story screen. | |
Private Member Functions | |
| void | resolve_wml (const vconfig &cfg) |
| Takes care of initializing and branching properties. | |
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 | scale_background_ |
| std::string | background_file_ |
| 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< floating_image > | floating_images_ |
Represents and contains information about a single storyscreen part.
Definition at line 120 of file part.hpp.
| 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 98 of file part.cpp.
References resolve_wml().

| const std::string& storyscreen::part::background | ( | ) | const [inline] |
Path to the background image.
Definition at line 164 of file part.hpp.
References background_file_.
Referenced by storyscreen::part_ui::prepare_background().

| const std::vector<floating_image>& storyscreen::part::get_floating_images | ( | ) | const [inline] |
Retrieve any associated floating images for this story screen.
Definition at line 214 of file part.hpp.
References floating_images_.
Referenced by storyscreen::part_ui::prepare_floating_images(), and storyscreen::part_ui::render_floating_images().

| const std::string& storyscreen::part::music | ( | ) | const [inline] |
Retrieves the background music.
Definition at line 194 of file part.hpp.
References music_.
Referenced by storyscreen::part_ui::show().

| void storyscreen::part::resolve_wml | ( | const vconfig & | cfg | ) | [private] |
Takes care of initializing and branching properties.
Definition at line 139 of file part.cpp.
References background_file_, vconfig::child(), game_events::conditional_passed(), floating_images_, vconfig::get_parsed_config(), game_state::get_variable_const(), game_events::handle_deprecated_message(), game_events::handle_wml_log_message(), vconfig::has_attribute(), vconfig::has_child(), music_, vconfig::null(), vconfig::ordered_begin(), vconfig::ordered_end(), scale_background_, show_title_, sound_, resources::state_of_game, string_tblock_loc(), string_title_align(), text_, text_block_loc_, text_title_, and title_alignment_.
Referenced by part().


| bool storyscreen::part::scale_background | ( | ) | const [inline] |
Whether the background image should be scaled to fill the screen or not.
Definition at line 159 of file part.hpp.
References scale_background_.
Referenced by storyscreen::part_ui::prepare_background().

| void storyscreen::part::set_text | ( | const std::string & | text | ) | [inline] |
| void storyscreen::part::set_title | ( | const std::string & | title | ) | [inline] |
| bool storyscreen::part::show_title | ( | ) | const [inline] |
Whether the story screen title should be displayed or not.
Definition at line 169 of file part.hpp.
References show_title_.
Referenced by storyscreen::part_ui::show().

| const std::string& storyscreen::part::sound | ( | ) | const [inline] |
Retrieves a one-time-only sound effect.
Definition at line 199 of file part.hpp.
References sound_.
Referenced by storyscreen::part_ui::show().

| BLOCK_LOCATION storyscreen::part::story_text_location | ( | ) | const [inline] |
Retrieves the area of the screen on which the story text is displayed.
Definition at line 204 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().

| part::BLOCK_LOCATION storyscreen::part::string_tblock_loc | ( | const std::string & | s | ) | [static, private] |
Definition at line 113 of file part.cpp.
Referenced by resolve_wml().

| part::TEXT_ALIGNMENT storyscreen::part::string_title_align | ( | const std::string & | s | ) | [static, private] |
Definition at line 126 of file part.cpp.
Referenced by resolve_wml().

| const std::string& storyscreen::part::text | ( | ) | const [inline] |
Retrieves the story text itself.
Definition at line 174 of file part.hpp.
References text_.
Referenced by storyscreen::part_ui::render_story_box().

| const std::string& storyscreen::part::title | ( | ) | const [inline] |
Retrieves the story screen title.
Definition at line 184 of file part.hpp.
References text_title_.
Referenced by storyscreen::part_ui::render_title_box().

| TEXT_ALIGNMENT storyscreen::part::title_text_alignment | ( | ) | const [inline] |
Retrieves the alignment of the title text against the screen.
Definition at line 209 of file part.hpp.
References title_alignment_.
Referenced by storyscreen::part_ui::render_title_box().

std::string storyscreen::part::background_file_ [private] |
Definition at line 226 of file part.hpp.
Referenced by background(), and resolve_wml().
std::vector<floating_image> storyscreen::part::floating_images_ [private] |
Definition at line 237 of file part.hpp.
Referenced by get_floating_images(), and resolve_wml().
std::string storyscreen::part::music_ [private] |
Definition at line 234 of file part.hpp.
Referenced by music(), and resolve_wml().
bool storyscreen::part::scale_background_ [private] |
Definition at line 225 of file part.hpp.
Referenced by resolve_wml(), and scale_background().
bool storyscreen::part::show_title_ [private] |
Definition at line 228 of file part.hpp.
Referenced by resolve_wml(), and show_title().
std::string storyscreen::part::sound_ [private] |
Definition at line 235 of file part.hpp.
Referenced by resolve_wml(), and sound().
std::string storyscreen::part::text_ [private] |
Definition at line 229 of file part.hpp.
Referenced by resolve_wml(), set_text(), and text().
Definition at line 231 of file part.hpp.
Referenced by resolve_wml(), and story_text_location().
std::string storyscreen::part::text_title_ [private] |
Definition at line 230 of file part.hpp.
Referenced by resolve_wml(), set_title(), and title().
Definition at line 232 of file part.hpp.
Referenced by resolve_wml(), and title_text_alignment().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:03 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |