Compare commits

...

3 Commits

Author SHA1 Message Date
oto
71e0247304 Began working on the interface 2022-08-17 14:53:32 +03:00
oto
93403cdf83 Put interface into a separate file 2022-08-17 14:53:23 +03:00
oto
a2e0504aa8 Create Constants.py 2022-08-17 14:25:56 +03:00
3 changed files with 39 additions and 5 deletions

1
Constants.py Normal file
View File

@ -0,0 +1 @@
VERSION_NUMBER = "0.1"

36
Interface.py Normal file
View File

@ -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

View File

@ -1,8 +1,5 @@
from tkinter import * from Interface import *
from GameLogic import * from GameLogic import *
VERSION_NUMBER = "0.1" VERSION_NUMBER = "0.1"
root = Tk() generate_new_settings_window()
root.title("Tic-Far-Toe v{}".format(VERSION_NUMBER))
root.mainloop()