-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.py
More file actions
49 lines (37 loc) · 1.13 KB
/
Copy pathmain.py
File metadata and controls
49 lines (37 loc) · 1.13 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
"""
2.5.0
- Fix a bug to do with saving settings
- De-monolith the codebase
"""
import sys
from PyQt6.QtWidgets import QApplication
from PyQt6.QtGui import QFont
from config import load_config
from log_parser import parse_latest_log
from client import ChatClient
from ui.main_window import ChatWindow
def main():
config = load_config()
_, server_id = parse_latest_log(config)
if server_id is None:
print("No active Roblox session found. Make sure Roblox is running.")
input("Press enter to exit.")
sys.exit(1)
print(f"Detected server {server_id}")
client = ChatClient(server_id, config)
client.connect()
app = QApplication(sys.argv)
app.setStyle("Fusion")
font = QFont("Segoe UI", 10)
if not font.exactMatch():
font = QFont("Inter", 10)
if not font.exactMatch():
font = QFont("SF Pro Display", 10)
if not font.exactMatch():
font = QFont("system-ui", 10)
app.setFont(font)
window = ChatWindow(client, config)
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()