aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/courtroom.h6
-rw-r--r--src/courtroom.cpp9
2 files changed, 14 insertions, 1 deletions
diff --git a/include/courtroom.h b/include/courtroom.h
index ea841229..6bca28e4 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -332,6 +332,12 @@ private:
//the amount of time non-animated witness testimony/cross-examination images stay onscreen for in ms
const int wtce_stay_time = 1500;
+ //characters we consider punctuation
+ const QString punctuation_chars = ".,?!:;";
+
+ //amount by which we multiply the delay when we parse punctuation chars
+ const int punctuation_modifier = 3;
+
static const int chatmessage_size = 30;
QString m_chatmessage[chatmessage_size];
bool chatmessage_is_empty = false;
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 0695fe7c..f4f513a2 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -2638,6 +2638,7 @@ void Courtroom::chat_tick()
}
else
{
+ int msg_delay = message_display_speed[current_display_speed];
//Do the colors, gradual showing, etc. in here
ui_vp_message->setHtml(additive_previous + filter_ic_text(f_message, true, tick_pos, m_chatmessage[TEXT_COLOR].toInt()));
@@ -2667,6 +2668,12 @@ void Courtroom::chat_tick()
++blip_ticker;
}
+ //Punctuation delayer
+ if (punctuation_chars.contains(f_character))
+ {
+ msg_delay *= punctuation_modifier;
+ }
+
//If this color is talking
if (color_is_talking && anim_state != 2 && anim_state < 4) //Set it to talking as we're not on that already (though we have to avoid interrupting a non-interrupted preanim)
{
@@ -2681,7 +2688,7 @@ void Courtroom::chat_tick()
anim_state = 3;
}
//Continue ticking
- chat_tick_timer->start(message_display_speed[current_display_speed]);
+ chat_tick_timer->start(msg_delay);
}
}