diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/courtroom.cpp | 48 | ||||
| -rw-r--r-- | src/packet_distribution.cpp | 1 | ||||
| -rw-r--r-- | src/text_file_functions.cpp | 11 |
3 files changed, 38 insertions, 22 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 3f723974..3b3f6991 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -636,6 +636,7 @@ void Courtroom::set_widgets() } ui_music_display->play("music_display"); + ui_music_display->set_play_once(false); if (is_ao2_bg) { set_size_and_pos(ui_ic_chat_message, "ao2_ic_chat_message"); @@ -934,6 +935,14 @@ void Courtroom::set_widgets() ui_spectator->setToolTip(tr("Become a spectator. You won't be able to " "interact with the in-character screen.")); + free_brush = *new QBrush(ao_app->get_color("area_free_color", "courtroom_design.ini")); + lfp_brush = *new QBrush(ao_app->get_color("area_lfp_color", "courtroom_design.ini")); + casing_brush = *new QBrush(ao_app->get_color("area_casing_color", "courtroom_design.ini")); + recess_brush = *new QBrush(ao_app->get_color("area_recess_color", "courtroom_design.ini")); + rp_brush = *new QBrush(ao_app->get_color("area_rp_color", "courtroom_design.ini")); + gaming_brush = *new QBrush(ao_app->get_color("area_gaming_color", "courtroom_design.ini")); + locked_brush = *new QBrush(ao_app->get_color("area_locked_color", "courtroom_design.ini")); + refresh_evidence(); } @@ -975,7 +984,7 @@ void Courtroom::set_font(QWidget *widget, QString class_name, } } bool bold = ao_app->get_design_element(p_identifier + "_bold", design_file, p_char) == - 1; // is the font bold or not? + "1"; // is the font bold or not? bool antialias = ao_app->get_design_element(p_identifier + "_sharp", design_file, p_char) != "1"; // is the font anti-aliased or not? @@ -1237,6 +1246,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; @@ -1433,15 +1444,6 @@ void Courtroom::list_areas() ui_area_list->clear(); // ui_music_search->setText(""); - QString f_file = "courtroom_design.ini"; - - QBrush free_brush(ao_app->get_color("area_free_color", f_file)); - QBrush lfp_brush(ao_app->get_color("area_lfp_color", f_file)); - QBrush casing_brush(ao_app->get_color("area_casing_color", f_file)); - QBrush recess_brush(ao_app->get_color("area_recess_color", f_file)); - QBrush rp_brush(ao_app->get_color("area_rp_color", f_file)); - QBrush gaming_brush(ao_app->get_color("area_gaming_color", f_file)); - QBrush locked_brush(ao_app->get_color("area_locked_color", f_file)); int n_listed_areas = 0; @@ -1856,12 +1858,20 @@ void Courtroom::handle_chatmessage(QStringList *p_contents) log_maximum_blocks > 0) { ic_chatlog_history.removeFirst(); } - - append_ic_text(m_chatmessage[MESSAGE], f_displayname, "", 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) { @@ -2884,6 +2894,12 @@ void Courtroom::chat_tick() next_character_is_not_special = false; } + // Keep the speed at bay. + if (current_display_speed < 0) + current_display_speed = 0; + else if (current_display_speed > 6) + current_display_speed = 6; + if ((message_display_speed[current_display_speed] <= 0 && tick_pos < f_message.size() - 1) || formatting_char) { @@ -2912,12 +2928,6 @@ void Courtroom::chat_tick() ui_vp_message->ensureCursorVisible(); - // Keep the speed at bay. - if (current_display_speed < 0) - current_display_speed = 0; - else if (current_display_speed > 6) - current_display_speed = 6; - // Blip player and real tick pos ticker if (!formatting_char && (f_character != ' ' || blank_blip)) { if (blip_ticker % blip_rate == 0) { diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index b543cfb5..fd7453ee 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -676,6 +676,7 @@ void AOApplication::server_packet_received(AOPacket *p_packet) w_courtroom->arup_modify(arup_type, n_element - 1, f_contents.at(n_element)); } + w_courtroom->list_areas(); } } else if (header == "IL") { diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 39754f39..45dd34f6 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); @@ -908,6 +908,11 @@ QString AOApplication::get_effect_sound(QString fx_name, QString p_char) f_result = read_design_ini(fx_name, default_path); } } + + if(fx_name == "realization"){ + f_result = get_custom_realization(p_char); + } + return f_result; } |
