-
Notifications
You must be signed in to change notification settings - Fork 1
/
mode_scene.py
80 lines (69 loc) · 3.79 KB
/
mode_scene.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
from PyQt5.QtCore import QSize, QDir, Qt
from PyQt5.QtGui import QBrush, QFont, QPalette, QFontDatabase, QImage, QPixmap
from PyQt5.QtWidgets import QGraphicsView, QGraphicsScene, QApplication, QPushButton, QLabel
class ModeScene(QGraphicsScene):
def __init__(self, parent, width, height):
super().__init__(parent)
self.width = width
self.height = height
self.parent = parent
self.label = QLabel()
self.pixmap = QPixmap('Images/img.png')
self.label.setPixmap(self.pixmap)
self.label.resize(self.width-2, self.height-2)
self.addWidget(self.label)
self.mainLabel = QLabel("SELECT MODE")
self.mainLabel.resize(230, 100)
self.mainLabel.setStyleSheet("color: white; font-size:32px; font:bold; background:transparent")
self.mainLabel.move(180, 0)
self.addWidget(self.mainLabel)
self.singlPlyBtn = QPushButton("Singleplayer")
self.singlPlyBtn.setStyleSheet("QPushButton{"
"color: white; background-color: transparent; font:bold; border-style: outset; border-width: 2px; border-color: white"
"}"
"QPushButton:hover{"
"background-color: #3F7FBF"
"}")
self.singlPlyBtn.resize(100, 50)
self.singlPlyBtn.move(250, 100)
self.addWidget(self.singlPlyBtn)
self.multiPlayerBtn = QPushButton("Multiplayer")
self.multiPlayerBtn.setStyleSheet("QPushButton{"
"color: white; background-color: transparent; font:bold; border-style: outset; border-width: 2px; border-color: white"
"}"
"QPushButton:hover{"
"background-color: #3F7FBF"
"}")
self.multiPlayerBtn.resize(100, 50)
self.multiPlayerBtn.move(250, 165)
self.addWidget(self.multiPlayerBtn)
self.tournamentBtn = QPushButton("Tournament")
self.tournamentBtn.setStyleSheet("QPushButton{"
"color: white; background-color: transparent; font:bold; border-style: outset; border-width: 2px; border-color: white"
"}"
"QPushButton:hover{"
"background-color: #3F7FBF"
"}")
self.tournamentBtn.resize(100, 50)
self.tournamentBtn.move(250, 230)
self.addWidget(self.tournamentBtn)
self.returnBtn = QPushButton("Return")
self.returnBtn.setStyleSheet("QPushButton{"
"color: white; background-color: transparent; font:bold; border-style: outset; border-width: 2px; border-color: white"
"}"
"QPushButton:hover{"
"background-color: #C14242"
"}")
self.returnBtn.resize(100, 50)
self.returnBtn.move(250, 360)
self.addWidget(self.returnBtn)
self.network = QPushButton("Network")
self.network.setStyleSheet("QPushButton{"
"color: white; background-color: transparent; font:bold; border-style: outset; border-width: 2px; border-color: white"
"}"
"QPushButton:hover{"
"background-color: #C14242"
"}")
self.network.resize(100, 50)
self.network.move(250, 295)
self.addWidget(self.network)