Classes | |
struct | subset_descriptor |
struct | manager |
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... | |
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 } |
Functions | |
static void | set_font_list (const std::vector< subset_descriptor > &fontlist) |
static surface | render_text (const std::string &text, int fontsize, const SDL_Color &colour, int style) |
surface | get_rendered_text (const std::string &str, int size, const SDL_Color &colour, int style) |
SDL_Rect | draw_text_line (surface gui_surface, const SDL_Rect &area, int size, const SDL_Color &colour, const std::string &text, int x, int y, bool use_tooltips, int style) |
SDL_Rect | draw_text_line (CVideo *gui, const SDL_Rect &area, int size, const SDL_Color &colour, 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. | |
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. | |
std::string | make_text_ellipsis (const std::string &text, int font_size, int max_width, bool with_tags=true) |
If the text excedes the specified max width, end it with an ellipsis (. | |
int | add_floating_label (const std::string &text, int font_size, const SDL_Color &colour, double xpos, double ypos, double xmove, double ymove, int lifetime, const SDL_Rect &clip_rect, ALIGN alignment=CENTER_ALIGN, const SDL_Color *bg_colour=NULL, int border_size=0, LABEL_SCROLL_MODE scroll_mode=ANCHOR_LABEL_SCREEN) |
add a label floating on the screen above everything else. | |
void | move_floating_label (int handle, double xmove, double ymove) |
moves the floating label given by 'handle' by (xmove,ymove) | |
void | scroll_floating_labels (double xmove, double ymove) |
moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP | |
void | remove_floating_label (int handle) |
removes the floating label given by 'handle' from the screen | |
void | show_floating_label (int handle, bool show) |
hides or shows a floating label | |
SDL_Rect | get_floating_label_rect (int handle) |
void | draw_floating_labels (surface screen) |
void | undraw_floating_labels (surface screen) |
bool | load_font_config () |
void | cache_mode (CACHE mode) |
int | relative_size (int size) |
static std::string::const_iterator | parse_markup (std::string::const_iterator i1, std::string::const_iterator i2, int *font_size, SDL_Color *colour, int *style) |
Parses the markup-tags at the front of a string. | |
std::string | del_tags (const std::string &text) |
Copy string, but without tags at the beginning. | |
std::string | nullify_markup (const std::string &text) |
Copy string, but with NULL MARKUP tag at the beginning of each line. | |
std::string | color2markup (const SDL_Color color) |
Create string of color-markup, such as "<255,255,0>" for yellow. | |
SDL_Rect | text_area (const std::string &text, int size, int style) |
Calculate the size of a text (in pixels) if it were to be drawn. | |
SDL_Rect | draw_text (CVideo *gui, const SDL_Rect &area, int size, const SDL_Color &colour, const std::string &txt, int x, int y, bool use_tooltips, int style) |
Draw text on the screen, clip text to area. | |
bool | is_format_char (char c) |
Determine if char is one of the special chars used as markup. | |
static void | cut_word (std::string &line, std::string &word, int font_size, int style, int max_width) |
bool | no_break_after (wchar_t ch) |
bool | no_break_before (wchar_t ch) |
bool | break_before (wchar_t ch) |
bool | break_after (wchar_t ch) |
std::string | word_wrap_text (const std::string &unwrapped_text, int font_size, int max_width, int max_height, int max_lines) |
Wrap text. | |
SDL_Rect | draw_wrapped_text (CVideo *gui, const SDL_Rect &area, int font_size, const SDL_Color &colour, 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. | |
size_t | text_to_lines (std::string &message, size_t max_length) |
Chop up one long string of text into lines. | |
Variables | |
const SDL_Color | NORMAL_COLOUR = {0xDD,0xDD,0xDD,0} |
const SDL_Color | GRAY_COLOUR = {0x77,0x77,0x77,0} |
const SDL_Color | LOBBY_COLOUR = {0xBB,0xBB,0xBB,0} |
const SDL_Color | GOOD_COLOUR = {0x00,0xFF,0x00,0} |
const SDL_Color | BAD_COLOUR = {0xFF,0x00,0x00,0} |
const SDL_Color | BLACK_COLOUR = {0x00,0x00,0x00,0} |
const SDL_Color | YELLOW_COLOUR = {0xFF,0xFF,0x00,0} |
const SDL_Color | BUTTON_COLOUR = {0xBC,0xB0,0x88,0} |
const SDL_Color | STONED_COLOUR = {0xA0,0xA0,0xA0,0} |
const SDL_Color | TITLE_COLOUR = {0xBC,0xB0,0x88,0} |
const SDL_Color | LABEL_COLOUR = {0x6B,0x8C,0xFF,0} |
const SDL_Color | BIGMAP_COLOUR = {0xFF,0xFF,0xFF,0} |
const SDL_Color | DISABLED_COLOUR = inverse(STONED_COLOUR) |
static const size_t | max_text_line_width = 4096 |
const int | SIZE_NORMAL = 14 |
const int | SIZE_TINY = relative_size(10) |
const int | SIZE_SMALL = relative_size(12) |
const int | SIZE_15 = relative_size(15) |
const int | SIZE_PLUS = relative_size(16) |
const int | SIZE_LARGE = relative_size(18) |
const int | SIZE_XLARGE = relative_size(24) |
const char | LARGE_TEXT = '*' |
Standard markups for color, size, font, images. | |
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 char | YELLOW_TEXT |
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.
enum font::ALIGN |
enum font::CACHE |
int font::add_floating_label | ( | const std::string & | text, | |
int | font_size, | |||
const SDL_Color & | colour, | |||
double | xpos, | |||
double | ypos, | |||
double | xmove, | |||
double | ymove, | |||
int | lifetime, | |||
const SDL_Rect & | clip_rect, | |||
ALIGN | alignment = CENTER_ALIGN , |
|||
const SDL_Color * | bg_colour = NULL , |
|||
int | border_size = 0 , |
|||
LABEL_SCROLL_MODE | scroll_mode = ANCHOR_LABEL_SCREEN | |||
) |
add a label floating on the screen above everything else.
'text': the text to display 'font_size': the size to display the text in 'colour': the colour of the text 'xpos,ypos': the location on the screen to display the text. 'xmove,ymove': the amount to move the text each frame 'lifetime': the number of frames to display the text for, or -1 to display until removed 'clip_rect': the rectangle to clip the label to.
Definition at line 939 of file font.cpp.
References ANCHOR_LABEL_MAP, and floating_label.
Referenced by game_display::add_chat_message(), display::announce(), terrain_label::draw(), game_display::float_label(), display::set_diagnostic(), CVideo::set_help_string(), show_tooltip(), display::update_display(), and gui::floating_textbox::update_location().
bool font::@122::break_after | ( | wchar_t | ch | ) | [inline, static] |
Definition at line 336 of file marked-up_text.cpp.
References no_break_after().
Referenced by word_wrap_text().
bool font::@122::break_before | ( | wchar_t | ch | ) | [inline, static] |
Definition at line 324 of file marked-up_text.cpp.
References no_break_before().
Referenced by word_wrap_text().
void font::cache_mode | ( | CACHE | mode | ) |
std::string font::color2markup | ( | const SDL_Color | color | ) |
Create string of color-markup, such as "<255,255,0>" for yellow.
Definition at line 157 of file marked-up_text.cpp.
Referenced by reports::generate_report(), dialogs::units_list_preview_pane::get_details(), and events::menu_handler::unit_list().
static void font::cut_word | ( | std::string & | line, | |
std::string & | word, | |||
int | font_size, | |||
int | style, | |||
int | max_width | |||
) | [static] |
Definition at line 265 of file marked-up_text.cpp.
References utils::utf8_iterator::end(), line_size(), and utils::utf8_iterator::substr().
Referenced by word_wrap_text().
std::string font::del_tags | ( | const std::string & | text | ) |
Copy string, but without tags at the beginning.
Definition at line 132 of file marked-up_text.cpp.
References utils::join(), parse_markup(), and utils::split().
Referenced by gui::menu::basic_sorter::less(), and make_text_ellipsis().
void font::draw_floating_labels | ( | surface | screen | ) |
Definition at line 1038 of file font.cpp.
Referenced by display::flip(), and font::floating_label_context::floating_label_context().
SDL_Rect font::draw_text | ( | CVideo * | gui, | |
const SDL_Rect & | area, | |||
int | size, | |||
const SDL_Color & | colour, | |||
const std::string & | txt, | |||
int | x, | |||
int | y, | |||
bool | use_tooltips, | |||
int | style | |||
) |
Draw text on the screen, clip text to area.
Supports simple markup.
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:
The above special characters can be quoted using a C-style backslash.
A bounding rectangle of the text is returned. If gui is NULL, then the text will not be drawn, and only a bounding rectangle will be returned.
Definition at line 195 of file marked-up_text.cpp.
References draw_text_line(), parse_markup(), rect, text, and utils::unescape().
Referenced by gui::button::calculate_size(), draw_background(), gui::progress_bar::draw_contents(), mp::wait::leader_preview_pane::draw_contents(), mp::gamebrowser::draw_contents(), gui::label::draw_contents(), dialogs::campaign_preview_pane::draw_contents(), dialogs::unit_preview_pane::draw_contents(), gui::button::draw_contents(), draw_label(), gui::menu::draw_row(), draw_tip_of_day(), gui::dialog_frame::draw_title(), draw_wrapped_text(), gui::menu::style::item_size(), map_editor::new_map_dialog(), map_editor::preferences_dialog(), display::refresh_report(), map_editor::resize_dialog(), loadscreen::set_progress(), about::show_about(), preferences::show_hotkeys_dialog(), show_intro_part(), show_intro_part_helper(), text_area(), the_end(), and default_map_generator::user_config().
SDL_Rect font::draw_text_line | ( | CVideo * | gui, | |
const SDL_Rect & | area, | |||
int | size, | |||
const SDL_Color & | colour, | |||
const std::string & | text, | |||
int | x, | |||
int | y, | |||
bool | use_tooltips, | |||
int | style | |||
) |
SDL_Rect font::draw_text_line | ( | surface | gui_surface, | |
const SDL_Rect & | area, | |||
int | size, | |||
const SDL_Color & | colour, | |||
const std::string & | text, | |||
int | x, | |||
int | y, | |||
bool | use_tooltips, | |||
int | style | |||
) |
Definition at line 624 of file font.cpp.
References tooltips::add_tooltip(), line_width(), make_text_ellipsis(), surface::null(), and gui2::render_text().
Referenced by draw_text().
SDL_Rect font::draw_wrapped_text | ( | CVideo * | gui, | |
const SDL_Rect & | area, | |||
int | font_size, | |||
const SDL_Color & | colour, | |||
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 exceedes 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.
Definition at line 481 of file marked-up_text.cpp.
References draw_text(), and word_wrap_text().
Referenced by mp::wait::leader_preview_pane::draw_contents().
SDL_Rect font::get_floating_label_rect | ( | int | handle | ) |
Definition at line 999 of file font.cpp.
References empty_rect.
Referenced by game_display::add_chat_message(), game_display::prune_chat_messages(), CVideo::set_help_string(), show_tooltip(), and gui::floating_textbox::update_location().
int font::get_max_height | ( | int | size | ) |
Definition at line 703 of file font.cpp.
References get_font().
Referenced by gui::textbox::add_text_line(), dialogs::campaign_preview_pane::draw_contents(), gui::textbox::textbox(), gui::dialog_frame::top_padding(), and gui2::ttext_box::update_offsets().
surface font::get_rendered_text | ( | const std::string & | str, | |
int | size, | |||
const SDL_Color & | colour, | |||
int | style | |||
) |
Definition at line 619 of file font.cpp.
References gui2::render_text().
Referenced by help::help_text_area::add_text_item(), gui::textbox::add_text_line(), gui2::ttext::draw(), mp::gamebrowser::draw_row(), display::draw_text_in_hex(), gui2::tcontrol::get_multi_line_best_size(), gui2::render_text(), and help::help_text_area::set_items().
bool font::is_format_char | ( | char | c | ) |
Determine if char is one of the special chars used as markup.
true | input-char is a markup-char | |
false | input-char is a normal char |
Definition at line 247 of file marked-up_text.cpp.
References BAD_TEXT, BLACK_TEXT, BOLD_TEXT, GOOD_TEXT, GRAY_TEXT, LARGE_TEXT, NORMAL_TEXT, NULL_MARKUP, and SMALL_TEXT.
Referenced by text_to_lines(), and 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 717 of file font.cpp.
References cache, and line_size_cache.
Referenced by cut_word(), gui2::tcontrol::get_single_line_best_size(), line_width(), loadscreen::set_progress(), show_intro_part(), and word_wrap_text().
int font::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.
The font type used is the default wesnoth font type.
Definition at line 712 of file font.cpp.
References line_size().
Referenced by help::help_text_area::add_text_item(), gui::textbox::add_text_line(), gui::file_menu::display_current_files(), draw_text_line(), dialogs::file_dialog::format_dirname(), make_text_ellipsis(), help::unit_topic_generator::operator()(), help::unit_topic_generator::push_header(), push_tab_pair(), CVideo::set_help_string(), show_intro_part_helper(), and word_wrap_text().
bool font::load_font_config | ( | ) |
Definition at line 1114 of file font.cpp.
References add_font_to_fontlist(), cfg, config::child(), ERR_FT, config::get_children(), config::error::message, preprocess_file(), read(), set_font_list(), utils::split(), and stream.
Referenced by map_editor::change_language(), main(), and play_game().
std::string font::make_text_ellipsis | ( | const std::string & | text, | |
int | font_size, | |||
int | max_width, | |||
bool | with_tags = true | |||
) |
If the text excedes the specified max width, end it with an ellipsis (.
..) The with_tags can probably always be set to false
Definition at line 739 of file font.cpp.
References del_tags(), utils::utf8_iterator::end(), line_width(), and utils::utf8_iterator::substr().
Referenced by gui::button::calculate_size(), mp::gamebrowser::draw_row(), gui::menu::draw_row(), draw_text_line(), events::menu_handler::save_game(), and help::help_text_area::set_items().
void font::move_floating_label | ( | int | handle, | |
double | xmove, | |||
double | ymove | |||
) |
moves the floating label given by 'handle' by (xmove,ymove)
Definition at line 962 of file font.cpp.
Referenced by game_display::prune_chat_messages(), terrain_label::scroll(), CVideo::set_help_string(), and show_tooltip().
bool font::@122::no_break_after | ( | wchar_t | ch | ) | [inline, static] |
Definition at line 300 of file marked-up_text.cpp.
Referenced by break_after(), and word_wrap_text().
bool font::@122::no_break_before | ( | wchar_t | ch | ) | [inline, static] |
Definition at line 309 of file marked-up_text.cpp.
Referenced by break_before(), and word_wrap_text().
std::string font::nullify_markup | ( | const std::string & | text | ) |
Copy string, but with NULL MARKUP tag at the beginning of each line.
Definition at line 146 of file marked-up_text.cpp.
References utils::join(), NULL_MARKUP, and utils::split().
static std::string::const_iterator font::parse_markup | ( | std::string::const_iterator | i1, | |
std::string::const_iterator | i2, | |||
int * | font_size, | |||
SDL_Color * | colour, | |||
int * | style | |||
) | [static] |
Parses the markup-tags at the front of a string.
Definition at line 39 of file marked-up_text.cpp.
References BAD_COLOUR, BAD_TEXT, BLACK_COLOUR, BLACK_TEXT, BOLD_TEXT, COLOR_TEXT, GOOD_COLOUR, GOOD_TEXT, GRAY_COLOUR, GRAY_TEXT, LARGE_TEXT, lexical_cast(), NORMAL_COLOUR, NORMAL_TEXT, NULL_MARKUP, and SMALL_TEXT.
Referenced by del_tags(), draw_text(), and word_wrap_text().
int font::relative_size | ( | int | size | ) | [inline] |
Definition at line 48 of file font.hpp.
References SIZE_NORMAL.
Referenced by help::help_browser::adjust_layout(), help::help_browser::help_browser(), gui::dialog::layout(), help::unit_topic_generator::operator()(), help::show_help(), preferences::show_hotkeys_dialog(), and dialogs::unit_preview_pane::unit_preview_pane().
void font::remove_floating_label | ( | int | handle | ) |
removes the floating label given by 'handle' from the screen
Definition at line 979 of file font.cpp.
Referenced by terrain_label::clear(), CVideo::clear_help_string(), clear_tooltip(), gui::floating_textbox::close(), game_display::prune_chat_messages(), display::set_diagnostic(), CVideo::set_help_string(), display::update_display(), gui::floating_textbox::update_location(), and font::floating_label_context::~floating_label_context().
static surface font::render_text | ( | const std::string & | text, | |
int | fontsize, | |||
const SDL_Color & | colour, | |||
int | style | |||
) | [static] |
Definition at line 563 of file font.cpp.
References create_compatible_surface(), surface::null(), utils::REMOVE_EMPTY, and utils::split().
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 970 of file font.cpp.
Referenced by display::scroll().
static void font::set_font_list | ( | const std::vector< subset_descriptor > & | fontlist | ) | [static] |
Definition at line 284 of file font.cpp.
References clear_fonts(), file_exists(), font_map, font_names, game_config::path, subset, and WRN_FT.
Referenced by load_font_config().
void font::show_floating_label | ( | int | handle, | |
bool | value | |||
) |
hides or shows a floating label
Definition at line 991 of file font.cpp.
Referenced by terrain_label::calculate_shroud().
SDL_Rect font::text_area | ( | const std::string & | text, | |
int | size, | |||
int | style | |||
) |
Calculate the size of a text (in pixels) if it were to be drawn.
Definition at line 169 of file marked-up_text.cpp.
References draw_text(), and NORMAL_COLOUR.
Referenced by gui::progress_bar::draw_contents(), dialogs::unit_preview_pane::draw_contents(), gui::menu::draw_row(), draw_tip_of_day(), gui::dialog::layout(), the_end(), and gui::label::update_label_size().
size_t font::text_to_lines | ( | std::string & | message, | |
size_t | max_length | |||
) |
Chop up one long string of text into lines.
Definition at line 491 of file marked-up_text.cpp.
References is_format_char(), and push_back().
void font::undraw_floating_labels | ( | surface | screen | ) |
Definition at line 1055 of file font.cpp.
Referenced by display::flip(), and font::floating_label_context::~floating_label_context().
std::string font::word_wrap_text | ( | const std::string & | unwrapped_text, | |
int | font_size, | |||
int | max_width, | |||
int | max_height, | |||
int | max_lines | |||
) |
Wrap text.
If the text exceedes the specified max width, wrap it one a word basis. If this is not possible, e.g. the word is too big to fit, wrap it on a char basis.
Definition at line 355 of file marked-up_text.cpp.
References _, break_after(), break_before(), cut_word(), utils::utf8_iterator::end(), boost::foreach_detail_::end(), is_format_char(), line_size(), line_width(), utils::utf8_iterator::next_is_end(), no_break_after(), no_break_before(), parse_markup(), size, utils::utf8_iterator::substr(), and VALIDATE.
Referenced by game_display::add_chat_message(), gui::dialog::dialog(), gui2::tcontrol::draw(), dialogs::campaign_preview_pane::draw_contents(), draw_tip_of_day(), draw_wrapped_text(), map_editor::flip_dialog(), gui2::tcontrol::get_multi_line_best_size(), show_intro_part_helper(), show_tooltip(), help::split_in_width(), and gui::menu::wrap_words().
const SDL_Color font::BAD_COLOUR = {0xFF,0x00,0x00,0} |
Definition at line 332 of file font.cpp.
Referenced by mp::gamebrowser::draw_row(), move_unit(), parse_markup(), help::string_to_color(), and display::update_display().
const char font::BAD_TEXT = '#' |
Definition at line 34 of file marked-up_text.cpp.
Referenced by reports::generate_report(), is_format_char(), parse_markup(), events::menu_handler::recruit(), and events::menu_handler::status_table().
const SDL_Color font::BIGMAP_COLOUR = {0xFF,0xFF,0xFF,0} |
const SDL_Color font::BLACK_COLOUR = {0x00,0x00,0x00,0} |
Definition at line 333 of file font.cpp.
Referenced by gui::progress_bar::draw_contents(), display::draw_text_in_hex(), parse_markup(), and help::string_to_color().
const char font::BLACK_TEXT = '}' |
Definition at line 33 of file marked-up_text.cpp.
Referenced by is_format_char(), and parse_markup().
const char font::BOLD_TEXT = '~' |
Definition at line 31 of file marked-up_text.cpp.
Referenced by events::mouse_handler::attack_enemy_(), dialogs::unit_preview_pane::draw_contents(), is_format_char(), parse_markup(), playsingle_controller::play_scenario(), playsingle_controller::report_victory(), and events::menu_handler::unit_list().
const SDL_Color font::BUTTON_COLOUR = {0xBC,0xB0,0x88,0} |
Definition at line 335 of file font.cpp.
Referenced by gui::button::calculate_size(), and gui::button::draw_contents().
const char font::COLOR_TEXT = '<' |
const SDL_Color font::DISABLED_COLOUR = inverse(STONED_COLOUR) |
Definition at line 340 of file font.cpp.
Referenced by gui::slider::draw_contents(), and gui::label::get_colour().
const SDL_Color font::GOOD_COLOUR = {0x00,0xFF,0x00,0} |
Definition at line 331 of file font.cpp.
Referenced by mp::gamebrowser::draw_row(), move_unit(), parse_markup(), and help::string_to_color().
const char font::GOOD_TEXT = '@' |
Definition at line 34 of file marked-up_text.cpp.
Referenced by is_format_char(), and parse_markup().
const SDL_Color font::GRAY_COLOUR = {0x77,0x77,0x77,0} |
Definition at line 329 of file font.cpp.
Referenced by gui::button::draw_contents(), mp::gamebrowser::draw_row(), and parse_markup().
const char font::GRAY_TEXT = '|' |
Definition at line 33 of file marked-up_text.cpp.
Referenced by reports::generate_report(), is_format_char(), and parse_markup().
const char font::GREEN_TEXT = '@' |
const char font::IMAGE = '&' |
Definition at line 36 of file marked-up_text.cpp.
Referenced by gui::file_menu::display_current_files(), mp::wait::leader_preview_pane::draw_contents(), mp::wait::generate_menu(), and events::menu_handler::recruit().
const SDL_Color font::LABEL_COLOUR = {0x6B,0x8C,0xFF,0} |
Definition at line 338 of file font.cpp.
Referenced by events::menu_handler::label_terrain(), and terrain_label::read().
const char font::LARGE_TEXT = '*' |
Standard markups for color, size, font, images.
Definition at line 30 of file marked-up_text.cpp.
Referenced by is_format_char(), parse_markup(), events::menu_handler::recruit(), and about::show_about().
const SDL_Color font::LOBBY_COLOUR = {0xBB,0xBB,0xBB,0} |
const size_t font::max_text_line_width = 4096 [static] |
const SDL_Color font::NORMAL_COLOUR = {0xDD,0xDD,0xDD,0} |
Definition at line 328 of file font.cpp.
Referenced by gui::textbox::add_text_line(), gui::dialog::dialog(), draw_background(), gui::slider::draw_contents(), mp::wait::leader_preview_pane::draw_contents(), mp::gamebrowser::draw_contents(), dialogs::campaign_preview_pane::draw_contents(), dialogs::unit_preview_pane::draw_contents(), draw_label(), game_display::draw_movement_info(), mp::gamebrowser::draw_row(), gui::menu::draw_row(), draw_tip_of_day(), gui::menu::style::item_size(), move_unit(), map_editor::new_map_dialog(), parse_markup(), map_editor::preferences_dialog(), display::refresh_report(), map_editor::resize_dialog(), CVideo::set_help_string(), gui::dialog::set_image(), help::help_text_area::set_items(), loadscreen::set_progress(), gui::dialog::set_textbox(), about::show_about(), preferences::show_hotkeys_dialog(), show_intro_part_helper(), show_tooltip(), help::string_to_color(), text_area(), display::update_display(), and default_map_generator::user_config().
const char font::NORMAL_TEXT = '{' |
Definition at line 31 of file marked-up_text.cpp.
Referenced by dialogs::unit_preview_pane::draw_contents(), reports::generate_report(), is_format_char(), parse_markup(), and events::menu_handler::unit_list().
const char font::NULL_MARKUP = '^' |
Definition at line 32 of file marked-up_text.cpp.
Referenced by reports::generate_report(), is_format_char(), nullify_markup(), parse_markup(), events::menu_handler::recruit(), preferences::show_hotkeys_dialog(), and events::menu_handler::status_table().
const char font::RED_TEXT = '#' |
const int font::SIZE_15 = relative_size(15) |
const int font::SIZE_LARGE = relative_size(18) |
Definition at line 70 of file font.hpp.
Referenced by gui::dialog_frame::draw_title(), CVideo::set_help_string(), preferences::show_hotkeys_dialog(), and gui::dialog_frame::top_padding().
const int font::SIZE_NORMAL = 14 |
Definition at line 46 of file font.hpp.
Referenced by gui::file_menu::display_current_files(), terrain_label::draw(), gui::progress_bar::draw_contents(), mp::gamebrowser::draw_contents(), dialogs::unit_preview_pane::draw_contents(), mp::gamebrowser::draw_row(), draw_tip_of_day(), dialogs::file_dialog::format_dirname(), relative_size(), events::menu_handler::save_game(), CVideo::set_help_string(), loadscreen::set_progress(), gui::floating_textbox::update_location(), and default_map_generator::user_config().
const int font::SIZE_PLUS = relative_size(16) |
Definition at line 69 of file font.hpp.
Referenced by mp::wait::leader_preview_pane::draw_contents(), mp::gamebrowser::draw_row(), display::set_diagnostic(), and show_intro_part_helper().
const int font::SIZE_SMALL = relative_size(12) |
Definition at line 66 of file font.hpp.
Referenced by game_display::add_chat_message(), mp::wait::leader_preview_pane::draw_contents(), dialogs::campaign_preview_pane::draw_contents(), and dialogs::unit_preview_pane::draw_contents().
const int font::SIZE_TINY = relative_size(10) |
const int font::SIZE_XLARGE = relative_size(24) |
Definition at line 71 of file font.hpp.
Referenced by display::announce(), game_display::float_label(), about::show_about(), show_intro_part(), and the_end().
const char font::SMALL_TEXT = '`' |
Definition at line 30 of file marked-up_text.cpp.
Referenced by is_format_char(), parse_markup(), and about::show_about().
const SDL_Color font::STONED_COLOUR = {0xA0,0xA0,0xA0,0} |
const SDL_Color font::TITLE_COLOUR = {0xBC,0xB0,0x88,0} |
const SDL_Color font::YELLOW_COLOUR = {0xFF,0xFF,0x00,0} |
Definition at line 334 of file font.cpp.
Referenced by help::help_text_area::add_text_item(), game_display::draw_movement_info(), mp::gamebrowser::draw_row(), display::set_diagnostic(), help::string_to_color(), and gui::floating_textbox::update_location().
const char font::YELLOW_TEXT |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |