-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
87 lines (74 loc) · 2.71 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
"""
Copyright (C) 2017-2024 Dog Face Development Co.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
# pylint: disable=import-error, invalid-name
# Main program window.
# Import Statements
from tkinter import Tk, Label, Button, PhotoImage, RAISED
from craftclash.optionscreen import optionsscreen
from craftclash.aboutscreen import aboutscreen
def craftclash():
"""Main program window."""
# Window Elements
window = Tk()
window.title("CraftClash - Windows - 0.0.4 BETA")
window.configure(bg="sky blue")
# Images
titleimg = PhotoImage(file="assets/logo/titlelogo.gif")
playimg = PhotoImage(file="assets/gui/play-circle.gif")
optionimg = PhotoImage(file="assets/gui/cog.gif")
aboutimg = PhotoImage(file="assets/gui/about.gif")
# Widgets
title_label = Label(window, image=titleimg)
btn_play = Button(
window, text="Play!", height=3, width=60, bd=4, relief=RAISED, command=exit
)
play_img = Label(window, image=playimg)
btn_options = Button(
window,
text="Options",
height=3,
width=60,
bd=4,
relief=RAISED,
command=optionsscreen,
)
options_img = Label(window, image=optionimg)
btn_about = Button(
window,
text="About",
height=3,
width=60,
bd=4,
relief=RAISED,
command=aboutscreen,
)
about_img = Label(window, image=aboutimg)
copyright_label = Label(
window,
text="Copyright © 2017 - 2024 Dog Face Development Co. \t\t\t Version 0.0.4 BETA",
)
# Pack Statements
title_label.grid(row=1, column=2, rowspan=2, pady=10)
play_img.grid(row=3, column=1)
btn_play.grid(row=3, column=2, columnspan=2)
options_img.grid(row=4, column=1)
btn_options.grid(row=4, column=2, columnspan=2)
about_img.grid(row=5, column=1)
btn_about.grid(row=5, column=2, columnspan=2)
copyright_label.grid(row=6, column=1, columnspan=5)
# Sustain Window
window.mainloop()
return window
if __name__ == "__main__":
craftclash()