forked from HammerWare/Project-Eclipse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.py
27 lines (19 loc) · 788 Bytes
/
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
import os
import sys
import subprocess
from tkinter import *
import update
def Play(self):
subprocess.Popen([ update.Minecraft(), '--workDir', os.path.join(os.getcwd(),'dawn') ],creationflags=0x00000010)
window = Tk()
window.title('Мой сервак')
window.geometry('200x75')
window.play = Button(window, text='Play', width=15)
window.play.place(relx=0.5, rely=0.45, anchor=CENTER)
window.play.config(command=(lambda : Play(window.play)) )
window.navbar = Menu(window)
window.options = Menu((window.navbar), tearoff=0)
window.update = window.options.add_command(label='Обновление', command=( lambda : update.GitManager().Sync() ))
window.navbar.add_cascade(label='Настройки', menu=(window.options))
window.config(menu=(window.navbar))
window.mainloop()