The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Friends | List of all members
frame_builder Class Reference

Easily build frame parameters with the serialized constructors. More...

#include <frame.hpp>

Public Member Functions

 frame_builder ()
 
 frame_builder (const config &cfg, const std::string &frame_string="")
 
frame_builder & duration (const std::chrono::milliseconds &duration)
 Allow easy chained modifications.
 
frame_builder & image (const std::string &image, const std::string &image_mod="")
 
frame_builder & image_diagonal (const std::string &image_diagonal, const std::string &image_mod="")
 
frame_builder & sound (const std::string &sound)
 
frame_builder & text (const std::string &text, const color_t text_color)
 
frame_builder & halo (const std::string &halo, const std::string &halo_x, const std::string &halo_y, const std::string &halo_mod)
 
frame_builder & blend (const std::string &blend_ratio, const color_t blend_color)
 
frame_builder & highlight (const std::string &highlight)
 
frame_builder & offset (const std::string &offset)
 
frame_builder & submerge (const std::string &submerge)
 
frame_builder & x (const std::string &x)
 
frame_builder & y (const std::string &y)
 
frame_builder & directional_x (const std::string &directional_x)
 
frame_builder & directional_y (const std::string &directional_y)
 
frame_builder & auto_vflip (const bool auto_vflip)
 
frame_builder & auto_hflip (const bool auto_hflip)
 
frame_builder & primary_frame (const bool primary_frame)
 
frame_builder & drawing_layer (const std::string &drawing_layer)
 

Private Attributes

std::chrono::milliseconds duration_
 
std::string image_
 
std::string image_diagonal_
 
std::string image_mod_
 
std::string halo_
 
std::string halo_x_
 
std::string halo_y_
 
std::string halo_mod_
 
std::string sound_
 
std::string text_
 
utils::optional< color_t > text_color_
 
utils::optional< color_t > blend_with_
 
std::string blend_ratio_
 
std::string highlight_ratio_
 
std::string offset_
 
std::string submerge_
 
std::string x_
 
std::string y_
 
std::string directional_x_
 
std::string directional_y_
 
boost::tribool auto_vflip_
 
boost::tribool auto_hflip_
 
boost::tribool primary_frame_
 
std::string drawing_layer_
 

Friends

class frame_parsed_parameters
 

Detailed Description

Easily build frame parameters with the serialized constructors.

Definition at line 83 of file frame.hpp.

Constructor & Destructor Documentation

◆ frame_builder() [1/2]

frame_builder::frame_builder ( )

Definition at line 28 of file frame.cpp.

◆ frame_builder() [2/2]

frame_builder::frame_builder ( const config &  cfg,
const std::string &  frame_string = "" 
)

Member Function Documentation

◆ auto_hflip()

frame_builder & frame_builder::auto_hflip ( const bool  auto_hflip)

Definition at line 208 of file frame.cpp.

References auto_hflip(), and auto_hflip_.

Referenced by auto_hflip().

◆ auto_vflip()

frame_builder & frame_builder::auto_vflip ( const bool  auto_vflip)

Definition at line 202 of file frame.cpp.

References auto_vflip(), and auto_vflip_.

Referenced by auto_vflip().

◆ blend()

frame_builder & frame_builder::blend ( const std::string &  blend_ratio,
const color_t  blend_color 
)

Definition at line 153 of file frame.cpp.

References blend_ratio_, and blend_with_.

Referenced by unit_animation::add_anims(), and unit_animation::fill_initial_animations().

◆ directional_x()

frame_builder & frame_builder::directional_x ( const std::string &  directional_x)

Definition at line 190 of file frame.cpp.

References directional_x(), and directional_x_.

Referenced by directional_x().

◆ directional_y()

frame_builder & frame_builder::directional_y ( const std::string &  directional_y)

Definition at line 196 of file frame.cpp.

References directional_y(), and directional_y_.

Referenced by directional_y().

◆ drawing_layer()

frame_builder & frame_builder::drawing_layer ( const std::string &  drawing_layer)

Definition at line 220 of file frame.cpp.

References drawing_layer_.

◆ duration()

frame_builder & frame_builder::duration ( const std::chrono::milliseconds &  duration)

Allow easy chained modifications.

Will raised assert if used after initialization

Definition at line 147 of file frame.cpp.

References duration(), and duration_.

Referenced by unit_animation::add_anims(), duration(), unit_animation::fill_initial_animations(), and frame_builder().

◆ halo()

frame_builder & frame_builder::halo ( const std::string &  halo,
const std::string &  halo_x,
const std::string &  halo_y,
const std::string &  halo_mod 
)

Definition at line 138 of file frame.cpp.

References halo_, halo_mod_, halo_x_, and halo_y_.

◆ highlight()

frame_builder & frame_builder::highlight ( const std::string &  highlight)

Definition at line 160 of file frame.cpp.

References highlight(), and highlight_ratio_.

Referenced by unit_animation::add_anims(), and highlight().

◆ image()

frame_builder & frame_builder::image ( const std::string &  image,
const std::string &  image_mod = "" 
)

Definition at line 111 of file frame.cpp.

References image_, and image_mod_.

Referenced by unit_animation::add_anims(), and unit_animation::fill_initial_animations().

