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/emotes.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/emotes.cpp')
| -rw-r--r-- | src/emotes.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emotes.cpp b/src/emotes.cpp index b6a217e6..daa8d6d4 100644 --- a/src/emotes.cpp +++ b/src/emotes.cpp @@ -89,9 +89,9 @@ void Courtroom::set_emote_page() AOEmoteButton *f_emote = ui_emote_list.at(n_emote); if (n_real_emote == current_emote) - f_emote->set_image(current_char, n_real_emote, "_on.png"); + f_emote->set_image(current_char, n_real_emote, "_on"); else - f_emote->set_image(current_char, n_real_emote, "_off.png"); + f_emote->set_image(current_char, n_real_emote, "_off"); f_emote->show(); } @@ -119,14 +119,14 @@ void Courtroom::select_emote(int p_id) int max = (max_emotes_on_page - 1) + current_emote_page * max_emotes_on_page; if (current_emote >= min && current_emote <= max) - ui_emote_list.at(current_emote % max_emotes_on_page)->set_image(current_char, current_emote, "_off.png"); + ui_emote_list.at(current_emote % max_emotes_on_page)->set_image(current_char, current_emote, "_off"); int old_emote = current_emote; current_emote = p_id; if (current_emote >= min && current_emote <= max) - ui_emote_list.at(current_emote % max_emotes_on_page)->set_image(current_char, current_emote, "_on.png"); + ui_emote_list.at(current_emote % max_emotes_on_page)->set_image(current_char, current_emote, "_on"); int emote_mod = ao_app->get_emote_mod(current_char, current_emote); |
