Inital commit. Added class to handle generating the main window.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
__pycache__
|
||||
*.json
|
||||
*.txt
|
||||
@@ -0,0 +1,8 @@
|
||||
import window
|
||||
|
||||
def main():
|
||||
ui = window.Window(600, 600)
|
||||
|
||||
ui.show()
|
||||
|
||||
main()
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user