Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter.ttk import Frame, Style
- from tkinter import *
- import sys
- class Okno(Frame):
- def __init__(self,parent):
- super().__init__(parent)
- self.parent=parent
- self.przedstartem=1
- self.inicjalizuj()
- self.startuj()
- def inicjalizuj(self):
- self.button_exit = Button(text="Exit",fg="white",bg="red",command=self.quit)
- self.button_exit.pack(side=LEFT)
- self.parent.title("Gra w dinozaura")
- self.styl=Style()
- self.styl.theme_use("default")
- self.pack(fill=BOTH, expand=1)
- def startuj(self):
- if self.przedstartem == 1:
- self.przedstartem = 0
- print("stratujemy")
- def main():
- root = Tk()
- w, h = root.winfo_screenwidth(), root.winfo_screenheight()
- #root.geometry("%dx%d+0+0" % (w, h))
- root.geometry("500x500")
- gra=Okno(root)
- root.mainloop()
- main()
Add Comment
Please, Sign In to add comment