Kód:
from Tkinter import *
Setup = Tk()
def Low():
f = open("setup.bat", "w")
f.write ("runtime.exe - f 640 480 75 16")
f.close
def Med():
f = open("setup.bat", "w")
f.write ("runtime.exe - f 800 600 75 32")
f.close
def Hi():
f = open("setup.bat", "w")
f.write ("runtime.exe - f 1024 768 75 32")
f.close
def Ul():
f = open("setup.bat", "w")
f.write ("runtime.exe - f 1280 1024 75 32")
f.close
def TA():
f = open("grass.dat", "w")
f.write ("1")
f.close()
def TN():
f = open("grass.dat", "w")
f.write ("0")
f.close()
def LA():
f = open("steal.dat", "w")
f.write ("1")
f.close()
def LN():
f = open("steal.dat", "w")
f.write ("0")
f.close()
def SA():
f = open("shadow.dat", "w")
f.write ("1")
f.close
def SN():
f = open("shadow.dat", "w")
f.write ("0")
f.close
rozliseni = Label(Setup, text = "Rozliseni")
rozliseni.grid(row=0, column=0)
trava = Label(Setup, text = "3D trava")
trava.grid(row=0, column=2)
lesk = Label(Setup, text = "Odlesky")
lesk.grid(row=0, column=3)
stin = Label(Setup, text = "Stiny")
stin.grid(row=0, column=4)
Lowbut = Button(Setup, text="Nizke", command=Low)
Lowbut.grid(row=2, column=0)
Medbut = Button(Setup, text="Stredni", command=Med)
Medbut.grid(row=2, column=1)
Hibut = Button(Setup, text="Vysoke", command=Hi)
Hibut.grid(row=1, column=0)
Ulbut = Button(Setup, text="Nejvyssi", command=Ul)
Ulbut.grid(row=1, column=1)
Exit = Button(Setup, text = "Konec", command=Setup.destroy)
Exit.grid(row=2, column=7)
TRA = Button(Setup, text="Zap.", command=TA)
TRA.grid(row=1, column=2)
TRN = Button(Setup, text="Vyp.", command=TN)
TRN.grid(row=2, column=2)
LEA = Button(Setup, text="Zap.", command=LA)
LEA.grid(row=1, column=3)
LEN = Button(Setup, text="Vyp.", command=LN)
LEN.grid(row=2, column=3)
STA = Button(Setup, text="Zap.", command=SA)
STA.grid(row=1, column=4)
STN = Button(Setup, text="Vyp.", command=SN)
STN.grid(row=2, column=4)