The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Enumerations | Functions | Variables
font Namespace Reference

Graphical text output. More...

Classes

struct  decode_table
 
class  floating_label
 
struct  floating_label_context
 structure which will hide all current floating labels, and cause floating labels instantiated after it is created to be displayed More...
 
struct  manager
 
struct  subset_descriptor
 
class  ttext
 Text class. More...
 

Enumerations

enum  ALIGN { LEFT_ALIGN, CENTER_ALIGN, RIGHT_ALIGN }
 
enum  LABEL_SCROLL_MODE { ANCHOR_LABEL_SCREEN, ANCHOR_LABEL_MAP }
 
enum  CACHE { CACHE_LOBBY, CACHE_GAME }
 
enum  family_class { FONT_SANS_SERIF, FONT_MONOSPACE }
 Font classes for get_font_families(). More...
 

Functions

int add_floating_label (const floating_label &flabel)
 add a label floating on the screen above everything else. More...
 
void move_floating_label (int handle, double xmove, double ymove)
 moves the floating label given by 'handle' by (xmove,ymove) More...
 
void scroll_floating_labels (double xmove, double ymove)
 moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP More...
 
void remove_floating_label (int handle)
 removes the floating label given by 'handle' from the screen More...
 
void show_floating_label (int handle, bool show)
 hides or shows a floating label More...
 
SDL_Rect get_floating_label_rect (int handle)
 
void draw_floating_labels (surface screen)
 
void undraw_floating_labels (surface screen)
 
static bool check_font_file (std::string name)
 
static void set_font_list (const std::vector< subset_descriptor > &fontlist)
 
static surface render_text (const std::string &text, int fontsize, const SDL_Color &color, int style, bool use_markup)
 
surface get_rendered_text (const std::string &str, int size, const SDL_Color &color, int style)
 
SDL_Rect draw_text_line (surface &gui_surface, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips, int style)
 
int get_max_height (int size)
 
int line_width (const std::string &line, int font_size, int style=TTF_STYLE_NORMAL)
 Determine the width of a line of text given a certain font size. More...
 
SDL_Rect line_size (const std::string &line, int font_size, int style=TTF_STYLE_NORMAL)
 Determine the size of a line of text given a certain font size. More...
 
std::string make_text_ellipsis (const std::string &text, int font_size, int max_width, int style=TTF_STYLE_NORMAL)
 If the text exceeds the specified max width, end it with an ellipsis (...) More...
 
bool load_font_config ()
 
const t_stringget_font_families (family_class fclass=FONT_SANS_SERIF)
 Returns the currently defined fonts. More...
 
void cache_mode (CACHE mode)
 
int relative_size (int size)
 
family_class str_to_family_class (const std::string &str)
 
std::string::const_iterator parse_markup (std::string::const_iterator i1, std::string::const_iterator i2, int *font_size, SDL_Color *color, int *style)
 Parses the markup-tags at the front of a string. More...
 
std::string del_tags (const std::string &text)
 Copy string, but without tags at the beginning. More...
 
std::string color2markup (const SDL_Color &color)
 Create string of color-markup, such as "<255,255,0>" for yellow. More...
 
std::string color2hexa (const SDL_Color &color)
 Creates the hexadecimal string of a color, such as "#ffff00" for yellow. More...
 
std::string span_color (const SDL_Color &color)
 Creates pango markup of a color. More...
 
SDL_Rect text_area (const std::string &text, int size, int style=0)
 Calculate the size of a text (in pixels) if it were to be drawn. More...
 
SDL_Rect draw_text (surface &dst, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips=false, int style=0)
 Function to draw text on a surface. More...
 
SDL_Rect draw_text (CVideo *gui, const SDL_Rect &area, int size, const SDL_Color &color, const std::string &text, int x, int y, bool use_tooltips=false, int style=0)
 wrapper of the previous function, gui can also be nullptr More...
 
bool is_format_char (char c)
 Determine if char is one of the special chars used as markup. More...
 
bool is_cjk_char (const ucs4::char_t ch)
 Determine if a ucs4::char_t is a CJK character. More...
 
static void cut_word (std::string &line, std::string &word, int font_size, int style, int max_width)
 
std::string word_wrap_text (const std::string &unwrapped_text, int font_size, int max_width, int max_height=-1, int max_lines=-1, bool partial_line=false)
 Wrap text. More...
 
