This commit is contained in:
恍兮惚兮 2024-08-01 22:02:00 +08:00
parent ad69d15699
commit eaf28e6a25
22 changed files with 66 additions and 114 deletions

View File

@ -335,77 +335,6 @@ class noundictconfigdialog2(LDialog):
self.button.setFocus()
self.apply()
@Singleton_close
class regexedit(LDialog):
def __init__(self, parent, regexlist) -> None:
super().__init__(parent, Qt.WindowType.WindowCloseButtonHint)
self.regexlist = regexlist
self.setWindowTitle("正则匹配")
formLayout = QVBoxLayout(self) # 配置layout
self.model = LStandardItemModel()
self.model.setHorizontalHeaderLabels(["正则"])
table = TableViewW(self)
table.setModel(self.model)
table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
self.table = table
for row, regex in enumerate(regexlist):
self.model.insertRow(row, [QStandardItem(regex)])
button = threebuttons(texts=["添加行", "删除行", "立即应用"])
def clicked1():
regexlist.insert(0, "")
self.model.insertRow(0, [QStandardItem()])
button.btn1clicked.connect(clicked1)
def clicked2():
skip = []
for index in self.table.selectedIndexes():
if index.row() in skip:
continue
skip.append(index.row())
skip = reversed(sorted(skip))
for row in skip:
self.model.removeRow(row)
regexlist.pop(row)
button.btn2clicked.connect(clicked2)
button.btn3clicked.connect(self.apply)
self.button = button
formLayout.addWidget(table)
formLayout.addWidget(button)
self.resize(QSize(600, 400))
self.show()
def apply(self):
rows = self.model.rowCount()
dedump = set()
needremoves = []
for row in range(rows):
regex = self.model.item(row, 0).text()
if regex == "" or regex in dedump:
needremoves.append(row)
continue
self.regexlist[row] = regex
dedump.add(regex)
for row in reversed(needremoves):
self.model.removeRow(row)
self.regexlist.pop(row)
def closeEvent(self, _) -> None:
self.button.setFocus()
self.apply()
def autoinitdialog_items(dic):
items = []
for arg in dic["args"]:

View File