◆ image_diagonal()

frame_builder & frame_builder::image_diagonal ( const std::string &  image_diagonal,
const std::string &  image_mod = "" 
)

Definition at line 118 of file frame.cpp.

References image_diagonal(), image_diagonal_, and image_mod_.

Referenced by image_diagonal().

◆ offset()

frame_builder & frame_builder::offset ( const std::string &  offset)

Definition at line 166 of file frame.cpp.

References offset(), and offset_.

Referenced by offset().

◆ primary_frame()

frame_builder & frame_builder::primary_frame ( const bool  primary_frame)

Definition at line 214 of file frame.cpp.

References primary_frame(), and primary_frame_.

Referenced by primary_frame().

◆ sound()

frame_builder & frame_builder::sound ( const std::string &  sound)

Definition at line 125 of file frame.cpp.

References sound_.

◆ submerge()

frame_builder & frame_builder::submerge ( const std::string &  submerge)

Definition at line 172 of file frame.cpp.

References submerge(), and submerge_.

Referenced by submerge().

◆ text()

frame_builder & frame_builder::text ( const std::string &  text,
const color_t  text_color 
)

Definition at line 131 of file frame.cpp.

References text(), text_, and text_color_.

Referenced by text().

◆ x()

frame_builder & frame_builder::x ( const std::string &  x)

Definition at line 178 of file frame.cpp.

References x(), and x_.

Referenced by x().

◆ y()

frame_builder & frame_builder::y ( const std::string &  y)

Definition at line 184 of file frame.cpp.

References y(), and y_.

Referenced by y().

Friends And Related Symbol Documentation

◆ frame_parsed_parameters

friend class frame_parsed_parameters
friend

Definition at line 110 of file frame.hpp.

Member Data Documentation

◆ auto_hflip_

boost::tribool frame_builder::auto_hflip_
private

Definition at line 137 of file frame.hpp.

Referenced by auto_hflip(), and frame_builder().

◆ auto_vflip_

boost::tribool frame_builder::auto_vflip_
private

Definition at line 136 of file frame.hpp.

Referenced by auto_vflip(), and frame_builder().

◆ blend_ratio_

std::string frame_builder::blend_ratio_
private

Definition at line 127 of file frame.hpp.

Referenced by blend().

◆ blend_with_

utils::optional<color_t> frame_builder::blend_with_
private

Definition at line 125 of file frame.hpp.

Referenced by blend(), and frame_builder().

◆ directional_x_

std::string frame_builder::directional_x_
private

Definition at line 133 of file frame.hpp.

Referenced by directional_x().

◆ directional_y_

std::string frame_builder::directional_y_
private

Definition at line 134 of file frame.hpp.

Referenced by directional_y().

◆ drawing_layer_

std::string frame_builder::drawing_layer_
private

Definition at line 140 of file frame.hpp.

Referenced by drawing_layer().

◆ duration_

std::chrono::milliseconds frame_builder::duration_
private

Definition at line 112 of file frame.hpp.

Referenced by duration(), and frame_builder().

◆ halo_

std::string frame_builder::halo_
private

Definition at line 117 of file frame.hpp.

Referenced by frame_builder(), and halo().

◆ halo_mod_

std::string frame_builder::halo_mod_
private

Definition at line 120 of file frame.hpp.

Referenced by halo().

◆ halo_x_

std::string frame_builder::halo_x_
private

Definition at line 118 of file frame.hpp.

Referenced by halo().

◆ halo_y_

std::string frame_builder::halo_y_
private

Definition at line 119 of file frame.hpp.

Referenced by halo().

◆ highlight_ratio_

std::string frame_builder::highlight_ratio_
private

Definition at line 128 of file frame.hpp.

Referenced by highlight().

◆ image_

std::string frame_builder::image_
private

Definition at line 114 of file frame.hpp.

Referenced by frame_builder(), and image().

◆ image_diagonal_

std::string frame_builder::image_diagonal_
private

Definition at line 115 of file frame.hpp.

Referenced by frame_builder(), and image_diagonal().

◆ image_mod_

std::string frame_builder::image_mod_
private

Definition at line 116 of file frame.hpp.

Referenced by image(), and image_diagonal().

◆ offset_

std::string frame_builder::offset_
private

Definition at line 129 of file frame.hpp.

Referenced by offset().

◆ primary_frame_

boost::tribool frame_builder::primary_frame_
private

Definition at line 138 of file frame.hpp.

Referenced by frame_builder(), and primary_frame().

◆ sound_

std::string frame_builder::sound_
private

Definition at line 121 of file frame.hpp.

Referenced by sound().

◆ submerge_

std::string frame_builder::submerge_
private

Definition at line 130 of file frame.hpp.

Referenced by submerge().

◆ text_

std::string frame_builder::text_
private

Definition at line 122 of file frame.hpp.

Referenced by text().

◆ text_color_

utils::optional<color_t> frame_builder::text_color_
private

Definition at line 124 of file frame.hpp.

Referenced by frame_builder(), and text().

◆ x_

std::string frame_builder::x_
private

Definition at line 131 of file frame.hpp.

Referenced by x().

◆ y_

std::string frame_builder::y_
private

Definition at line 132 of file frame.hpp.

Referenced by y().


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