diff options
| author | Crystalwarrior <varsash@gmail.com> | 2019-09-16 21:08:43 +0300 |
|---|---|---|
| committer | Crystalwarrior <varsash@gmail.com> | 2019-09-16 21:08:43 +0300 |
| commit | b085be5a2a0512c432bc9fd58413a9d8f93d451e (patch) | |
| tree | 871d7b8c85a7df9db13ab0f9fb35703d9a50628a /src/text_file_functions.cpp | |
| parent | b037edc9d8360ee679cae8d5f6c4d138ede4482b (diff) | |
Add two new helper functions - get_design_element and get_static_image_suffix
Modify all set_image calls to utilize said suffix helper function
Dynamically change betweehn chatblank, chat, chatmed, chatbig based on the showname's length
Use char.ini showname if showname is set to whitespace (doesn't yet check if char.ini showname is also whitespace)
Diffstat (limited to 'src/text_file_functions.cpp')
| -rw-r--r-- | src/text_file_functions.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 02c0b711..48ebeea9 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -292,6 +292,15 @@ pos_size_type AOApplication::get_element_dimensions(QString p_identifier, QStrin return return_value; } +QString AOApplication::get_design_element(QString p_identifier, QString p_file) +{ + QString design_ini_path = get_theme_path(p_file); + QString f_result = read_design_ini(p_identifier, design_ini_path); + QString default_path = get_default_theme_path(p_file); + if (f_result == "") + f_result = read_design_ini(p_identifier, default_path); + return f_result; +} QString AOApplication::get_font_name(QString p_identifier, QString p_file) { QString design_ini_path = get_theme_path(p_file); @@ -501,6 +510,10 @@ QString AOApplication::get_image_suffix(QString path_to_check) return path_to_check + ".png"; } +QString AOApplication::get_static_image_suffix(QString path_to_check) +{ + return path_to_check + ".png"; +} //returns whatever is to the right of "search_line =" within target_tag and terminator_tag, trimmed //returns the empty string if the search line couldnt be found |
