-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.py
79 lines (73 loc) · 4.41 KB
/
start.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import webbrowser
from PyQt5 import QtCore, QtGui, QtWidgets
class UIStartInterface(object):
def setupUi(self, startInterface):
startInterface.setObjectName("startInterface")
startInterface.setWindowModality(QtCore.Qt.NonModal)
startInterface.resize(521, 308)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(startInterface.sizePolicy().hasHeightForWidth())
startInterface.setSizePolicy(sizePolicy)
startInterface.setMaximumSize(QtCore.QSize(16777215, 536))
self.verticalLayout_2 = QtWidgets.QVBoxLayout(startInterface)
self.verticalLayout_2.setContentsMargins(-1, -1, -1, 4)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.pqIcon = QtWidgets.QLabel(startInterface)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pqIcon.sizePolicy().hasHeightForWidth())
self.pqIcon.setSizePolicy(sizePolicy)
self.pqIcon.setMaximumSize(QtCore.QSize(256, 256))
self.pqIcon.setText("")
self.pqIcon.setPixmap(QtGui.QPixmap(":/pic/pq.png"))
self.pqIcon.setScaledContents(True)
self.pqIcon.setObjectName("pqIcon")
self.horizontalLayout.addWidget(self.pqIcon)
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.newGameButton = QtWidgets.QPushButton(startInterface)
self.verticalLayout.addWidget(self.newGameButton)
self.loadGameButton = QtWidgets.QPushButton(startInterface)
self.loadGameButton.setObjectName("loadGameButton")
self.verticalLayout.addWidget(self.loadGameButton)
spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem2)
self.exitButton = QtWidgets.QPushButton(startInterface)
self.exitButton.setObjectName("exitButton")
self.verticalLayout.addWidget(self.exitButton)
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem3)
self.websiteLink = QtWidgets.QPushButton(startInterface)
font = QtGui.QFont()
font.setUnderline(True)
self.websiteLink.setFont(font)
self.websiteLink.setCursor(QtGui.QCursor(QtCore.Qt.PointingHandCursor))
self.websiteLink.setStyleSheet("color: blue; background-color: transparent; border: none;")
self.websiteLink.setObjectName("websiteLink")
self.verticalLayout.addWidget(self.websiteLink)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_2.addLayout(self.horizontalLayout)
self.projectInfoLabel = QtWidgets.QLabel(startInterface)
self.projectInfoLabel.setStyleSheet("color:gray")
self.projectInfoLabel.setAlignment(QtCore.Qt.AlignCenter)
self.projectInfoLabel.setObjectName("projectInfoLabel")
self.verticalLayout_2.addWidget(self.projectInfoLabel)
self.retranslateUi(startInterface)
QtCore.QMetaObject.connectSlotsByName(startInterface)
self.websiteLink.clicked.connect(lambda: webbrowser.open("http://progressquest.com"))
def retranslateUi(self, startInterface):
_translate = QtCore.QCoreApplication.translate
startInterface.setWindowTitle(_translate("startInterface", "Progress Quest"))
self.newGameButton.setText(_translate("startInterface", "New Game"))
self.loadGameButton.setText(_translate("startInterface", "Load Game"))
self.exitButton.setText(_translate("startInterface", "Exit"))
self.websiteLink.setText(_translate("startInterface", "http://progressquest.com"))
self.projectInfoLabel.setText(_translate("startInterface", "Recreated by Melvin Chia using PyQt5. Project under MIT License."))
from assets import main_rc