The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
storyscreen::floating_image Class Reference

Represents and contains information about image labels used in story screen parts. More...

#include <part.hpp>

Public Member Functions

 floating_image (const config &cfg)
 WML-based constructor. More...
 
 floating_image (const floating_image &fi)
 Copy constructor. More...
 
floating_imageoperator= (const floating_image &fi)
 
std::string file () const
 
int ref_x () const
 Returns the referential X coordinate of the image. More...
 
int ref_y () const
 Returns the referential Y coordinate of the image. More...
 
bool autoscale () const
 Whether the image should be automatically scaled as much as the storyscreen background is. More...
 
bool centered () const
 Whether the image coordinates specify the location of its center (true) or top-left corner (false). More...
 
int display_delay () const
 Delay before displaying, in milliseconds. More...
 

Private Member Functions

void assign (const floating_image &fi)
 Copy constructor and operator=() implementation details. More...
 

Private Attributes

std::string file_
 
int x_
 
int y_
 
int delay_
 
bool autoscaled_
 
bool centered_
 

Detailed Description

Represents and contains information about image labels used in story screen parts.

Definition at line 37 of file part.hpp.

Constructor & Destructor Documentation

◆ floating_image() [1/2]

storyscreen::floating_image::floating_image ( const config cfg)

WML-based constructor.

Parameters
cfgObject corresponding to a [image] block's contents from a [part] node.

Definition at line 38 of file part.cpp.

◆ floating_image() [2/2]

storyscreen::floating_image::floating_image ( const floating_image fi)

Copy constructor.

Definition at line 27 of file part.cpp.

References assign().

Member Function Documentation

◆ assign()

void storyscreen::floating_image::assign ( const floating_image fi)
private

Copy constructor and operator=() implementation details.

Definition at line 48 of file part.cpp.

References autoscaled_, centered_, delay_, file_, x_, and y_.

Referenced by floating_image(), and operator=().

◆ autoscale()

bool storyscreen::floating_image::autoscale ( ) const
inline

Whether the image should be automatically scaled as much as the storyscreen background is.

Definition at line 85 of file part.hpp.

References autoscaled_.

◆ centered()

bool storyscreen::floating_image::centered ( ) const
inline

Whether the image coordinates specify the location of its center (true) or top-left corner (false).

Definition at line 94 of file part.hpp.

References centered_.

◆ display_delay()

int storyscreen::floating_image::display_delay ( ) const
inline

Delay before displaying, in milliseconds.

Definition at line 100 of file part.hpp.

References delay_.

◆ file()

std::string storyscreen::floating_image::file ( ) const
inline

Definition at line 58 of file part.hpp.

References file_.

◆ operator=()

floating_image& storyscreen::floating_image::operator= ( const floating_image fi)
inline

Definition at line 52 of file part.hpp.

References assign().

◆ ref_x()

int storyscreen::floating_image::ref_x ( ) const
inline

Returns the referential X coordinate of the image.

The actual (corrected) value is determined at render time.

Definition at line 67 of file part.hpp.

References x_.

◆ ref_y()

int storyscreen::floating_image::ref_y ( ) const
inline

Returns the referential Y coordinate of the image.

The actual (corrected) value is determined at render time.

Definition at line 76 of file part.hpp.

References y_.

Member Data Documentation

◆ autoscaled_

bool storyscreen::floating_image::autoscaled_
private

Definition at line 109 of file part.hpp.

Referenced by assign(), and autoscale().

◆ centered_

bool storyscreen::floating_image::centered_
private

Definition at line 110 of file part.hpp.

Referenced by assign(), and centered().

◆ delay_

int storyscreen::floating_image::delay_
private

Definition at line 108 of file part.hpp.

Referenced by assign(), and display_delay().

◆ file_

std::string storyscreen::floating_image::file_
private

Definition at line 106 of file part.hpp.

Referenced by assign(), and file().

◆ x_

int storyscreen::floating_image::x_
private

Definition at line 107 of file part.hpp.

Referenced by assign(), and ref_x().

◆ y_

int storyscreen::floating_image::y_
private

Definition at line 107 of file part.hpp.

Referenced by assign(), and ref_y().


The documentation for this class was generated from the following files: