aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/courtroom.cpp14
-rw-r--r--src/text_file_functions.cpp6
2 files changed, 15 insertions, 5 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 8223024d..a0c7e2c1 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1238,6 +1238,8 @@ void Courtroom::update_character(int p_cid)
current_char = f_char;
current_side = ao_app->get_char_side(current_char);
+ set_text_color_dropdown();
+
current_emote_page = 0;
current_emote = 0;
@@ -1879,11 +1881,19 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
ic_chatlog_history.removeFirst();
}
- append_ic_text(m_chatmessage[MESSAGE], f_showname, "", m_chatmessage[TEXT_COLOR].toInt());
-
QString f_char = m_chatmessage[CHAR_NAME];
QString f_custom_theme = ao_app->get_char_shouts(f_char);
+ // Load the colors in case it's using a custom chatbox with custom colors.
+ // Or reload the default ones in case it's not using custom colors
+ color_rgb_list.clear();
+ for (int c = 0; c < max_colors; ++c) {
+ QColor color = ao_app->get_chat_color("c" + QString::number(c), f_char);
+ color_rgb_list.append(color);
+ }
+
+ append_ic_text(m_chatmessage[MESSAGE], f_showname, "", m_chatmessage[TEXT_COLOR].toInt());
+
// if an objection is used
if (objection_mod <= 4 && objection_mod >= 1) {
switch (objection_mod) {
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp
index 39754f39..4ceb29a3 100644
--- a/src/text_file_functions.cpp
+++ b/src/text_file_functions.cpp
@@ -435,7 +435,7 @@ QString AOApplication::get_tagged_stylesheet(QString target_tag, QString p_file)
QString AOApplication::get_chat_markdown(QString p_identifier, QString p_chat)
{
- QString design_ini_path = get_base_path() + "misc/" + p_chat + "/config.ini";
+ QString design_ini_path = get_base_path() + "misc/" + get_chat(p_chat) + "/config.ini";
QString default_path = get_base_path() + "misc/default/config.ini";
QString f_result = read_design_ini(p_identifier, design_ini_path);
@@ -449,9 +449,9 @@ QColor AOApplication::get_chat_color(QString p_identifier, QString p_chat)
{
QColor return_color(255, 255, 255);
- QString design_ini_path = get_base_path() + "misc/" + p_chat + "/config.ini";
+ QString design_ini_path = get_base_path() + "misc/" + get_chat(p_chat) + "/config.ini";
QString default_path = get_base_path() + "misc/default/config.ini";
- QString f_result = read_design_ini("c" + p_identifier, design_ini_path);
+ QString f_result = read_design_ini(p_identifier, design_ini_path);
if (f_result == "") {
f_result = read_design_ini(p_identifier, default_path);