diff options
| author | Salanto <62221668+Salanto@users.noreply.github.com> | 2024-05-24 04:54:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-24 04:54:48 +0200 |
| commit | 4c56a25463d15cf12e21fe512a598bee91b3363d (patch) | |
| tree | b0478364cd4d267c97334164aa876b41c1a841f9 /src/text_file_functions.cpp | |
| parent | 4b0f7e4d806c79313e493a3c58818e995af25847 (diff) | |
| parent | eb024cb93131cddba8ec1a6094abde8bf1f4eaf3 (diff) | |
Merge pull request #966 from AttorneyOnline/coolslide-rebased
[Feature] Courtroom slides + major AOLayer overhaul
Diffstat (limited to 'src/text_file_functions.cpp')
| -rw-r--r-- | src/text_file_functions.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index e7c4511b..418de47c 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -912,3 +912,24 @@ bool AOApplication::get_pos_is_judge(const QString &p_pos) } return positions.contains(p_pos.trimmed()); } + +int AOApplication::get_pos_transition_duration(const QString &old_pos, const QString &new_pos) +{ + if (old_pos.split(":").size() < 2 || new_pos.split(":").size() < 2) + { + return -1; // no subpositions + } + + QString new_subpos = new_pos.split(":")[1]; + + bool ok; + int duration = read_design_ini(old_pos + "/slide_ms_" + new_subpos, get_background_path("design.ini")).toInt(&ok); + if (ok) + { + return duration; + } + else + { + return -1; // invalid + } +} |