SDL_Rect draw_wrapped_text (CVideo *gui, const SDL_Rect &area, int font_size, const SDL_Color &color, const std::string &text, int x, int y, int max_width)
 Draw text on the screen, fit text to maximum width, no markup, no tooltips. More...
 
static bool looks_like_url (const std::string &token)
 
std::string escape_text (const std::string &text)
 Escapes the markup characters in a text. More...
 
static void decode_pixel (unsigned char *p)
 Converts from premultiplied alpha to plain alpha. More...
 

Variables

const SDL_Color NORMAL_COLOR = {0xDD,0xDD,0xDD,0}
 
const SDL_Color GRAY_COLOR = {0x77,0x77,0x77,0}
 
const SDL_Color LOBBY_COLOR = {0xBB,0xBB,0xBB,0}
 
const SDL_Color GOOD_COLOR = {0x00,0xFF,0x00,0}
 
const SDL_Color BAD_COLOR = {0xFF,0x00,0x00,0}
 
const SDL_Color BLACK_COLOR = {0x00,0x00,0x00,0}
 
const SDL_Color YELLOW_COLOR = {0xFF,0xFF,0x00,0}
 
const SDL_Color BUTTON_COLOR = {0xBC,0xB0,0x88,0}
 
const SDL_Color PETRIFIED_COLOR = {0xA0,0xA0,0xA0,0}
 
const SDL_Color TITLE_COLOR = {0xBC,0xB0,0x88,0}
 
const SDL_Color LABEL_COLOR = {0x6B,0x8C,0xFF,0}
 
const SDL_Color BIGMAP_COLOR = {0xFF,0xFF,0xFF,0}
 
const SDL_Color DISABLED_COLOR = inverse(PETRIFIED_COLOR)
 
const int SIZE_NORMAL = 14
 
const int SIZE_TINY = 10 * SIZE_NORMAL / 14
 
const int SIZE_SMALL = 12 * SIZE_NORMAL / 14
 
const int SIZE_15 = 15 * SIZE_NORMAL / 14
 
const int SIZE_PLUS = 16 * SIZE_NORMAL / 14
 
const int SIZE_LARGE = 18 * SIZE_NORMAL / 14
 
const int SIZE_TITLE = 20 * SIZE_NORMAL / 14
 
const int SIZE_XLARGE = 24 * SIZE_NORMAL / 14
 
const char LARGE_TEXT ='*'
 Standard markups for color, size, font, images. More...
 
const char SMALL_TEXT ='`'
 
const char BOLD_TEXT ='~'
 
const char NORMAL_TEXT ='{'
 
const char NULL_MARKUP ='^'
 
const char BLACK_TEXT ='}'
 
const char GRAY_TEXT ='|'
 
const char GOOD_TEXT ='@'
 
const char BAD_TEXT ='#'
 
const char GREEN_TEXT ='@'
 
const char RED_TEXT ='#'
 
const char COLOR_TEXT ='<'
 
const char IMAGE ='&'
 
const std::string weapon = "<245,230,193>"
 
const std::string weapon_details = "<166,146,117>"
 
const std::string unit_type = "<245,230,193>"
 
const std::string race = "<166,146,117>"
 
const SDL_Color weapon_color = { 245, 230, 193, SDL_ALPHA_OPAQUE }
 
const SDL_Color good_dmg_color = { 130, 240, 50, SDL_ALPHA_OPAQUE }
 
const SDL_Color bad_dmg_color = { 250, 140, 80, SDL_ALPHA_OPAQUE }
 
const SDL_Color weapon_details_color = { 166, 146, 117, SDL_ALPHA_OPAQUE }
 
const SDL_Color inactive_details_color = { 146, 146, 146, SDL_ALPHA_OPAQUE }
 
const SDL_Color inactive_ability_color = { 146, 146, 146, SDL_ALPHA_OPAQUE }
 
const SDL_Color unit_type_color = { 245, 230, 193, SDL_ALPHA_OPAQUE }
 
const SDL_Color race_color = { 166, 146, 117, SDL_ALPHA_OPAQUE }
 
const std::string weapon_numbers_sep = "×"
 
const std::string weapon_details_sep = "–"
 
