The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
frame_parsed_parameters Class Reference

Keep most parameters in a separate class to simplify the handling of the large number of parameters between the frame level and animation level. More...

#include <frame.hpp>

Public Member Functions

 frame_parsed_parameters (const frame_builder &builder=frame_builder(), const std::chrono::milliseconds &override_duration=std::chrono::milliseconds{0})
 
void override (const std::chrono::milliseconds &duration, const std::string &highlight="", const std::string &blend_ratio="", color_t blend_color={0, 0, 0}, const std::string &offset="", const std::string &layer="", const std::string &modifiers="")
 
frame_parameters parameters (const std::chrono::milliseconds &current_time) const
 Getters for the different parameters. More...
 
const std::chrono::milliseconds & duration () const
 
bool does_not_change () const
 
bool need_update () const
 
std::vector< std::string > debug_strings () const
 Contents of frame in strings. More...
 

Private Attributes

std::chrono::milliseconds duration_
 
progressive_image image_
 
progressive_image image_diagonal_
 
std::string image_mod_
 
progressive_string halo_
 
progressive_int halo_x_
 
progressive_int halo_y_
 
std::string halo_mod_
 
std::string sound_
 
std::string text_
 
utils::optional< color_ttext_color_
 
utils::optional< color_tblend_with_
 
progressive_double blend_ratio_
 
progressive_double highlight_ratio_
 
progressive_double offset_
 
progressive_double submerge_
 
progressive_int x_
 
progressive_int y_
 
progressive_int directional_x_
 
progressive_int directional_y_
 
boost::tribool auto_vflip_
 
boost::tribool auto_hflip_
 
boost::tribool primary_frame_
 
progressive_int drawing_layer_
 

Detailed Description

Keep most parameters in a separate class to simplify the handling of the large number of parameters between the frame level and animation level.

Definition at line 147 of file frame.hpp.

Constructor & Destructor Documentation

◆ frame_parsed_parameters()

frame_parsed_parameters::frame_parsed_parameters ( const frame_builder builder = frame_builder(),
const std::chrono::milliseconds &  override_duration = std::chrono::milliseconds{0} 
)

Definition at line 226 of file frame.cpp.

Member Function Documentation

◆ debug_strings()

std::vector< std::string > frame_parsed_parameters::debug_strings ( ) const

◆ does_not_change()

bool frame_parsed_parameters::does_not_change ( ) const

◆ duration()

const std::chrono::milliseconds& frame_parsed_parameters::duration ( ) const
inline

Definition at line 164 of file frame.hpp.

References duration_.

Referenced by unit_frame::duration(), and override().

◆ need_update()

bool frame_parsed_parameters::need_update ( ) const

Definition at line 272 of file frame.cpp.

References does_not_change().

Referenced by unit_frame::need_update().

◆ override()

void frame_parsed_parameters::override ( const std::chrono::milliseconds &  duration,
const std::string &  highlight = "",
const std::string &  blend_ratio = "",
color_t  blend_color = {0,0,0},
const std::string &  offset = "",
const std::string &  layer = "",
const std::string &  modifiers = "" 
)

◆ parameters()

frame_parameters frame_parsed_parameters::parameters ( const std::chrono::milliseconds &  current_time) const

Member Data Documentation

◆ auto_hflip_

boost::tribool frame_parsed_parameters::auto_hflip_
private

Definition at line 200 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ auto_vflip_

boost::tribool frame_parsed_parameters::auto_vflip_
private

Definition at line 199 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ blend_ratio_

progressive_double frame_parsed_parameters::blend_ratio_
private

Definition at line 190 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ blend_with_

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

Definition at line 188 of file frame.hpp.

Referenced by debug_strings(), override(), and parameters().

◆ directional_x_

progressive_int frame_parsed_parameters::directional_x_
private

Definition at line 196 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ directional_y_

progressive_int frame_parsed_parameters::directional_y_
private

Definition at line 197 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ drawing_layer_

progressive_int frame_parsed_parameters::drawing_layer_
private

Definition at line 203 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ duration_

std::chrono::milliseconds frame_parsed_parameters::duration_
private

Definition at line 172 of file frame.hpp.

Referenced by debug_strings(), duration(), override(), and parameters().

◆ halo_

progressive_string frame_parsed_parameters::halo_
private

Definition at line 179 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ halo_mod_

std::string frame_parsed_parameters::halo_mod_
private

Definition at line 183 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ halo_x_

progressive_int frame_parsed_parameters::halo_x_
private

Definition at line 180 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ halo_y_

progressive_int frame_parsed_parameters::halo_y_
private

Definition at line 181 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ highlight_ratio_

progressive_double frame_parsed_parameters::highlight_ratio_
private

Definition at line 191 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ image_

progressive_image frame_parsed_parameters::image_
private

Definition at line 174 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ image_diagonal_

progressive_image frame_parsed_parameters::image_diagonal_
private

Definition at line 175 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ image_mod_

std::string frame_parsed_parameters::image_mod_
private

Definition at line 177 of file frame.hpp.

Referenced by debug_strings(), override(), and parameters().

◆ offset_

progressive_double frame_parsed_parameters::offset_
private

Definition at line 192 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ primary_frame_

boost::tribool frame_parsed_parameters::primary_frame_
private

Definition at line 201 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ sound_

std::string frame_parsed_parameters::sound_
private

Definition at line 184 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ submerge_

progressive_double frame_parsed_parameters::submerge_
private

Definition at line 193 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ text_

std::string frame_parsed_parameters::text_
private

Definition at line 185 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ text_color_

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

Definition at line 187 of file frame.hpp.

Referenced by debug_strings(), and parameters().

◆ x_

progressive_int frame_parsed_parameters::x_
private

Definition at line 194 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().

◆ y_

progressive_int frame_parsed_parameters::y_
private

Definition at line 195 of file frame.hpp.

Referenced by debug_strings(), does_not_change(), override(), and parameters().


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