From 91bbdde9b2d220f0aa108f573b7f735f49f3bea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Fri, 20 Dec 2024 23:18:28 +0800 Subject: [PATCH] . --- py/LunaTranslator/gui/dialog_savedgame_v3.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/py/LunaTranslator/gui/dialog_savedgame_v3.py b/py/LunaTranslator/gui/dialog_savedgame_v3.py index 57a426a8..5e18610d 100644 --- a/py/LunaTranslator/gui/dialog_savedgame_v3.py +++ b/py/LunaTranslator/gui/dialog_savedgame_v3.py @@ -842,7 +842,25 @@ class dialog_savedgame_v3(QWidget): self.currentfocusuid = None self.reftagid = None self.reallist = {} - self.stack = stackedlist() + + class ___(stackedlist): + def keyPressEvent(self, e: QKeyEvent): + if e.key() == Qt.Key.Key_Return: + startgamecheck( + self.ref, + getreflist(self.ref.reftagid), + self.ref.currentfocusuid, + ) + elif e.key() == Qt.Key.Key_Delete: + self.ref.shanchuyouxi() + elif e.key() == Qt.Key.Key_Left: + self.ref.moverank(-1) + elif e.key() == Qt.Key.Key_Right: + self.ref.moverank(1) + super().keyPressEvent(e) + + self.stack = ___() + self.stack.ref = self self.stack.setheight( globalconfig["dialog_savegame_layout"]["listitemheight"] + 1 )