mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
game loop; player budget; enemy progression; GUI WIP
This commit is contained in:
committed by
Vasiliy Horbachenko
parent
4cd3c24b49
commit
ad4d183972
41
ui/window.py
Normal file
41
ui/window.py
Normal file
@@ -0,0 +1,41 @@
|
||||
from tkinter import *
|
||||
|
||||
|
||||
class Window:
|
||||
image = None
|
||||
left_pane = None # type: Frame
|
||||
right_pane = None # type: Frame
|
||||
|
||||
def __init__(self):
|
||||
self.tk = Tk()
|
||||
self.tk.grid_columnconfigure(0, weight=1)
|
||||
self.tk.grid_rowconfigure(0, weight=1)
|
||||
|
||||
self.frame = Frame(self.tk)
|
||||
self.frame.grid(column=0, row=0, sticky=NSEW)
|
||||
self.frame.grid_columnconfigure(0, minsize=300)
|
||||
self.frame.grid_columnconfigure(1, minsize=300)
|
||||
|
||||
self.frame.grid_columnconfigure(0, weight=0)
|
||||
self.frame.grid_columnconfigure(1, weight=1)
|
||||
self.frame.grid_rowconfigure(0, weight=1)
|
||||
|
||||
self.left_pane = Frame(self.frame)
|
||||
self.left_pane.grid(column=0, row=0, sticky=NSEW)
|
||||
self.right_pane = Frame(self.frame)
|
||||
self.right_pane.grid(column=1, row=0, sticky=NSEW)
|
||||
|
||||
self.tk.focus()
|
||||
|
||||
def clear_right_pane(self):
|
||||
for x in self.right_pane.winfo_children():
|
||||
x.grid_remove()
|
||||
|
||||
def clear(self):
|
||||
for x in self.left_pane.winfo_children():
|
||||
x.grid_remove()
|
||||
for x in self.right_pane.winfo_children():
|
||||
x.grid_remove()
|
||||
|
||||
def run(self):
|
||||
self.tk.mainloop()
|
||||
Reference in New Issue
Block a user