trainerbase 3.9.0__tar.gz → 3.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {trainerbase-3.9.0 → trainerbase-3.10.0}/PKG-INFO +1 -1
- {trainerbase-3.9.0 → trainerbase-3.10.0}/pyproject.toml +1 -1
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/objects.py +18 -8
- {trainerbase-3.9.0 → trainerbase-3.10.0}/LICENSE +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/README.rst +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/__init__.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/codeinjection.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/common/__init__.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/common/abc.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/common/helpers.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/common/keyboard.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/common/teleport.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/config.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gameobject.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/__init__.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/helpers.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/injections.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/misc.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/scripts.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/speedhack.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/teleport.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/gui/types.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/main.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/memory.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/scriptengine.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/speedhack.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase/tts.py +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase_vendor/FASM.EXE +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase_vendor/speedhack32.dll +0 -0
- {trainerbase-3.9.0 → trainerbase-3.10.0}/trainerbase_vendor/speedhack64.dll +0 -0
|
@@ -35,19 +35,21 @@ class GameObjectUI(AbstractUIComponent):
|
|
|
35
35
|
self,
|
|
36
36
|
gameobject: GameObject,
|
|
37
37
|
label: str,
|
|
38
|
-
|
|
38
|
+
freeze_hotkey: str | None = None,
|
|
39
|
+
set_hotkey: str | None = None,
|
|
39
40
|
default_setter_input_value: Any = 0,
|
|
40
41
|
before_set: Callable | None = None,
|
|
41
42
|
tts_on_hotkey: bool = True,
|
|
42
43
|
setter_input_width: int = 220,
|
|
43
44
|
):
|
|
44
45
|
if not gameobject.is_tracked:
|
|
45
|
-
|
|
46
|
+
freeze_hotkey = None
|
|
46
47
|
|
|
47
48
|
self.gameobject = gameobject
|
|
48
49
|
self.pure_label = label
|
|
49
|
-
self.label_with_hotkey = label if
|
|
50
|
-
self.
|
|
50
|
+
self.label_with_hotkey = label if freeze_hotkey is None else f"[{freeze_hotkey}] {label}"
|
|
51
|
+
self.freeze_hotkey = freeze_hotkey
|
|
52
|
+
self.set_hotkey = set_hotkey
|
|
51
53
|
self.default_setter_input_value = default_setter_input_value
|
|
52
54
|
self.before_set = before_set
|
|
53
55
|
self.tts_on_hotkey = tts_on_hotkey
|
|
@@ -60,8 +62,11 @@ class GameObjectUI(AbstractUIComponent):
|
|
|
60
62
|
|
|
61
63
|
@override
|
|
62
64
|
def add_to_ui(self) -> None:
|
|
63
|
-
if self.
|
|
64
|
-
add_hotkey(self.
|
|
65
|
+
if self.freeze_hotkey is not None:
|
|
66
|
+
add_hotkey(self.freeze_hotkey, self.on_freeze_hotkey_press)
|
|
67
|
+
|
|
68
|
+
if self.set_hotkey is not None:
|
|
69
|
+
add_hotkey(self.set_hotkey, self.on_value_set)
|
|
65
70
|
|
|
66
71
|
with dpg.group(horizontal=True):
|
|
67
72
|
if self.gameobject.is_tracked:
|
|
@@ -72,7 +77,12 @@ class GameObjectUI(AbstractUIComponent):
|
|
|
72
77
|
|
|
73
78
|
self.add_setter_input()
|
|
74
79
|
|
|
75
|
-
|
|
80
|
+
if self.set_hotkey is None:
|
|
81
|
+
setter_button_text = "Set"
|
|
82
|
+
else:
|
|
83
|
+
setter_button_text = f"[{self.set_hotkey}] Set"
|
|
84
|
+
|
|
85
|
+
dpg.add_button(label=setter_button_text, callback=self.on_value_set)
|
|
76
86
|
|
|
77
87
|
GameObjectUI.displayed_objects.append(self)
|
|
78
88
|
|
|
@@ -141,7 +151,7 @@ class GameObjectUI(AbstractUIComponent):
|
|
|
141
151
|
else:
|
|
142
152
|
self.gameobject.frozen = new_value
|
|
143
153
|
|
|
144
|
-
def
|
|
154
|
+
def on_freeze_hotkey_press(self):
|
|
145
155
|
dpg.set_value(self.dpg_tag_frozen, not dpg.get_value(self.dpg_tag_frozen))
|
|
146
156
|
|
|
147
157
|
self.on_frozen_state_change()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|