added skip buttons/need work
This commit is contained in:
parent
50a8853258
commit
631b52f5ad
1 changed files with 8 additions and 1 deletions
9
ben10.py
9
ben10.py
|
@ -5,7 +5,7 @@ from PIL import ImageTk, Image
|
||||||
|
|
||||||
root = Tk()
|
root = Tk()
|
||||||
root.title("Omnitrix")
|
root.title("Omnitrix")
|
||||||
# root.attributes('-fullscreen', True)
|
root.attributes('-fullscreen', True)
|
||||||
root.geometry("640x480")
|
root.geometry("640x480")
|
||||||
root.configure(bg="#70b607")
|
root.configure(bg="#70b607")
|
||||||
# root window parameters
|
# root window parameters
|
||||||
|
@ -16,6 +16,7 @@ img = ImageTk.PhotoImage(Image.open(path))
|
||||||
omnitrix_button = Button(root, bg="#70b607", image=img,
|
omnitrix_button = Button(root, bg="#70b607", image=img,
|
||||||
activebackground='#70b607', highlightthickness=0, bd=0,command=button_press)
|
activebackground='#70b607', highlightthickness=0, bd=0,command=button_press)
|
||||||
# TODO: make sound when pressed
|
# TODO: make sound when pressed
|
||||||
|
|
||||||
omnitrix_button.image = img
|
omnitrix_button.image = img
|
||||||
omnitrix_button.place(relx=0.5, rely=0.5, anchor=CENTER)
|
omnitrix_button.place(relx=0.5, rely=0.5, anchor=CENTER)
|
||||||
# middle button
|
# middle button
|
||||||
|
@ -25,11 +26,17 @@ omnitrix_left = Button(root, text="<", fg="white", bg="black",
|
||||||
omnitrix_left.pack(side="left")
|
omnitrix_left.pack(side="left")
|
||||||
# changes alien button (left)
|
# changes alien button (left)
|
||||||
|
|
||||||
|
skip_left = Button(root, text="<<<", fg="white", bg="black", highlightthickness=0, bd=0, width=4)
|
||||||
|
skip_left.pack()
|
||||||
|
|
||||||
omnitrix_right = Button(root, text=">", fg="white", bg="black",
|
omnitrix_right = Button(root, text=">", fg="white", bg="black",
|
||||||
command=lambda: count_up(omnitrix_button), highlightthickness=0, bd=0, height=40, width=4)
|
command=lambda: count_up(omnitrix_button), highlightthickness=0, bd=0, height=40, width=4)
|
||||||
omnitrix_right.pack(side="right")
|
omnitrix_right.pack(side="right")
|
||||||
# changes alien button (right)
|
# changes alien button (right)
|
||||||
|
|
||||||
|
skip_right = Button(root, text=">>>", fg="white", bg="black", highlightthickness=0, bd=0, width=4)
|
||||||
|
skip_right.pack()
|
||||||
|
|
||||||
quit_button = Button(root, text="X", fg="white", bg="black",
|
quit_button = Button(root, text="X", fg="white", bg="black",
|
||||||
command=root.destroy, highlightthickness=0, bd=0, width=7)
|
command=root.destroy, highlightthickness=0, bd=0, width=7)
|
||||||
quit_button.pack(side="bottom")
|
quit_button.pack(side="bottom")
|
||||||
|
|
Loading…
Add table
Reference in a new issue