commit 6f25f9e0d803b166f9763784068a54af1e8cb232 Author: Garritt McCune Date: Wed Jul 8 14:22:07 2020 -0500 Inital commit. Added class to handle generating the main window. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6722f91 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +__pycache__ +*.json +*.txt diff --git a/main.py b/main.py new file mode 100644 index 0000000..bc8d2dd --- /dev/null +++ b/main.py @@ -0,0 +1,8 @@ +import window + +def main(): + ui = window.Window(600, 600) + + ui.show() + +main() diff --git a/window.py b/window.py new file mode 100644 index 0000000..f992dd6 --- /dev/null +++ b/window.py @@ -0,0 +1,14 @@ +import tkinter + +class Window: + def __init__(self, width, height, title = "Terrain Generator"): + self.window = tkinter.Tk() + self.window.title(title) + self.canvas = tkinter.Canvas(self.window, width = width, height = height) + self.canvas.pack() + self.width = width + self.height = height + + def show(self): + self.window.mainloop() +