-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.py
67 lines (57 loc) · 1.41 KB
/
main.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from tkinter import *
from constants import Colors
from constants import Dimensions
from constants import Paths
#order window
from order import order
# about window
from about import about
def handle_order():
order(window=window,ordered=ordered)
# To set the background color of a button
button_color = Colors.GREEN
# To set the size of a button
btn0 = (Dimensions.BUTTON_WIDTH, Dimensions.BUTTON_HEIGHT)
ordered = dict()
#main window
window = Tk()
window.title("The Hideout")
window.geometry("1152x700")
window.configure(bg=Colors.WHITE)
canvas = Canvas(
window,
bg=Colors.WHITE,
height=700,
width=1152,
bd=0,
highlightthickness=0,
relief="ridge")
canvas.place(x=0, y=0)
background_img = PhotoImage(file=Paths.IMAGE_DIRECTORY+ "main_bg.png")
background = canvas.create_image(
576.0, 350.0,
image=background_img)
img0 = PhotoImage(file=Paths.IMAGE_DIRECTORY+"img0.png")
b0 = Button(
image=img0,
borderwidth=0,
highlightthickness=0,
command=about,
relief="flat")
b0.place(
x=603, y=213,
height=Dimensions.ABT_HEIGHT,
width=Dimensions.ABT_WIDTH)
img1 = PhotoImage(file=Paths.IMAGE_DIRECTORY+"img1.png")
b1 = Button(
image=img1,
borderwidth=0,
highlightthickness=0,
command=handle_order,
relief="flat")
b1.place(
x=603, y=322,
height=Dimensions.ORD_HEIGHT,
width=Dimensions.ORD_WIDTH)
window.resizable(False, False)
window.mainloop()