aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 0991a52a..2e2f2a5a 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1787,7 +1787,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
f_charname = ao_app->get_showname(char_list.at(f_char_id).name);
chatlogpiece *temp =
- new chatlogpiece(f_charname, f_showname, m_chatmessage[MESSAGE], false);
+ new chatlogpiece(f_charname, f_showname, m_chatmessage[MESSAGE], false, m_chatmessage[TEXT_COLOR].toInt());
ic_chatlog_history.append(*temp);
ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true);
@@ -1796,7 +1796,7 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
ic_chatlog_history.removeFirst();
}
- append_ic_text(m_chatmessage[MESSAGE], f_showname);
+ append_ic_text(m_chatmessage[MESSAGE], f_showname, "", m_chatmessage[TEXT_COLOR].toInt());
int objection_mod = m_chatmessage[OBJECTION_MOD].toInt();
QString f_char = m_chatmessage[CHAR_NAME];
@@ -2482,7 +2482,7 @@ QString Courtroom::filter_ic_text(QString p_text, bool html, int target_pos,
return p_text_escaped;
}
-void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action)
+void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action, int color)
{
QTextCharFormat bold;
QTextCharFormat normal;
@@ -2495,7 +2495,7 @@ void Courtroom::append_ic_text(QString p_text, QString p_name, QString p_action)
if (p_action == "")
p_text = filter_ic_text(p_text, ao_app->is_colorlog_enabled(), -1,
- m_chatmessage[TEXT_COLOR].toInt());
+ color);
if (log_goes_downwards) {
const bool is_scrolled_down =
@@ -3080,7 +3080,7 @@ void Courtroom::handle_song(QStringList *p_contents)
}
if (!mute_map.value(n_char)) {
- chatlogpiece *temp = new chatlogpiece(str_char, str_show, f_song, true);
+ chatlogpiece *temp = new chatlogpiece(str_char, str_show, f_song, true, m_chatmessage[TEXT_COLOR].toInt());
ic_chatlog_history.append(*temp);
ao_app->append_to_file(temp->get_full(), ao_app->log_filename, true);
@@ -4516,14 +4516,14 @@ void Courtroom::on_showname_enable_clicked()
append_ic_text(item.get_message(), item.get_showname(),
tr("has played a song"));
else
- append_ic_text(item.get_message(), item.get_showname());
+ append_ic_text(item.get_message(), item.get_showname(), "", item.get_chat_color());
}
else {
if (item.is_song())
append_ic_text(item.get_message(), item.get_name(),
tr("has played a song"));
else
- append_ic_text(item.get_message(), item.get_name());
+ append_ic_text(item.get_message(), item.get_name(), "", item.get_chat_color());
}
}