@ -14,13 +14,13 @@ from gui.pretransfile import sqlite2json2
from gui.codeacceptdialog import codeacceptdialog
from gui.setting_textinput_ocr import getocrgrid
from gui.dialog_savedgame import dialog_savedgame_integrated
from gui.inputdialog import regexedit
from gui.usefulwidget import (
D_getsimplecombobox,
D_getspinbox,
D_getIconButton,
getIconButton,
makegrid,
listediter,
yuitsu_switch,
getvboxwidget,
D_getsimpleswitch,
@ -376,8 +376,11 @@ def gethookembedgrid(self):
"内嵌安全性检查",
D_getsimpleswitch(globalconfig["embedded"], "safecheck_use"),
D_getIconButton(
callback=lambda: regexedit(
self, globalconfig["embedded"]["safecheckregexs"]
callback=lambda: listediter(
self,
"正则匹配",
"正则",
globalconfig["embedded"]["safecheckregexs"],
),
icon="fa.gear",
),

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "تأخر حقن ( ماجستير )",
"继承默认": "الميراث الافتراضي",
"游戏ID": "معرف اللعبة",
"俺たちに翼はない ―――under the innocent sky.": "إذا كان لديك أي معلومات أخرى عن هذا الموضوع الرجاء إضافته مجانا .",
"当前游戏ID": "معرف اللعبة الحالية",
"粘贴": "لصق"
"粘贴": "لصق",
"首尾": "الرأس والذيل",
"包含": "احتواء"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "延遲注入ms",
"继承默认": "繼承默認",
"游戏ID": "遊戲ID",
"俺たちに翼はない ―――under the innocent sky.": "俺たちに翼はない―――under the innocent sky.",
"当前游戏ID": "當前遊戲ID",
"粘贴": "粘貼"
"粘贴": "粘貼",
"首尾": "首尾",
"包含": "包含"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Zpožděná injekce (ms)",
"继承默认": "Zdědit výchozí",
"游戏ID": "ID hry",
"俺たちに翼はない ―――under the innocent sky.": "Moje křídla jsou pod nevinnou oblohou",
"当前游戏ID": "Aktuální ID hry",
"粘贴": "pasta"
"粘贴": "pasta",
"首尾": "Konec k konci",
"包含": "obsahovat"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Verspätete Injektion (ms)",
"继承默认": "Standard vererben",
"游戏ID": "Spiel-ID",
"俺たちに翼はない ―――under the innocent sky.": "Meine Flügel sind unter dem unschuldigen Himmel",
"当前游戏ID": "Aktuelle Spiel-ID",
"粘贴": "Paste"
"粘贴": "Paste",
"首尾": "Ende zu Ende",
"包含": "enthalten"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Delayed injection (ms)",
"继承默认": "Inherit default",
"游戏ID": "Game ID",
"俺たちに翼はない ―――under the innocent sky.": "My wings are under the innocent sky",
"当前游戏ID": "Current game ID",
"粘贴": "paste"
"粘贴": "paste",
"首尾": "End to end",
"包含": "contain"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Inyección de retraso (ms)",
"继承默认": "Heredar predeterminado",
"游戏ID": "ID del juego",
"俺たちに翼はない ―――under the innocent sky.": "ち mi ala es hermosa? Bajo el cielo innocent.",
"当前游戏ID": "Id actual del juego",
"粘贴": "Pegar"
"粘贴": "Pegar",
"首尾": "De principio a fin",
"包含": "Contiene"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Injection retardée (MS)",
"继承默认": "Héritage par défaut",
"游戏ID": "ID du jeu",
"俺たちに翼はない ―――under the innocent sky.": "Je suis sous le ciel innocent.",
"当前游戏ID": "Id de jeu actuel",
"粘贴": "Coller"
"粘贴": "Coller",
"首尾": "Première queue",
"包含": "Contient"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Iniezione ritardata (ms)",
"继承默认": "Eredi default",
"游戏ID": "ID gioco",
"俺たちに翼はない ―――under the innocent sky.": "Le mie ali sono sotto il cielo innocente",
"当前游戏ID": "ID del gioco corrente",
"粘贴": "pasta"
"粘贴": "pasta",
"首尾": "Fine a fine",
"包含": "contiene"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "遅延注入ms",
"继承默认": "デフォルトの継承",
"游戏ID": "ゲームID",
"俺たちに翼はない ―――under the innocent sky.": "私たちに翼はない――under the innocent sky.",
"当前游戏ID": "現在のゲームID",
"粘贴": "貼り付け"
"粘贴": "貼り付け",
"首尾": "首尾",
"包含": "含める"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "주입 지연 (ms)",
"继承默认": "기본 상속",
"游戏ID": "게임 ID",
"俺たちに翼はない ―――under the innocent sky.": "나의 날개는 다음과 같다 - under the innocent sky.",
"当前游戏ID": "현재 게임 ID",
"粘贴": "붙여넣기"
"粘贴": "붙여넣기",
"首尾": "수미",
"包含": "포함"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Vertraagde injectie (ms)",
"继承默认": "Standaard overnemen",
"游戏ID": "Game ID",
"俺たちに翼はない ―――under the innocent sky.": "Mijn vleugels zijn onder de onschuldige hemel",
"当前游戏ID": "Huidige game-ID",
"粘贴": "plakken"
"粘贴": "plakken",
"首尾": "End to end",
"包含": "bevatten"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Opóźnione wstrzyknięcie (ms)",
"继承默认": "Odziedziczyć domyślne",
"游戏ID": "Identyfikator gry",
"俺たちに翼はない ―――under the innocent sky.": "Moje skrzydła są pod niewinnym niebem",
"当前游戏ID": "Aktualny identyfikator gry",
"粘贴": "pasta"
"粘贴": "pasta",
"首尾": "Koniec do końca",
"包含": "zawierać"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Injeção retardada (ms)",
"继承默认": "Herdar por omissão",
"游戏ID": "ID do Jogo",
"俺たちに翼はない ―――under the innocent sky.": "Minhas asas estão sob o céu inocente",
"当前游戏ID": "ID do jogo actual",
"粘贴": "colar"
"粘贴": "colar",
"首尾": "De ponta a ponta",
"包含": "contém"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Задержка инъекции (ms)",
"继承默认": "Наследование по умолчанию",
"游戏ID": "Идентификатор игры",
"俺たちに翼はない ―――under the innocent sky.": "Под моим крылом",
"当前游戏ID": "Текущий идентификатор игры",
"粘贴": "Вставить"
"粘贴": "Вставить",
"首尾": "Голова и хвост",
"包含": "Включение"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Fördröjd injektion (ms)",
"继承默认": "Arv förval",
"游戏ID": "Spelid",
"俺たちに翼はない ―――under the innocent sky.": "Mina vingar är under den oskyldiga himlen",
"当前游戏ID": "Aktuellt spelID",
"粘贴": "klistra"
"粘贴": "klistra",
"首尾": "Slut till slut",
"包含": "innehåller"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "การฉีดล่าช้า (ms)",
"继承默认": "สืบทอดปริยาย",
"游戏ID": "รหัสเกม",
"俺たちに翼はない ―――under the innocent sky.": "คันทะชิบิ - ― อยู่ใต้ท้องฟ้า",
"当前游戏ID": "รหัสเกมปัจจุบัน",
"粘贴": "วางบน"
"粘贴": "วางบน",
"首尾": "หัวหาง",
"包含": "ประกอบด้วย"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Uzak injeksiyon (ms)",
"继承默认": "Ög- belgilengeni miras edin",
"游戏ID": "Oyun Kimliği",
"俺たちに翼はない ―――under the innocent sky.": "Kanatlarım masum gökyüzünün altında.",
"当前游戏ID": "Şimdiki oyun kimliği",
"粘贴": "Yapıştır"
"粘贴": "Yapıştır",
"首尾": "Sonuna kadar",
"包含": "içerir"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Затримка інструкції (мс)",
"继承默认": "Типовий спадковий",
"游戏ID": "ІД гри",
"俺たちに翼はない ―――under the innocent sky.": "Мої крила під невинним небом",
"当前游戏ID": "Поточний ідентифікатор гри",
"粘贴": "вставити"
"粘贴": "вставити",
"首尾": "Кінець до кінця",
"包含": "містити"
}

View File

@ -835,7 +835,8 @@
"延迟注入(ms)": "Tiêm chậm (ms)",
"继承默认": "Thừa kế mặc định",
"游戏ID": "ID trò chơi",
"俺たちに翼はない ―――under the innocent sky.": "Lời bài hát: Under The Innocent Sky",
"当前游戏ID": "ID game hiện tại",
"粘贴": "Dán"
"粘贴": "Dán",
"首尾": "Trang chủ",
"包含": "Bao gồm"
}

View File

@ -835,7 +835,8 @@
"其他参数": "",
"延迟注入(ms)": "",
"继承默认": "",
"俺たちに翼はない ―――under the innocent sky.": "",
"当前游戏ID": "",
"粘贴": ""
"粘贴": "",
"首尾": "",
"包含": ""
}