-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcsfloat_helper.py
More file actions
49 lines (39 loc) · 1.51 KB
/
csfloat_helper.py
File metadata and controls
49 lines (39 loc) · 1.51 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
import sys
import os
from PyQt6.QtWidgets import QApplication
from PyQt6.QtGui import QIcon, QFontDatabase, QFont
from modules.ui import SteamInventoryApp
from modules.utils import load_config, init_callback_receiver
def main():
if sys.platform == "win32":
import ctypes
myappid = 'csfloat.helper.app.2'
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
app = QApplication(sys.argv)
init_callback_receiver()
font_path = os.path.join(os.path.dirname(__file__), "utils", "fonts", "Oswald.ttf")
if os.path.exists(font_path):
font_id = QFontDatabase.addApplicationFont(font_path)
if font_id != -1:
font_family = QFontDatabase.applicationFontFamilies(font_id)[0]
app_font = QFont(font_family)
app_font.setPointSize(11)
app_font.setWeight(QFont.Weight.Normal)
app.setFont(app_font)
icon_path = os.path.join(os.path.dirname(__file__), "utils", "icons", "steam.png")
if os.path.exists(icon_path):
app.setWindowIcon(QIcon(icon_path))
else:
print(f"[!] Icon not found: {icon_path}")
# Загрузка конфигурации и API-ключей
config = load_config()
api_keys = config.get("api_keys", [])
if not api_keys:
print("No API keys found in the config file.")
sys.exit(1)
# Создание окна
window = SteamInventoryApp(api_keys=api_keys)
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()