static struct decode_table decode_table
 

Detailed Description

Graphical text output.

This module is used to display and measure text. Text can optionally contain special characters, which may change specified display properties such as colour or font size. If special characters are turned on, they can be escaped, C-style, using backslashes.

Enumeration Type Documentation

Enumerator
LEFT_ALIGN 
CENTER_ALIGN 
RIGHT_ALIGN 

Definition at line 32 of file floating_label.hpp.

Enumerator
CACHE_LOBBY 
CACHE_GAME 

Definition at line 111 of file font.hpp.

Font classes for get_font_families().

Enumerator
FONT_SANS_SERIF 
FONT_MONOSPACE 

Definition at line 26 of file font_options.hpp.

Enumerator
ANCHOR_LABEL_SCREEN 
ANCHOR_LABEL_MAP 

Definition at line 34 of file floating_label.hpp.

Function Documentation

int font::add_floating_label ( const floating_label &  flabel)
void font::cache_mode ( CACHE  mode)

Definition at line 1120 of file font.cpp.

References CACHE_LOBBY.

Referenced by mp::run_lobby_loop().

static bool font::check_font_file ( std::string  name)
static

Definition at line 503 of file font.cpp.

References filesystem::file_exists(), game_config::path, and WRN_FT.

Referenced by set_font_list().

std::string font::color2hexa ( const SDL_Color &  color)

Creates the hexadecimal string of a color, such as "#ffff00" for yellow.

Definition at line 176 of file marked-up_text.cpp.

Referenced by span_color().

std::string font::color2markup ( const SDL_Color &  color)

Create string of color-markup, such as "<255,255,0>" for yellow.

Definition at line 164 of file marked-up_text.cpp.

Referenced by dialogs::units_list_preview_pane::get_details(), dialogs::recall_dialog(), and dialogs::show_unit_list().

static void font::cut_word ( std::string line,
std::string word,
int  font_size,
int  style,
int  max_width 
)
static
static void font::decode_pixel ( unsigned char *  p)
static

Converts from premultiplied alpha to plain alpha.

Parameters
ppointer to a 4-byte endian-dependent color.

Definition at line 714 of file text.cpp.

References DECODE, and font::decode_table::values.

Referenced by font::ttext::rerender().

std::string font::del_tags ( const std::string text)

Copy string, but without tags at the beginning.

Definition at line 153 of file marked-up_text.cpp.

References utils::join(), parse_markup(), and utils::split().

Referenced by gui::menu::basic_sorter::less().

void font::draw_floating_labels ( surface  screen)
SDL_Rect font::draw_text ( surface dst,
const SDL_Rect &  area,
int  size,
const SDL_Color &  color,
const std::string text,
int  x,
int  y,
bool  use_tooltips = false,
int  style = 0 
)

Function to draw text on a surface.

The text will be clipped to area. If the text runs outside of area horizontally, an ellipsis will be displayed at the end of it.

If use_tooltips is true, then text with an ellipsis will have a tooltip set for it equivalent to the entire contents of the text.

Some very basic 'markup' will be done on the text:

  • any line beginning in # will be displayed in BAD_COLOR (red)
  • any line beginning in @ will be displayed in GOOD_COLOR (green)
  • any line beginning in + will be displayed with size increased by 2
  • any line beginning in - will be displayed with size decreased by 2
  • any line beginning with 0x0n will be displayed in the color of side n

The above special characters can be quoted using a C-style backslash.

A bounding rectangle of the text is returned. If dst is nullptr, then the text will not be drawn, and a bounding rectangle only will be returned.

Definition at line 194 of file marked-up_text.cpp.

References draw_text_line(), gui2::event::find(), parse_markup(), and utils::unescape().

Referenced by gui::button::calculate_size(), gui::progress_bar::draw_contents(), gui::label::draw_contents(), location_palette_item::draw_contents(), mp::wait::leader_preview_pane::draw_contents(), gui::button::draw_contents(), gui::tristate_button::draw_contents(), dialogs::unit_preview_pane::draw_contents(), mp::gamebrowser::draw_contents(), draw_label(), draw_text(), gui::dialog_frame::draw_title(), battle_prediction_pane::draw_unit(), draw_wrapped_text(), gui::menu::style::item_size(), about::show_about(), hotkey::show_binding_dialog(), text_area(), the_end(), and default_map_generator::user_config().

