From fc9fe6b34b98dfc3a3b3aa3e342a638019071f45 Mon Sep 17 00:00:00 2001 From: windrammer <31085911+likeawindrammer@users.noreply.github.com> Date: Wed, 29 Jul 2020 16:08:39 -0600 Subject: Fix colors not persisting when refreshing IC log (#204) Co-authored-by: Cents02 --- include/chatlogpiece.h | 7 ++++--- include/courtroom.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/chatlogpiece.h b/include/chatlogpiece.h index f3a9dc8b..14d4b349 100644 --- a/include/chatlogpiece.h +++ b/include/chatlogpiece.h @@ -10,9 +10,9 @@ class chatlogpiece { public: chatlogpiece(); chatlogpiece(QString p_name, QString p_showname, QString p_message, - bool p_song); + bool p_song,int color); chatlogpiece(QString p_name, QString p_showname, QString p_message, - bool p_song, QDateTime p_datetime); + bool p_song, int color, QDateTime p_datetime); QString get_name(); QString get_showname(); @@ -20,7 +20,7 @@ public: bool is_song(); QDateTime get_datetime(); QString get_datetime_as_string(); - + int get_chat_color(); QString get_full(); private: @@ -28,6 +28,7 @@ private: QString showname; QString message; QDateTime datetime; + int color; bool p_is_song; }; diff --git a/include/courtroom.h b/include/courtroom.h index ee682ba8..1862c772 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -221,7 +221,7 @@ public: // this function keeps the chatlog scrolled to the top unless there's text // selected // or the user isn't already scrolled to the top - void append_ic_text(QString p_text, QString p_name = "", QString action = ""); + void append_ic_text(QString p_text, QString p_name = "", QString action = "", int color = 0); // prints who played the song to IC chat and plays said song(if found on local // filesystem) takes in a list where the first element is the song name and the -- cgit