From c911fa00b08e33bd439a0d07de50015dc658d31a Mon Sep 17 00:00:00 2001 From: cidoku Date: Fri, 28 Feb 2025 17:27:22 -0300 Subject: [PATCH] accidentally broke new bg packet --- gameview.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gameview.py b/gameview.py index 76ff24d..6777507 100644 --- a/gameview.py +++ b/gameview.py @@ -863,6 +863,7 @@ class gui(QtGui.QWidget): self.slide_bg = QtGui.QLabel(self.viewport) self.slide_bg_animation = QtCore.QPropertyAnimation(self.slide_bg, "geometry") self.slide_bg_animation.finished.connect(self.slide_done) + self.slide_bg_animation.valueChanged.connect(self.slide_changed) self.slide_bg.hide() self.zoom = ZoomLines(self.viewport) @@ -2260,11 +2261,9 @@ class gui(QtGui.QWidget): blip = ini.read_ini(AOpath+"characters/"+self.charname+"/char.ini", "options", "gender") if blip: msg += str(blip) + "#" - else: - msg += "#" - - # Slides - msg += "0#" + + # Slides + msg += "%d#" % self.slidebutton.isChecked() msg += "%" @@ -2339,7 +2338,7 @@ class gui(QtGui.QWidget): self.bench.hide() self.slide_bg.show() - bg_start = QtCore.QRect(0, 0, self.slide_bg.width(), self.slide_bg.height()) + bg_start = QtCore.QRect(0, 0, self.slide_bg.width(), VIEWPORT_H) bg_end = QtCore.QRect(-bg_start.size().width() + VIEWPORT_W, bg_start.top(), bg_start.size().width(), VIEWPORT_H) self.slide_bg_animation.setStartValue(bg_start) self.slide_bg_animation.setEndValue(bg_end) @@ -2356,8 +2355,14 @@ class gui(QtGui.QWidget): self.slide_overlay_animation.start() def slide_done(self): + print "---------------------" self.slide_bg.hide() self.slide_overlay.hide() + + def slide_changed(self): + x = self.slide_bg_animation.currentValue().toRect().x() + if x < -648: + print "half" def netmsg_hp(self, type, health): if type == 1: @@ -3686,7 +3691,7 @@ class TCP_Thread(QtCore.QThread): connectionError = QtCore.pyqtSignal(str, str, str) MS_Chat = QtCore.pyqtSignal(list) newChar = QtCore.pyqtSignal(str) - newBackground = QtCore.pyqtSignal(str) + newBackground = QtCore.pyqtSignal(str, bool) IC_Log = QtCore.pyqtSignal(str) OOC_Log = QtCore.pyqtSignal(str) charSlots = QtCore.pyqtSignal()