SDL_Rect font::draw_text ( CVideo gui,
const SDL_Rect &  area,
int  size,
const SDL_Color &  color,
const std::string txt,
int  x,
int  y,
bool  use_tooltips,
int  style 
)

wrapper of the previous function, gui can also be nullptr

Definition at line 241 of file marked-up_text.cpp.

References draw_text(), and CVideo::getSurface().

SDL_Rect font::draw_text_line ( surface gui_surface,
const SDL_Rect &  area,
int  size,
const SDL_Color &  color,
const std::string text,
int  x,
int  y,
bool  use_tooltips,
int  style 
)
SDL_Rect font::draw_wrapped_text ( CVideo gui,
const SDL_Rect &  area,
int  font_size,
const SDL_Color &  color,
const std::string text,
int  x,
int  y,
int  max_width 
)

Draw text on the screen, fit text to maximum width, no markup, no tooltips.

This method makes sure that the text fits within a given maximum width. If a line exceeds this width, it will be wrapped on a word basis if possible, otherwise on a char basis. This method is otherwise similar to the draw_text method, but it doesn't support special markup or tooltips.

Returns
A bounding rectangle of the text.

Definition at line 557 of file marked-up_text.cpp.

References draw_text(), and word_wrap_text().

Referenced by mp::wait::leader_preview_pane::draw_contents().

std::string font::escape_text ( const std::string text)

Escapes the markup characters in a text.

The markups escaped are the ones used in the pango markup. The special characters are:

<>'"& 

The escaping is the same as for HTML.

Parameters
textThe text to escape.
Returns
The escaped text.

Definition at line 75 of file text.cpp.

References c.

Referenced by gui2::tlobby_main::add_active_window_message(), gui2::tlobby_main::add_active_window_whisper(), gui2::tlobby_main::add_chat_message(), gui2::tlua_interpreter::lua_model::add_dialog_message(), gui2::tlobby_main::add_room_window_message(), gui2::tformula_debugger::pre_show(), gui2::tchat_log::model::stream_log(), and unit_name().

SDL_Rect font::get_floating_label_rect ( int  handle)
const t_string & font::get_font_families ( family_class  fclass = FONT_SANS_SERIF)

Returns the currently defined fonts.

Definition at line 1110 of file font.cpp.

References FONT_MONOSPACE.

Referenced by font::ttext::recalculate().

int font::get_max_height ( int  size)
surface font::get_rendered_text ( const std::string str,
int  size,
const SDL_Color &  color,
int  style 
)
bool font::is_cjk_char ( const ucs4::char_t  ch)

Determine if a ucs4::char_t is a CJK character.

Return values
trueInput-char is a CJK char
falseInput-char is a not CJK char.

You can check these range at http://unicode.org/charts/ see the "East Asian Scripts" part. Notice that not all characters in that part is still in use today, so don't list them all here. Below are characters that I guess may be used in wesnoth translations.

Definition at line 268 of file marked-up_text.cpp.

Referenced by help::get_first_word().

bool font::is_format_char ( char  c)

Determine if char is one of the special chars used as markup.

Return values
trueInput-char is a markup-char.
falseInput-char is a normal char.

Definition at line 250 of file marked-up_text.cpp.

References BAD_TEXT, BLACK_TEXT, BOLD_TEXT, GOOD_TEXT, GRAY_TEXT, NORMAL_TEXT, NULL_MARKUP, and SMALL_TEXT.

Referenced by word_wrap_text().

SDL_Rect font::line_size ( const std::string line,
int  font_size,
int  style = TTF_STYLE_NORMAL 
)

Determine the size of a line of text given a certain font size.

Similar to line_width, but for both coordinates.

Definition at line 974 of file font.cpp.

References gui2::cache, gui::font_size, and i.

Referenced by cut_word(), GetShaderSource_RW(), GetShaderSourceSize_RW(), line_width(), and word_wrap_text().

int font::line_width ( const std::string line,
int  font_size,
int  style = TTF_STYLE_NORMAL 
)
bool font::load_font_config ( )
static bool font::looks_like_url ( const std::string token)
static

Definition at line 842 of file text.cpp.

Referenced by font::ttext::get_link(), and font::ttext::handle_token().

