Skip to content

Commit

Permalink
Update courtroom.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Satoru-1816 authored Jan 13, 2025
1 parent 4273cda commit da6dcc3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/courtroom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3220,6 +3220,8 @@ void Courtroom::do_character_slide(QWidget *widget)
QPoint new_pos_player = QPoint(
ui_viewport->width() * self_offset / 100,
ui_viewport->height() * self_offset_v / 100);

qDebug() << "ui_viewport width: " << QString::number(ui_viewport->width());

QPropertyAnimation *slide_animation = new QPropertyAnimation(widget, "pos", this);
slide_animation->setDuration(500);
Expand Down Expand Up @@ -4190,9 +4192,6 @@ void Courtroom::start_chat_ticking()

if (last_x_offset == char_offset)
this->do_character_bounce();

if (char_offset != last_x_offset)
this->do_character_slide(ui_vp_player_char);

// handle expanded desk mods
switch(m_chatmessage[DESK_MOD].toInt()) {
Expand Down Expand Up @@ -4266,6 +4265,9 @@ void Courtroom::start_chat_ticking()
return;
}

if (char_offset != last_x_offset)
this->do_character_slide(ui_vp_player_char);

ui_vp_chatbox->show();
ui_vp_message->show();

Expand Down

0 comments on commit da6dcc3

Please sign in to comment.