color_range.cpp File Reference

Generate ranges of colors, and color palettes. More...

#include "game_config.hpp"
#include "global.hpp"
#include "color_range.hpp"
#include "map.hpp"
#include "serialization/string_utils.hpp"
#include <cassert>
#include <set>
#include <string>
#include <cstring>
#include <vector>

Include dependency graph for color_range.cpp:

Go to the source code of this file.

Functions

std::map< Uint32, Uint32 > recolor_range (const color_range &new_range, const std::vector< Uint32 > &old_rgb)
std::vector< Uint32 > string2rgb (std::string s)
 Convert comma separated string into rgb values.
std::vector< Uint32 > palette (color_range cr)
std::string rgb2highlight (Uint32 rgb)


Detailed Description

Generate ranges of colors, and color palettes.

Used e.g. to color HP, XP.

Definition in file color_range.cpp.


Function Documentation

std::vector<Uint32> palette ( color_range  cr  ) 

Definition at line 126 of file color_range.cpp.

References recolor_range().

Referenced by game_config::add_color_info().

std::map<Uint32, Uint32> recolor_range ( const color_range new_range,
const std::vector< Uint32 > &  old_rgb 
)

std::string rgb2highlight ( Uint32  rgb  ) 

Definition at line 154 of file color_range.cpp.

Referenced by team::get_side_highlight(), and events::menu_handler::unit_list().

std::vector<Uint32> string2rgb ( std::string  s  ) 


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