std::string font::make_text_ellipsis ( const std::string text,
int  font_size,
int  max_width,
int  style 
)
void font::move_floating_label ( int  handle,
double  xmove,
double  ymove 
)

moves the floating label given by 'handle' by (xmove,ymove)

Definition at line 328 of file floating_label.cpp.

References i.

Referenced by display_chat_manager::prune_chat_messages(), CVideo::set_help_string(), and show_tooltip().

std::string::const_iterator font::parse_markup ( std::string::const_iterator  i1,
std::string::const_iterator  i2,
int font_size,
SDL_Color *  color,
int style 
)
int font::relative_size ( int  size)
inline
void font::remove_floating_label ( int  handle)
static surface font::render_text ( const std::string text,
int  fontsize,
const SDL_Color &  color,
int  style,
bool  use_markup 
)
static
void font::scroll_floating_labels ( double  xmove,
double  ymove 
)

moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP

Definition at line 336 of file floating_label.cpp.

References ANCHOR_LABEL_MAP, and i.

Referenced by display::scroll().

static void font::set_font_list ( const std::vector< subset_descriptor > &  fontlist)
static
void font::show_floating_label ( int  handle,
bool  value 
)

hides or shows a floating label

Definition at line 357 of file floating_label.cpp.

References i.

Referenced by terrain_label::calculate_shroud().

std::string font::span_color ( const SDL_Color &  color)
family_class font::str_to_family_class ( const std::string str)
inline

Definition at line 32 of file font_options.hpp.

References FONT_MONOSPACE, and FONT_SANS_SERIF.

SDL_Rect font::text_area ( const std::string text,
int  size,
int  style = 0 
)

Calculate the size of a text (in pixels) if it were to be drawn.

Definition at line 188 of file marked-up_text.cpp.

References draw_text(), and NORMAL_COLOR.

Referenced by gui::progress_bar::draw_contents(), dialogs::unit_preview_pane::draw_contents(), gui::menu::draw_row(), gui::dialog::layout(), the_end(), and gui::label::update_label_size().

void font::undraw_floating_labels ( surface  screen)
std::string font::word_wrap_text ( const std::string unwrapped_text,
int  font_size,
int  max_width,
int  max_height = -1,
int  max_lines = -1,
bool  partial_line = false 
)

Variable Documentation

const SDL_Color font::BAD_COLOR = {0xFF,0x00,0x00,0}
const SDL_Color font::bad_dmg_color = { 250, 140, 80, SDL_ALPHA_OPAQUE }

Definition at line 56 of file marked-up_text.cpp.

Referenced by attack_info(), unit_alignment(), and unit_weapons().

const char font::BAD_TEXT ='#'
const SDL_Color font::BIGMAP_COLOR = {0xFF,0xFF,0xFF,0}

Definition at line 575 of file font.cpp.

Referenced by string_to_color().

const SDL_Color font::BLACK_COLOR = {0x00,0x00,0x00,0}
const char font::BLACK_TEXT ='}'

Definition at line 43 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const char font::BOLD_TEXT ='~'
const SDL_Color font::BUTTON_COLOR = {0xBC,0xB0,0x88,0}
const char font::COLOR_TEXT ='<'

Definition at line 46 of file marked-up_text.cpp.

Referenced by parse_markup().

Definition at line 706 of file text.cpp.

const SDL_Color font::DISABLED_COLOR = inverse(PETRIFIED_COLOR)
const SDL_Color font::GOOD_COLOR = {0x00,0xFF,0x00,0}

Definition at line 567 of file font.cpp.

Referenced by mp::gamebrowser::draw_row(), parse_markup(), and string_to_color().

const SDL_Color font::good_dmg_color = { 130, 240, 50, SDL_ALPHA_OPAQUE }

Definition at line 55 of file marked-up_text.cpp.

Referenced by attack_info(), unit_alignment(), and unit_weapons().

const char font::GOOD_TEXT ='@'

Definition at line 44 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const SDL_Color font::GRAY_COLOR = {0x77,0x77,0x77,0}
const char font::GRAY_TEXT ='|'

Definition at line 43 of file marked-up_text.cpp.

Referenced by is_format_char(), and parse_markup().

const char font::GREEN_TEXT ='@'

Definition at line 45 of file marked-up_text.cpp.

