Inital commit. Added class to handle generating the main window.

This commit is contained in:
2020-07-08 14:22:07 -05:00
commit 6f25f9e0d8
3 changed files with 25 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
__pycache__
*.json
*.txt
+8
View File
@@ -0,0 +1,8 @@
import window
def main():
ui = window.Window(600, 600)
ui.show()
main()
+14
View File
@@ -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()