-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.py
51 lines (38 loc) · 1.26 KB
/
menu.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
import sfml as sf
import sys
from PyQt4 import QtGui
class Menu(QtGui.QMainWindow):
def __init__(self):
super(Menu, self).__init__()
self.initUI()
def initUI(self):
new_game = QtGui.QAction('New Game', self)
new_game.setShortcut('CTRL+N')
new_game.setStatusTip('Start a new game')
#new_game.triggered.connect(self.new)
close_action = QtGui.QAction('Close', self)
close_action.setShortcut("CTRL+Q")
close_action.setStatusTip('Exit the game')
#close_action.trigged.connect(self.close)
menubar = self.menuBar()
file_menu = menubar.addMenu('&File')
file_menu.addAction(new_game)
file_menu.addAction(close_action)
self.setGeometry(500, 500, 500, 500)
self.setWindowTitle('pedeRPG')
self.show()
def main():
app = QtGui.QApplication(sys.argv)
menu = Menu()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
RESOLUTION = 1024, 768
WALLPAPER = 'faggot.png'
TITLE = "Placeholder for shitfuck"
window = sf.RenderWindow(sf.VideoMode(*RESOLUTION), TITLE)
texture = sf.Texture.from_file(WALLPAPER)
sprite = sf.Sprite(texture)
window.draw(sprite)
window.display()
sf.sleep(sf.seconds(5))