Referenced by dialogs::show_unit_list().

const char font::IMAGE ='&'
const SDL_Color font::inactive_ability_color = { 146, 146, 146, SDL_ALPHA_OPAQUE }

Definition at line 59 of file marked-up_text.cpp.

Referenced by unit_abilities().

const SDL_Color font::inactive_details_color = { 146, 146, 146, SDL_ALPHA_OPAQUE }

Definition at line 58 of file marked-up_text.cpp.

Referenced by attack_info().

const SDL_Color font::LABEL_COLOR = {0x6B,0x8C,0xFF,0}
const char font::LARGE_TEXT ='*'

Standard markups for color, size, font, images.

Definition at line 40 of file marked-up_text.cpp.

Referenced by about::show_about().

const SDL_Color font::LOBBY_COLOR = {0xBB,0xBB,0xBB,0}

Definition at line 566 of file font.cpp.

const SDL_Color font::NORMAL_COLOR = {0xDD,0xDD,0xDD,0}
const char font::NORMAL_TEXT ='{'
const char font::NULL_MARKUP ='^'
const SDL_Color font::PETRIFIED_COLOR = {0xA0,0xA0,0xA0,0}

Definition at line 572 of file font.cpp.

const std::string font::race = "<166,146,117>"
const SDL_Color font::race_color = { 166, 146, 117, SDL_ALPHA_OPAQUE }

Definition at line 61 of file marked-up_text.cpp.

const char font::RED_TEXT ='#'

Definition at line 45 of file marked-up_text.cpp.

Referenced by dialogs::show_unit_list().

const int font::SIZE_15 = 15 * SIZE_NORMAL / 14

Definition at line 64 of file font.hpp.

Referenced by battle_prediction_pane::draw_unit().

const int font::SIZE_LARGE = 18 * SIZE_NORMAL / 14

Definition at line 66 of file font.hpp.

Referenced by CVideo::set_help_string(), and hotkey::show_binding_dialog().

const int font::SIZE_NORMAL = 14
const int font::SIZE_PLUS = 16 * SIZE_NORMAL / 14
const int font::SIZE_SMALL = 12 * SIZE_NORMAL / 14
const int font::SIZE_TINY = 10 * SIZE_NORMAL / 14

Definition at line 61 of file font.hpp.

const int font::SIZE_TITLE = 20 * SIZE_NORMAL / 14

Definition at line 67 of file font.hpp.

Referenced by gui::dialog_frame::draw_title(), and gui::dialog_frame::top_padding().

const int font::SIZE_XLARGE = 24 * SIZE_NORMAL / 14

Definition at line 68 of file font.hpp.

Referenced by display::announce(), game_display::float_label(), about::show_about(), and the_end().

const char font::SMALL_TEXT ='`'

Definition at line 40 of file marked-up_text.cpp.

Referenced by is_format_char(), parse_markup(), and about::show_about().

const SDL_Color font::TITLE_COLOR = {0xBC,0xB0,0x88,0}

Definition at line 573 of file font.cpp.

Referenced by gui::dialog_frame::draw_title().

const std::string font::unit_type = "<245,230,193>"

Definition at line 50 of file marked-up_text.cpp.

Referenced by dialogs::unit_preview_pane::draw_contents().

const SDL_Color font::unit_type_color = { 245, 230, 193, SDL_ALPHA_OPAQUE }

Definition at line 60 of file marked-up_text.cpp.

const std::string font::weapon = "<245,230,193>"
const SDL_Color font::weapon_color = { 245, 230, 193, SDL_ALPHA_OPAQUE }

Definition at line 54 of file marked-up_text.cpp.

Referenced by attack_info(), unit_alignment(), and unit_weapons().

const std::string font::weapon_details = "<166,146,117>"

Definition at line 49 of file marked-up_text.cpp.

Referenced by dialogs::unit_preview_pane::draw_contents().

const SDL_Color font::weapon_details_color = { 166, 146, 117, SDL_ALPHA_OPAQUE }

Definition at line 57 of file marked-up_text.cpp.

Referenced by attack_info(), and unit_weapons().

const std::string font::weapon_details_sep = "–"
const std::string font::weapon_numbers_sep = "×"
const SDL_Color font::YELLOW_COLOR = {0xFF,0xFF,0x00,0}