forked from johnmaf23/draughts-game
-
Notifications
You must be signed in to change notification settings - Fork 0
/
homePage2.py
131 lines (104 loc) · 4.85 KB
/
homePage2.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
import sys
from PyQt4 import QtCore, QtGui
import mysql.connector
class userHomePageUI(QtGui.QMainWindow):
def __init__(self):
super(userHomePageUI, self).__init__()
self.setupUi()
self.setGeometry(0,0,640,480)
self.setWindowTitle("Home")
def setupUi(self):
pg1TitleLbl = QtGui.QLabel(self)
pg1TitleLbl.setGeometry(QtCore.QRect(230, 60, 170, 50))
font = QtGui.QFont()
font.setPointSize(26)
font.setBold(True)
font.setWeight(75)
pg1TitleLbl.setFont(font)
pg1TitleLbl.setObjectName("pg1TitleLbl")
pg1TitleLbl.setText("Draughts")
player1Link = QtGui.QPushButton(self)
player1Link.setGeometry(QtCore.QRect(50, 150, 270, 70))
font = QtGui.QFont()
font.setPointSize(20)
player1Link.setFont(font)
player1Link.setStyleSheet("QPushButton {border: 0px;} QPushButton:hover {background-color: rgb(220,0,0);}")
player1Link.setObjectName("player1Link")
player1Link.setText("Player vs. Computer ")
twoPlayerLink = QtGui.QPushButton(self)
twoPlayerLink.setGeometry(QtCore.QRect(50, 220, 270, 70))
font = QtGui.QFont()
font.setPointSize(20)
twoPlayerLink.setFont(font)
twoPlayerLink.setStyleSheet("QPushButton { border: 0px;} QPushButton:hover {background-color: rgb(0, 0, 0); color:rgb(225,225,225); }")
twoPlayerLink.setObjectName("twoPlayerLink")
twoPlayerLink.setText("Player 1 vs. Player 2")
gameOptionsLink = QtGui.QPushButton(self)
gameOptionsLink.setGeometry(QtCore.QRect(50, 290, 270, 70))
font = QtGui.QFont()
font.setPointSize(20)
gameOptionsLink.setFont(font)
gameOptionsLink.setStyleSheet("QPushButton {border: 0px;} QPushButton:hover {background-color:rgb(220,0,0);}")
gameOptionsLink.setObjectName("gameOptionsLink")
gameOptionsLink.setText("Game Options")
miniGameLink = QtGui.QPushButton(self)
miniGameLink.setGeometry(QtCore.QRect(50, 360, 270, 70))
font = QtGui.QFont()
font.setPointSize(20)
miniGameLink.setFont(font)
miniGameLink.setStyleSheet("QPushButton {border: 0px;} QPushButton:hover {background-color: rgb(0, 0, 0); color:rgb(225,225,225);}")
miniGameLink.setObjectName("miniGameLink")
miniGameLink.setText("Mini-Game")
welcomeUser = QtGui.QLabel(self)
welcomeUser.setGeometry(QtCore.QRect(420, 20, 190, 30))
font = QtGui.QFont()
font.setPointSize(10)
welcomeUser.setFont(font)
welcomeUser.setObjectName("label")
welcomeUser.setText("Hi, exampleuser99")
previousGameFrame = QtGui.QFrame(self)
previousGameFrame.setGeometry(QtCore.QRect(350, 170, 260, 260))
previousGameFrame.setStyleSheet("border:5px solid;")
previousGameFrame.setFrameShape(QtGui.QFrame.StyledPanel)
previousGameFrame.setFrameShadow(QtGui.QFrame.Raised)
previousGameFrame.setObjectName("previousGameFrame")
previousGameLbl = QtGui.QLabel(self)
previousGameLbl.setGeometry(QtCore.QRect(425, 180, 120, 20))
font = QtGui.QFont()
font.setPointSize(9)
font.setBold(True)
font.setWeight(75)
previousGameLbl.setFont(font)
previousGameLbl.setStyleSheet("border:0px;")
previousGameLbl.setObjectName("previousGameLbl")
previousGameLbl.setText("Your pervious game")
gameTypeLbl = QtGui.QLabel(self)
gameTypeLbl.setGeometry(QtCore.QRect(400, 220, 150, 30))
font = QtGui.QFont()
font.setPointSize(10)
gameTypeLbl.setFont(font)
gameTypeLbl.setStyleSheet("border:0px;")
gameTypeLbl.setObjectName("gameTypeLbl")
gameTypeLbl.setText("Game Type: ")
PreviousTallyLbl = QtGui.QLabel(self)
PreviousTallyLbl.setGeometry(QtCore.QRect(380, 290, 140, 40))
font = QtGui.QFont()
font.setPointSize(10)
PreviousTallyLbl.setFont(font)
PreviousTallyLbl.setStyleSheet("border:0px;")
PreviousTallyLbl.setObjectName("PreviousTallyLbl")
PreviousTallyLbl.setText("Player 1: " + "player1 score"+"--"
+"\n"+"other player"+": "+"their score")
playNowButton = QtGui.QPushButton(self)
playNowButton.setGeometry(QtCore.QRect(440, 380, 80, 40))
font = QtGui.QFont()
font.setPointSize(9)
playNowButton.setFont(font)
playNowButton.setStyleSheet("QPushButton:hover {background-color: rgb(220,0,0);}")
playNowButton.setObjectName("playNowButton")
playNowButton.setText("Play Now")
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
window = userHomePageUI()
window.show()
sys.exit(app.exec_())