This repository was archived by the owner on Jul 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +22
-11
lines changed Expand file tree Collapse file tree 5 files changed +22
-11
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ def setupUi(self, Form):
49
49
self .retranslateUi (Form )
50
50
51
51
QMetaObject .connectSlotsByName (Form )
52
+
52
53
# setupUi
53
54
54
55
def retranslateUi (self , Form ):
Original file line number Diff line number Diff line change 1
1
import argparse
2
2
import sys
3
3
4
- from PySide2 import QtWidgets
4
+ from PySide2 import QtWidgets , QtGui , QtCore
5
5
from PySide2 .QtCore import Qt
6
6
from PySide2 .QtGui import QFontDatabase , QPixmap
7
7
from PySide2 .QtWidgets import QSplashScreen
@@ -35,8 +35,17 @@ def __init__(self):
35
35
app = QtWidgets .QApplication ()
36
36
pixmap = QPixmap ("Launcher Asset/Logo_Splash.png" )
37
37
splash = QSplashScreen (pixmap )
38
+ splashlabel = QtWidgets .QLabel (splash )
39
+ splashgif = QtGui .QMovie ("Launcher Asset/Logo_Splash.gif" )
40
+ splashlabel .setMovie (splashgif )
41
+ splashgif .start ()
38
42
splash .show ()
39
43
splash .showMessage ("Thanks for playing" , Qt .AlignBottom , Qt .black )
44
+ delayTime = 1.3
45
+ timer = QtCore .QElapsedTimer ()
46
+ timer .start ()
47
+ while timer .elapsed () < delayTime * 1000 :
48
+ app .processEvents ()
40
49
window = MainWindow ()
41
50
window .show ()
42
51
splash .finish (window )
Original file line number Diff line number Diff line change @@ -224,9 +224,9 @@ def play(self):
224
224
splash .show ()
225
225
splash .showMessage ("Magician makes our game suck..." , Qt .AlignBottom , Qt .black )
226
226
delayTime = 1.3
227
- timer = QtCore .QElapsedTimer ()
227
+ timer = QtCore .QElapsedTimer ()
228
228
timer .start ()
229
- while timer .elapsed ()< delayTime * 1000 :
229
+ while timer .elapsed () < delayTime * 1000 :
230
230
app .processEvents ()
231
231
window = MainWindow_cc ()
232
232
window .show ()
Original file line number Diff line number Diff line change 1
1
def set_hant (self ):
2
- self .ui .cc1 .setText ("選弓箭手 " )
3
- self .ui .cc2 .setText ("選騎士 " )
2
+ self .ui .cc1 .setText ("弓箭手 " )
3
+ self .ui .cc2 .setText ("騎士 " )
4
4
self .ui .play .setText ("開始遊戲" )
5
5
self .ui .cc3 .setText ("法師" )
6
6
self .ui .cc4 .setText ("刺客" )
@@ -15,11 +15,11 @@ def set_hant(self):
15
15
16
16
17
17
def set_hans (self ):
18
- self .ui .cc1 .setText ("选弓箭手 " )
19
- self .ui .cc2 .setText ("选骑士 " )
18
+ self .ui .cc1 .setText ("弓箭手 " )
19
+ self .ui .cc2 .setText ("骑士 " )
20
20
self .ui .play .setText ("开始游戏" )
21
- self .ui .cc3 .setText ("选法师 " )
22
- self .ui .cc4 .setText ("选刺客 " )
21
+ self .ui .cc3 .setText ("法师 " )
22
+ self .ui .cc4 .setText ("刺客 " )
23
23
self .ui .Archer .setText ("弓箭手" )
24
24
self .ui .Knight .setText ("骑士" )
25
25
self .ui .Magician .setText ("法师" )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ def CheckPyInstaller():
71
71
else :
72
72
print ("pass" )
73
73
74
- except Exception :
74
+ except :
75
75
print ("[ERROR] Unknown game error, please report to developer." )
76
76
import pygame
77
77
@@ -81,7 +81,8 @@ def CheckPyInstaller():
81
81
date = datetime .utcnow ().strftime ("%Y-%m-%d_%H.%M.%S" )
82
82
if not os .path .exists ("ErrorLog" ):
83
83
os .mkdir ("ErrorLog" )
84
- with open ("ErrorLog/traceback_{}_lv.{}.txt" .format (date , lvl ), "w" ) as f :
84
+ with open ("ErrorLog/traceback_{}_lv.{}.txt" .format (date , lvl ), "a" ) as f :
85
+ f .write ("Error Occurred on lv." + str (lvl ) + "\n \n " )
85
86
f .write (error_data )
86
87
if CheckPyInstaller ():
87
88
subprocess .call ("ErrorWindow.exe" )
You can’t perform that action at this time.
0 commit comments