-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMiniKings.py
75 lines (51 loc) · 2 KB
/
MiniKings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# MINIKINGS
#
import random
import tkinter as tk
class titleScreen():
def __init__(self, window):
self.window = window
window.title("MiniKings - Title Screen")
self.TitleLabel = tk.Label(window, text='miniKings')
self.TitleLabel.pack()
self.NewButton = tk.Button(window, text='New Game')
self.NewButton.pack()
self.LoadButton = tk.Button(window, text='Load Game')
self.LoadButton.pack()
self.SettingButton = tk.Button(window, text='Settings')
self.SettingButton.pack()
class gameScreen():
def __init__(self, window):
self.window = window
window.title("MiniKings")
self.Header = tk.Frame(window)
self.Header.grid(column=0,row=0,columnspan=2)
self.Header.grid_rowconfigure(0, weight=1)
self.Header.grid_columnconfigure(0, weight=1)
self.TitleLabel = tk.Label(self.Header, text='miniKings')
self.TitleLabel.grid(row=0,column=0,columnspan=3,padx=5)
self.SettingsButton = tk.Button(self.Header, text='Settings')
self.SettingsButton.grid(row=0,column=3,padx=5)
self.SaveButton = tk.Button(self.Header, text='Save Game')
self.SaveButton.grid(row=0,column=4,padx=5)
self.ExitButton = tk.Button(self.Header, text='Exit')
self.ExitButton.grid(row=0,column=5,padx=5)
self.Board = tk.Frame(window)
self.Board.grid(column=0,row=1)
for x in range(25):
ButtonName = ("Square" + str(x))
self.ButtonName = tk.Button(self.Board, text=str(x)).grid(column=(x % 5), row=int((x / 5)))
self.ActionBar = tk.Frame(window)
self.ActionBar.grid(column=1,row=1)
self.ActionBook = tk.Notebook(ActionBar)
self.PAGEONE = tk.Frame(ActionBook)
self.PAGETWO = tk.Frame(ActionBook)
self.PAGETRE = tk.Frame(ActionBook)
ActionBook.add(PAGEONE, text='PAGEONE')
ActionBook.add(PAGETWO, text='PAGE2')
ActionBook.add(PAGETRE, text='PAGE3')
root = tk.Tk()
root.grid_rowconfigure(1, weight=1,minsize=200)
CurrentScreen = gameScreen(root)
root.mainloop()