Project Alice
|
Namespaces | |
namespace | detail |
namespace | impl |
Classes | |
class | bm_font |
struct | char_descriptor |
struct | columnar_layout |
struct | embedded_flag |
struct | embedded_unit_icon |
struct | endless_layout |
class | font |
class | font_manager |
struct | fp_currency |
struct | fp_four_places |
struct | fp_one_place |
struct | fp_percentage |
struct | fp_percentage_one_place |
struct | fp_three_places |
struct | fp_two_places |
struct | glyph_sub_offset |
struct | int_percentage |
struct | int_wholenum |
struct | layout |
struct | layout_base |
struct | layout_box |
struct | layout_parameters |
struct | line_break |
struct | pretty_integer |
struct | single_line_layout |
struct | stored_glyph |
struct | stored_glyphs |
struct | surrogate_pair |
struct | text_chunk |
struct | vector_backed_ci_eq |
struct | vector_backed_ci_hash |
struct | vector_backed_eq |
struct | vector_backed_hash |
Typedefs | |
using | substitution = std::variant< std::string_view, dcon::text_key, dcon::province_id, dcon::state_instance_id, dcon::nation_id, dcon::national_identity_id, int64_t, fp_one_place, sys::date, std::monostate, fp_two_places, fp_three_places, fp_four_places, fp_currency, pretty_integer, fp_percentage, fp_percentage_one_place, int_percentage, int_wholenum, dcon::state_definition_id, embedded_icon, embedded_flag, embedded_unit_icon > |
using | substitution_map = ankerl::unordered_dense::map< uint32_t, substitution > |
Variables | |
constexpr float | rt_2 = 1.41421356237309504f |
constexpr uint32_t | max_texture_layers = 256 |
constexpr int | magnification_factor = 4 |
constexpr int | dr_size = 64 * magnification_factor |
using text::substitution = typedef std::variant<std::string_view, dcon::text_key, dcon::province_id, dcon::state_instance_id, dcon::nation_id, dcon::national_identity_id, int64_t, fp_one_place, sys::date, std::monostate, fp_two_places, fp_three_places, fp_four_places, fp_currency, pretty_integer, fp_percentage, fp_percentage_one_place, int_percentage, int_wholenum, dcon::state_definition_id, embedded_icon, embedded_flag, embedded_unit_icon> |
using text::substitution_map = typedef ankerl::unordered_dense::map<uint32_t, substitution> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
void text::add_divider_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
dcon::text_key | txt, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
dcon::text_key | txt, | ||
variable_type | subkey, | ||
substitution | value, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
dcon::text_key | txt, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkey_b, | ||
substitution | value_b, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
dcon::text_key | txt, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkey_b, | ||
substitution | value_b, | ||
variable_type | subkey_c, | ||
substitution | value_c, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
dcon::text_key | txt, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkey_b, | ||
substitution | value_b, | ||
variable_type | subkey_c, | ||
substitution | value_c, | ||
variable_type | subkey_d, | ||
substitution | value_d, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
variable_type | subkey, | ||
substitution | value, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkey_b, | ||
substitution | value_b, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkey_b, | ||
substitution | value_b, | ||
variable_type | subkey_c, | ||
substitution | value_c, | ||
int32_t | indent | ||
) |
void text::add_line | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkey_b, | ||
substitution | value_b, | ||
variable_type | subkey_c, | ||
substitution | value_c, | ||
variable_type | subkey_d, | ||
substitution | value_d, | ||
int32_t | indent | ||
) |
void text::add_line_break_to_layout | ( | sys::state & | state, |
columnar_layout & | dest | ||
) |
void text::add_line_break_to_layout | ( | sys::state & | state, |
endless_layout & | dest | ||
) |
void text::add_line_break_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box | ||
) |
void text::add_line_with_condition | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
bool | condition_met, | ||
int32_t | indent | ||
) |
void text::add_line_with_condition | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
bool | condition_met, | ||
variable_type | subkey, | ||
substitution | value, | ||
int32_t | indent | ||
) |
void text::add_line_with_condition | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
bool | condition_met, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkeyb, | ||
substitution | valueb, | ||
int32_t | indent | ||
) |
void text::add_line_with_condition | ( | sys::state & | state, |
layout_base & | dest, | ||
std::string_view | key, | ||
bool | condition_met, | ||
variable_type | subkey, | ||
substitution | value, | ||
variable_type | subkeyb, | ||
substitution | valueb, | ||
variable_type | subkeyc, | ||
substitution | valuec, | ||
int32_t | indent | ||
) |
void text::add_space_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
dcon::text_key | source_text, | ||
substitution_map const & | mp | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
embedded_flag | ico | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
embedded_icon | ico | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
embedded_unit_icon | ico | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
std::string const & | val, | ||
text_color | color | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
std::string_view | text, | ||
text_color | color, | ||
substitution | source | ||
) |
void text::add_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
substitution | val, | ||
text_color | color | ||
) |
void text::add_to_substitution_map | ( | substitution_map & | mp, |
variable_type | key, | ||
std::string const & | |||
) |
void text::add_to_substitution_map | ( | substitution_map & | mp, |
variable_type | key, | ||
substitution | value | ||
) |
void text::add_unparsed_text_to_layout_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
std::string_view | sv, | ||
substitution_map const & | mp | ||
) |
text_color text::char_to_color | ( | char | in | ) |
std::string_view text::classic_unligate_utf8 | ( | text::font & | font, |
char32_t | c | ||
) |
void text::close_layout_box | ( | columnar_layout & | dest, |
layout_box & | box | ||
) |
void text::close_layout_box | ( | endless_layout & | dest, |
layout_box & | box | ||
) |
void text::close_layout_box | ( | layout_base & | dest, |
layout_box & | box | ||
) |
void text::close_layout_box | ( | single_line_layout & | dest, |
layout_box & | box | ||
) |
uint32_t text::codepoint_from_utf8 | ( | char const * | start, |
char const * | end | ||
) |
void text::consume_csv_file | ( | sys::state & | state, |
char const * | file_content, | ||
uint32_t | file_size, | ||
int32_t | target_column, | ||
bool | as_unicode | ||
) |
columnar_layout text::create_columnar_layout | ( | sys::state & | state, |
layout & | dest, | ||
layout_parameters const & | params, | ||
int32_t | column_width | ||
) |
endless_layout text::create_endless_layout | ( | sys::state & | state, |
layout & | dest, | ||
layout_parameters const & | params | ||
) |
std::string text::date_to_string | ( | sys::state & | state, |
sys::date | date | ||
) |
void text::dead_reckoning | ( | float | distance_map[dr_size *dr_size], |
bool const | in_map[dr_size *dr_size] | ||
) |
dcon::text_key text::find_or_add_key | ( | sys::state & | state, |
std::string_view | key, | ||
bool | as_unicode | ||
) |
uint32_t text::font_index | ( | std::string_view | txt | ) |
font_selection text::font_index_from_font_id | ( | sys::state & | state, |
uint16_t | id | ||
) |
uint32_t text::font_size | ( | std::string_view | txt | ) |
std::string text::format_float | ( | float | num, |
size_t | digits | ||
) |
std::string text::format_money | ( | float | num | ) |
std::string text::format_percentage | ( | float | num, |
size_t | digits | ||
) |
std::string text::format_ratio | ( | int32_t | left, |
int32_t | right | ||
) |
std::string text::format_wholenum | ( | int32_t | num | ) |
dcon::text_key text::get_adjective | ( | sys::state & | state, |
dcon::nation_id | id | ||
) |
|
inline |
|
inline |
std::string text::get_adjective_as_string | ( | sys::state & | state, |
T | t | ||
) |
bm_font const & text::get_bm_font | ( | sys::state & | state, |
uint16_t | font_handle | ||
) |
Definition at line 162 of file bmfont.cpp.
std::string text::get_dynamic_state_name | ( | sys::state & | state, |
dcon::state_instance_id | state_id | ||
) |
std::string text::get_focus_category_name | ( | sys::state const & | state, |
nations::focus_type | category | ||
) |
std::string text::get_influence_level_name | ( | sys::state const & | state, |
uint8_t | v | ||
) |
dcon::text_key text::get_name | ( | sys::state & | state, |
dcon::nation_id | id | ||
) |
|
inline |
|
inline |
std::string text::get_name_as_string | ( | sys::state & | state, |
T | t | ||
) |
std::string text::get_province_state_name | ( | sys::state & | state, |
dcon::province_id | prov_id | ||
) |
dcon::text_key text::get_ruler_title | ( | sys::state & | state, |
dcon::nation_id | n | ||
) |
std::string text::get_short_state_name | ( | sys::state & | state, |
dcon::state_instance_id | state_id | ||
) |
bool text::is_black_font | ( | std::string_view | txt | ) |
bool text::is_black_from_font_id | ( | uint16_t | id | ) |
bool text::is_fixed_token_ci | ( | std::string_view | v, |
char const (&) | t[N] | ||
) |
|
inline |
void text::localised_format_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
std::string_view | key, | ||
text::substitution_map const & | sub | ||
) |
void text::localised_single_sub_box | ( | sys::state & | state, |
layout_base & | dest, | ||
layout_box & | box, | ||
std::string_view | key, | ||
variable_type | subkey, | ||
substitution | value | ||
) |
dcon::text_key text::localize_month | ( | sys::state const & | state, |
uint16_t | month | ||
) |
text::alignment text::localized_alignment | ( | sys::state & | state, |
text::alignment | in | ||
) |
ui::alignment text::localized_alignment | ( | sys::state & | state, |
ui::alignment | in | ||
) |
|
inlinenoexcept |
uint16_t text::name_into_font_id | ( | sys::state & | state, |
std::string_view | txt | ||
) |
void text::nation_name_and_flag | ( | sys::state & | state, |
dcon::nation_id | n, | ||
layout_base & | dest, | ||
int32_t | indent | ||
) |
layout_box text::open_layout_box | ( | layout_base & | dest, |
int32_t | indent | ||
) |
std::string text::prettify | ( | int64_t | num | ) |
std::string text::prettify_currency | ( | float | num | ) |
std::string text::produce_simple_string | ( | sys::state const & | state, |
dcon::text_key | id | ||
) |
std::string text::produce_simple_string | ( | sys::state const & | state, |
std::string_view | txt | ||
) |
|
inline |
std::string text::resolve_string_substitution | ( | sys::state & | state, |
dcon::text_key | source_text, | ||
substitution_map const & | mp | ||
) |
std::string text::resolve_string_substitution | ( | sys::state & | state, |
std::string_view | key, | ||
substitution_map const & | mp | ||
) |
int32_t text::size_from_font_id | ( | uint16_t | id | ) |
size_t text::size_from_utf8 | ( | char const * | start, |
char const * | |||
) |
text::alignment text::to_text_alignment | ( | ui::alignment | in | ) |
variable_type text::variable_type_from_name | ( | std::string_view | v | ) |
char16_t text::win1250toUTF16 | ( | char | in | ) |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |