-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·57 lines (38 loc) · 1.5 KB
/
main.py
File metadata and controls
executable file
·57 lines (38 loc) · 1.5 KB
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
from tkinter import Tk, Toplevel
from datetime import datetime
import lib.SpriteHandler
class Display:
def __init__(self) -> None:
self.ConfigureTk()
self.sprite_controller = lib.SpriteHandler.SpriteController(self.root, self.chat_window)
def ConfigureTk(self):
self.root = Tk()
self.chat_window = Toplevel()
self.root.geometry(f"100x100+100+500")
self.root.overrideredirect(True)
self.root.lift()
self.root.wm_attributes("-topmost", True)
self.root.wm_attributes("-disabled", True)
self.root.wm_attributes("-transparentcolor", "black")
self.chat_window.overrideredirect(True)
self.chat_window.lift()
self.chat_window.wm_attributes("-topmost", True)
self.chat_window.wm_attributes("-disabled", True)
self.chat_window.wm_attributes("-transparentcolor", "white")
self.chat_window.wm_attributes("-alpha", 0)
self.chat_window.maxsize(height=200)
def Start(self):
while True:
try:
self.sprite_controller.HandleAnimation()
except Exception as e:
with open("errorlog.txt","a") as f:
err_str = f"{datetime.now()}: {e.args}\n"
f.write(err_str)
print(e); break;
exit()
def main():
d = Display()
d.Start()
if __name__ == "__main__":
main()