aboutsummaryrefslogtreecommitdiff
path: root/src/courtroom.cpp
diff options
context:
space:
mode:
authorSalanto <62221668+Salanto@users.noreply.github.com>2024-08-24 15:33:49 +0200
committerGitHub <noreply@github.com>2024-08-24 15:33:49 +0200
commit50204ec2e265373452c1b4ff4eb2b8dafbb516e8 (patch)
tree823ff06ddb2fe077212214529a750a807e1a8254 /src/courtroom.cpp
parentb7dd8984d75517654dff51465b756b06641a28ec (diff)
[Bugfix] Fix slides not applying the X offset during slide position calculaiton (#1038)
* Make slides correctly respect X offset * Bump to RC4 cause I am cute like that
Diffstat (limited to 'src/courtroom.cpp')
-rw-r--r--src/courtroom.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index 3f1e938a..1009cb58 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -1,5 +1,6 @@
#include "courtroom.h"
+#include "datatypes.h"
#include "moderation_functions.h"
#include "options.h"
@@ -3008,7 +3009,7 @@ void Courtroom::do_transition(QString p_desk_mod, QString oldPosId, QString newP
auto calculate_offset_and_setup_layer = [&, this](kal::CharacterAnimationLayer *layer, QPoint newPos, QString rawOffset) {
QPoint offset;
- QStringList offset_data = rawOffset.split(",");
+ QStringList offset_data = rawOffset.split("&");
offset.setX(viewport_width * offset_data.at(0).toInt() * 0.01);
if (offset_data.size() > 1)
{
@@ -3019,7 +3020,7 @@ void Courtroom::do_transition(QString p_desk_mod, QString oldPosId, QString newP
layer->setPlayOnce(false);
layer->pausePlayback(true);
layer->startPlayback();
- layer->move(newPos);
+ layer->move(newPos + offset);
layer->show();
};