diff options
| author | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2020-03-07 01:49:54 -0600 |
|---|---|---|
| committer | in1tiate <32779090+in1tiate@users.noreply.github.com> | 2020-03-07 01:49:54 -0600 |
| commit | cc1afbe30ec154a146ebb663da1319fe04cd4a40 (patch) | |
| tree | f533049ffde3d4887fcfe39e09ea8e3feec1b661 /src/courtroom.cpp | |
| parent | ba17334fb8686f84a7dce862f85de829c0141b74 (diff) | |
add support for 2.4-style chatboxes
Diffstat (limited to 'src/courtroom.cpp')
| -rw-r--r-- | src/courtroom.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index b9686e70..3d85c303 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1655,7 +1655,21 @@ void Courtroom::handle_chatmessage_2() ui_vp_chatbox->set_image("chatmed.png"); else { - QString chatbox_path = ao_app->get_base_path() + "misc/" + chatbox + "/chatbox.png"; + QString chatbox_path; + QString misc_path = ao_app->get_base_path() + "misc/" + chatbox + "/chatbox.png"; + // support for 2.4 legacy chatboxes + QString legacy_path = ao_app->get_base_path() + "misc/" + chatbox + ".png"; + if (file_exists(misc_path)) + { + chatbox_path = misc_path; + } + else if (file_exists(legacy_path)) + chatbox_path = legacy_path; + else + { + QString hnngh_colonel = ao_app->get_theme_path("chatmed.png"); + chatbox_path = hnngh_colonel; + } ui_vp_chatbox->set_image_from_path(chatbox_path); } |
