frame_builder Class Reference

keep most parameters in a separate class to simplify handling of large number of parameters More...

#include <unit_frame.hpp>

Collaboration diagram for frame_builder:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 frame_builder ()
 initial constructor
 frame_builder (const config &cfg, const std::string &frame_string="")
frame_builderimage (const image::locator image, const std::string &image_mod="")
 allow easy chained modifications will raised assert if used after initialization
frame_builderimage_diagonal (const image::locator image_diagonal, const std::string &image_mod="")
frame_buildersound (const std::string &sound)
frame_buildertext (const std::string &text, const Uint32 text_color)
frame_builderhalo (const std::string &halo, const std::string &halo_x, const std::string &halo_y)
frame_builderduration (const int duration)
frame_builderblend (const std::string &blend_ratio, const Uint32 blend_color)
frame_builderhighlight (const std::string &highlight)
frame_builderoffset (const std::string &offset)
frame_buildersubmerge (const std::string &submerge)
frame_builderx (const std::string &x)
frame_buildery (const std::string &y)
const frame_parameters parameters (int current_time) const
 getters for the different parameters
int duration () const
void recalculate_duration ()
bool does_not_change () const
bool need_update () const

Private Attributes

image::locator image_
image::locator image_diagonal_
std::string image_mod_
progressive_string halo_
progressive_int halo_x_
progressive_int halo_y_
std::string sound_
std::string text_
Uint32 text_color_
int duration_
Uint32 blend_with_
progressive_double blend_ratio_
progressive_double highlight_ratio_
progressive_double offset_
progressive_double submerge_
progressive_int x_
progressive_int y_


Detailed Description

keep most parameters in a separate class to simplify handling of large number of parameters

Definition at line 111 of file unit_frame.hpp.


Constructor & Destructor Documentation

frame_builder::frame_builder (  )  [inline]

initial constructor

Definition at line 114 of file unit_frame.hpp.

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


Member Function Documentation

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

allow easy chained modifications will raised assert if used after initialization

Definition at line 213 of file unit_frame.cpp.

References image_, and image_mod_.

Referenced by frame_builder().

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

Definition at line 219 of file unit_frame.cpp.

References image_diagonal_, and image_mod_.

Referenced by frame_builder().

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

Definition at line 225 of file unit_frame.cpp.

References sound_.

Referenced by frame_builder().

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

Definition at line 230 of file unit_frame.cpp.

References text_, and text_color_.

Referenced by frame_builder().

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

Definition at line 236 of file unit_frame.cpp.

References duration_, halo_, halo_x_, and halo_y_.

Referenced by frame_builder().

frame_builder & frame_builder::duration ( const int  duration  ) 

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

Definition at line 261 of file unit_frame.cpp.

References blend_ratio_, blend_with_, and duration_.

Referenced by frame_builder(), and unit_animation::particule::override().

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

Definition at line 267 of file unit_frame.cpp.

References duration_, and highlight_ratio_.

Referenced by frame_builder(), and unit_animation::particule::override().

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

Definition at line 272 of file unit_frame.cpp.

References duration_, and offset_.

Referenced by frame_builder(), and unit_animation::particule::override().

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

Definition at line 277 of file unit_frame.cpp.

References duration_, and submerge_.

Referenced by frame_builder().

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

Definition at line 282 of file unit_frame.cpp.

References duration_, and x_.

Referenced by frame_builder().

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

Definition at line 287 of file unit_frame.cpp.

References duration_, and y_.

Referenced by frame_builder().

const frame_parameters frame_builder::parameters ( int  current_time  )  const

int frame_builder::duration (  )  const [inline]

Definition at line 150 of file unit_frame.hpp.

References duration_.

Referenced by frame_builder().

void frame_builder::recalculate_duration (  ) 

bool frame_builder::does_not_change (  )  const

bool frame_builder::need_update (  )  const


Member Data Documentation

Definition at line 155 of file unit_frame.hpp.

Referenced by image(), and parameters().

Definition at line 156 of file unit_frame.hpp.

Referenced by image_diagonal(), and parameters().

std::string frame_builder::image_mod_ [private]

Definition at line 157 of file unit_frame.hpp.

Referenced by image(), image_diagonal(), and parameters().

Definition at line 158 of file unit_frame.hpp.

Referenced by does_not_change(), halo(), need_update(), parameters(), and recalculate_duration().

Definition at line 159 of file unit_frame.hpp.

Referenced by does_not_change(), halo(), need_update(), parameters(), and recalculate_duration().

Definition at line 160 of file unit_frame.hpp.

Referenced by does_not_change(), halo(), need_update(), parameters(), and recalculate_duration().

std::string frame_builder::sound_ [private]

Definition at line 161 of file unit_frame.hpp.

Referenced by parameters(), and sound().

std::string frame_builder::text_ [private]

Definition at line 162 of file unit_frame.hpp.

Referenced by parameters(), and text().

Uint32 frame_builder::text_color_ [private]

Definition at line 163 of file unit_frame.hpp.

Referenced by parameters(), and text().

int frame_builder::duration_ [private]

Uint32 frame_builder::blend_with_ [private]

Definition at line 165 of file unit_frame.hpp.

Referenced by blend(), and parameters().

Definition at line 166 of file unit_frame.hpp.

Referenced by blend(), does_not_change(), need_update(), parameters(), and recalculate_duration().

Definition at line 170 of file unit_frame.hpp.

Referenced by does_not_change(), need_update(), parameters(), recalculate_duration(), and x().

Definition at line 171 of file unit_frame.hpp.

Referenced by does_not_change(), need_update(), parameters(), recalculate_duration(), and y().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs