Guest User

Untitled

a guest
Jul 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. from tkinter.ttk import Frame, Style
  2. from tkinter import *
  3. import sys
  4.  
  5. class Okno(Frame):
  6. def __init__(self,parent):
  7. super().__init__(parent)
  8. self.parent=parent
  9. self.przedstartem=1
  10. self.inicjalizuj()
  11. self.startuj()
  12. def inicjalizuj(self):
  13. self.button_exit = Button(text="Exit",fg="white",bg="red",command=self.quit)
  14. self.button_exit.pack(side=LEFT)
  15. self.parent.title("Gra w dinozaura")
  16. self.styl=Style()
  17. self.styl.theme_use("default")
  18. self.pack(fill=BOTH, expand=1)
  19. def startuj(self):
  20. if self.przedstartem == 1:
  21. self.przedstartem = 0
  22. print("stratujemy")
  23.  
  24. def main():
  25. root = Tk()
  26. w, h = root.winfo_screenwidth(), root.winfo_screenheight()
  27. #root.geometry("%dx%d+0+0" % (w, h))
  28. root.geometry("500x500")
  29. gra=Okno(root)
  30. root.mainloop()
  31.  
  32. main()
Add Comment
Please, Sign In to add comment