From eb014a97785db4a196d41fb38ee61612a54e0f6e Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Thu, 5 Dec 2019 22:46:26 +0300 Subject: Add a message delay modifier when punctuation is reached to simulate Ace Attorney 1 chat parsing (replicating the effect where characters would make a short pause, as if saying the line out loud) TODO: Make this a configurable thing --- include/courtroom.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index ea84122..6bca28e 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; -- cgit