From 71e024730425b92a87cabb24760d750a22f1f314 Mon Sep 17 00:00:00 2001 From: oto Date: Wed, 17 Aug 2022 14:53:32 +0300 Subject: [PATCH] Began working on the interface --- Interface.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Interface.py diff --git a/Interface.py b/Interface.py new file mode 100644 index 0000000..770ce76 --- /dev/null +++ b/Interface.py @@ -0,0 +1,36 @@ +from tkinter import * +import Constants + +def generate_new_settings_window(): + window = Tk() + window.geometry("400x300+300+250") + window.title("Tic-Far-Toe v{}".format(Constants.VERSION_NUMBER)) + main_menu = Menu(tearoff=0) + + file_menu = Menu(tearoff=0) + main_menu.add_cascade(label="File", menu=file_menu) + + # TODO - Fix this button that somehow spawns a broken window with no menus + file_menu.add_command(label="New", command=generate_new_settings_window) + file_menu.add_command(label="Save") + file_menu.add_command(label="Save As...") + file_menu.add_command(label="Load", command=generate_file_select_window) + file_menu.add_separator() + file_menu.add_command(label="Exit") + + + edit_menu = Menu(tearoff=0) + main_menu.add_cascade(label="Edit", menu=edit_menu) + + + view_menu = Menu(tearoff=0) + main_menu.add_cascade(label="View", menu=view_menu) + + window.config(menu=main_menu) + window.mainloop() + +def generate_new_game_window(): + pass + +def generate_file_select_window(): + pass