mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-01 10:04:12 +08:00
.
This commit is contained in:
parent
dcfe077807
commit
a4e1350089
@ -17,6 +17,7 @@ from gui.dialog_savedgame import browserdialog, dialog_savedgame_integrated
|
|||||||
|
|
||||||
|
|
||||||
class QUnFrameWindow(resizableframeless):
|
class QUnFrameWindow(resizableframeless):
|
||||||
|
displayglobaltooltip= pyqtSignal(str)
|
||||||
displayres = pyqtSignal(dict)
|
displayres = pyqtSignal(dict)
|
||||||
displayraw1 = pyqtSignal(dict)
|
displayraw1 = pyqtSignal(dict)
|
||||||
displaystatus = pyqtSignal(str, str, bool, bool)
|
displaystatus = pyqtSignal(str, str, bool, bool)
|
||||||
@ -591,10 +592,15 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
self.showbuttons = []
|
self.showbuttons = []
|
||||||
self.stylebuttons = {}
|
self.stylebuttons = {}
|
||||||
self.saveiterclasspointer = {}
|
self.saveiterclasspointer = {}
|
||||||
|
def displayglobaltooltip_f(self,string):
|
||||||
|
QToolTip.showText(
|
||||||
|
QCursor.pos(),
|
||||||
|
string,
|
||||||
|
gobject.baseobject.translation_ui,
|
||||||
|
)
|
||||||
def initsignals(self):
|
def initsignals(self):
|
||||||
self.hidesignal.connect(self.hide_)
|
self.hidesignal.connect(self.hide_)
|
||||||
|
self.displayglobaltooltip.connect(self.displayglobaltooltip_f)
|
||||||
self.ocr_once_signal.connect(self.ocr_once_function)
|
self.ocr_once_signal.connect(self.ocr_once_function)
|
||||||
self.entersignal.connect(self.enterfunction)
|
self.entersignal.connect(self.enterfunction)
|
||||||
self.displaystatus.connect(self.showstatus)
|
self.displaystatus.connect(self.showstatus)
|
||||||
|
@ -15,6 +15,7 @@ from myutils.config import (
|
|||||||
static_data,
|
static_data,
|
||||||
getlanguse,
|
getlanguse,
|
||||||
savehook_new_data,
|
savehook_new_data,
|
||||||
|
_TR,
|
||||||
getdefaultsavehook,
|
getdefaultsavehook,
|
||||||
)
|
)
|
||||||
from ctypes import c_float, pointer, c_void_p
|
from ctypes import c_float, pointer, c_void_p
|
||||||
@ -157,10 +158,10 @@ def trysearchforid(gamepath, searchargs: list):
|
|||||||
break
|
break
|
||||||
if infoid:
|
if infoid:
|
||||||
searchvndbqueue.put((1, gamepath, infoid))
|
searchvndbqueue.put((1, gamepath, infoid))
|
||||||
|
return infoid
|
||||||
|
|
||||||
|
|
||||||
def trysearchfordata(gamepath, arg):
|
def trysearchfordata(gamepath, key, vid):
|
||||||
key, vid = arg
|
|
||||||
try:
|
try:
|
||||||
data = targetmod[key].searchfordata(vid)
|
data = targetmod[key].searchfordata(vid)
|
||||||
except:
|
except:
|
||||||
@ -195,24 +196,20 @@ def trysearchfordata(gamepath, arg):
|
|||||||
savehook_new_data[gamepath]["developers"] = developers
|
savehook_new_data[gamepath]["developers"] = developers
|
||||||
|
|
||||||
|
|
||||||
def parsetask(_type, gamepath, arg):
|
|
||||||
if _type == 0:
|
|
||||||
trysearchforid(gamepath, arg)
|
|
||||||
|
|
||||||
elif _type == 1:
|
|
||||||
trysearchforid(gamepath, arg)
|
|
||||||
|
|
||||||
|
|
||||||
def everymethodsthread():
|
def everymethodsthread():
|
||||||
while True:
|
while True:
|
||||||
_ = searchvndbqueue.get()
|
_ = searchvndbqueue.get()
|
||||||
_type, gamepath, arg = _
|
_type, gamepath, arg = _
|
||||||
try:
|
try:
|
||||||
if _type == 0:
|
if _type == 0:
|
||||||
trysearchforid(gamepath, arg)
|
infoid = trysearchforid(gamepath, arg)
|
||||||
|
key, vid = infoid
|
||||||
|
gobject.baseobject.translation_ui.displayglobaltooltip.emit(f"{key}: found {vid}")
|
||||||
|
|
||||||
elif _type == 1:
|
elif _type == 1:
|
||||||
trysearchfordata(gamepath, arg)
|
key, vid = arg
|
||||||
|
trysearchfordata(gamepath, key, vid)
|
||||||
|
gobject.baseobject.translation_ui.displayglobaltooltip.emit(f"{key}: {vid} data loaded")
|
||||||
except:
|
except:
|
||||||
print_exc()
|
print_exc()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user