From 0e2bd0b110fe44f485871d20b5e614a214470f12 Mon Sep 17 00:00:00 2001 From: Alex Noir Date: Fri, 18 Feb 2022 22:02:18 +0300 Subject: Add icons for iniswaps and emotes in the dropdown Fix iniswap list not recognizing a name that's different from a character folder when switching to that character --- src/emotes.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/emotes.cpp') diff --git a/src/emotes.cpp b/src/emotes.cpp index 53f2b065..547dc0ea 100644 --- a/src/emotes.cpp +++ b/src/emotes.cpp @@ -141,14 +141,14 @@ void Courtroom::set_emote_dropdown() ui_emote_dropdown->clear(); int total_emotes = ao_app->get_emote_number(current_char); - QStringList emote_list; for (int n = 0; n < total_emotes; ++n) { - emote_list.append(QString::number(n + 1) + ": " + - ao_app->get_emote_comment(current_char, n)); + ui_emote_dropdown->addItem(QString::number(n + 1) + ": " + + ao_app->get_emote_comment(current_char, n)); + QString icon_path = ao_app->get_image_suffix(ao_app->get_character_path( + current_char, "emotions/button" + QString::number(n + 1) + "_off")); + ui_emote_dropdown->setItemIcon(n, QIcon(icon_path)); } - - ui_emote_dropdown->addItems(emote_list); } void Courtroom::select_emote(int p_id) -- cgit