batframework 1.0.9a10__py3-none-any.whl → 1.0.9a11__py3-none-any.whl
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.
- batFramework/gui/clickableWidget.py +2 -3
- batFramework/gui/container.py +7 -2
- batFramework/gui/layout.py +3 -0
- batFramework/sceneManager.py +1 -1
- {batframework-1.0.9a10.dist-info → batframework-1.0.9a11.dist-info}/METADATA +1 -1
- {batframework-1.0.9a10.dist-info → batframework-1.0.9a11.dist-info}/RECORD +9 -9
- {batframework-1.0.9a10.dist-info → batframework-1.0.9a11.dist-info}/LICENSE +0 -0
- {batframework-1.0.9a10.dist-info → batframework-1.0.9a11.dist-info}/WHEEL +0 -0
- {batframework-1.0.9a10.dist-info → batframework-1.0.9a11.dist-info}/top_level.txt +0 -0
@@ -165,7 +165,7 @@ class ClickableWidget(Shape, InteractiveWidget):
|
|
165
165
|
self.set_relief(self.pressed_relief)
|
166
166
|
self.do_on_click_down(button)
|
167
167
|
return True
|
168
|
-
return
|
168
|
+
return True
|
169
169
|
|
170
170
|
def on_click_up(self, button):
|
171
171
|
if button < 1 or button > 5 : return False
|
@@ -178,7 +178,7 @@ class ClickableWidget(Shape, InteractiveWidget):
|
|
178
178
|
self.click()
|
179
179
|
self.do_on_click_up(button)
|
180
180
|
return True
|
181
|
-
return
|
181
|
+
return True
|
182
182
|
|
183
183
|
|
184
184
|
def on_enter(self) -> None:
|
@@ -200,7 +200,6 @@ class ClickableWidget(Shape, InteractiveWidget):
|
|
200
200
|
super().on_lose_focus()
|
201
201
|
self.on_exit()
|
202
202
|
|
203
|
-
|
204
203
|
def _paint_disabled(self) -> None:
|
205
204
|
self.surface.blit(
|
206
205
|
self.get_surface_filter(), (0, 0), special_flags=pygame.BLEND_RGB_SUB
|
batFramework/gui/container.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
import pygame
|
1
2
|
import batFramework as bf
|
2
3
|
from .widget import Widget
|
3
4
|
from .shape import Shape
|
@@ -128,8 +129,12 @@ class Container(Shape, InteractiveWidget):
|
|
128
129
|
return any(child.is_focused for child in self.get_interactive_children())
|
129
130
|
|
130
131
|
def do_handle_event(self, event) -> None:
|
131
|
-
|
132
|
-
|
132
|
+
super().do_handle_event(event)
|
133
|
+
if event.type == pygame.MOUSEWHEEL:
|
134
|
+
# Adjust scroll based on the mouse wheel movement
|
135
|
+
scroll_speed = 20 # Adjust this value to control the scroll speed
|
136
|
+
self.scroll_by((0, -event.y * scroll_speed)) # Scroll vertically
|
137
|
+
event.consumed = True # Mark the event as consumed
|
133
138
|
self.layout.handle_event(event)
|
134
139
|
|
135
140
|
def set_focused_child(self, child: InteractiveWidget) -> bool:
|
batFramework/gui/layout.py
CHANGED
@@ -88,6 +88,9 @@ class Layout(ABC):
|
|
88
88
|
container = self.parent
|
89
89
|
|
90
90
|
while container and not container.is_root:
|
91
|
+
if not hasattr(container,"scroll"):
|
92
|
+
container = container.parent
|
93
|
+
continue
|
91
94
|
target_rect = target.rect # global
|
92
95
|
padded_rect = container.get_inner_rect() # global
|
93
96
|
|
batFramework/sceneManager.py
CHANGED
@@ -56,7 +56,7 @@ class SceneManager:
|
|
56
56
|
print("\n" + "=" * 50)
|
57
57
|
print(" DEBUGGING STATUS".center(50))
|
58
58
|
print("=" * 50)
|
59
|
-
print(f"[Debugging Mode] = {bf.ResourceManager().get_sharedVar(
|
59
|
+
print(f"[Debugging Mode] = {bf.ResourceManager().get_sharedVar('debug_mode')}")
|
60
60
|
|
61
61
|
# Print shared variables
|
62
62
|
print("\n" + "=" * 50)
|
@@ -22,7 +22,7 @@ batFramework/renderGroup.py,sha256=e6p76CXVtV4lwJ9OzmLlLIncni8yyUriJeik2bNJNhw,1
|
|
22
22
|
batFramework/resourceManager.py,sha256=Vb1AxkMybRdSe-IyKS2XqK2MV55pSbJSyXkq-BvMZW8,4588
|
23
23
|
batFramework/scene.py,sha256=GjJtIS2daY20EZhjakEeCX7V-riUD9Q_4bl6r4bl_5c,930
|
24
24
|
batFramework/sceneLayer.py,sha256=0LJtliyPKn8DSL9mMfS6m5DgXogGPm3yDwXSkBqDTaU,4645
|
25
|
-
batFramework/sceneManager.py,sha256=
|
25
|
+
batFramework/sceneManager.py,sha256=vCzEj4ctfu90C6jVlKcdiN15jECMJyWH-eS44jBkj2s,6898
|
26
26
|
batFramework/scrollingSprite.py,sha256=weIvJkDur71ZJgevvL4aZoQZ9yoDAqBoXX68fawsfbo,4169
|
27
27
|
batFramework/sprite.py,sha256=hPE2aMRnW1h5W3RWVVNIHazNRnmtf2_s-dgHpboTW2k,1627
|
28
28
|
batFramework/stateMachine.py,sha256=wC-5xbKvf-vGm_N16X9KhgMya5915GyVXL79uk5Bapw,1359
|
@@ -34,15 +34,15 @@ batFramework/utils.py,sha256=6dDELGW8irN8ZBbY5tMb_-NaBgdnbq-2VkoZjFngnIk,12254
|
|
34
34
|
batFramework/gui/__init__.py,sha256=K_T6t1wZAhd5zeVXwL_ULSwmunSPz533kqMKvg1iPzA,796
|
35
35
|
batFramework/gui/animatedLabel.py,sha256=17EunGRfohYI_1cacrXJU3o3IlSSPKkQE9v55U58PYA,3082
|
36
36
|
batFramework/gui/button.py,sha256=g4S60hsXpuhZjtrv8C9ht0TEwBHJh-jrsLdxRkSMmbE,552
|
37
|
-
batFramework/gui/clickableWidget.py,sha256=
|
38
|
-
batFramework/gui/container.py,sha256=
|
37
|
+
batFramework/gui/clickableWidget.py,sha256=Us9zKF66MBxo974f1xZA7mWtxjKdR85OOsRmDC9aDXo,8146
|
38
|
+
batFramework/gui/container.py,sha256=uLaLoQI3uZL462QE3cKlfneOwqqXF2aSzoIKKNqapYY,7130
|
39
39
|
batFramework/gui/debugger.py,sha256=7SYBZ9KonlbiK2AOvpVelgRS86yxaqfoB1cC9kdmC08,3665
|
40
40
|
batFramework/gui/draggableWidget.py,sha256=8gIyIdKTucJmz3MSzfcC_cVBE29anuma5LNfVQrUPy0,1887
|
41
41
|
batFramework/gui/image.py,sha256=zzuHGZ7gkTwO7HEzd1jvrG82vV9ami3fgme0sA-8c5I,1755
|
42
42
|
batFramework/gui/indicator.py,sha256=uJEqaE93ed13T9C60FW_LTf0aFt9xNbKweAoQD4SYSk,3158
|
43
43
|
batFramework/gui/interactiveWidget.py,sha256=UlzRiSp1mW6VmincahCcob1O32LyDZl1H-bw89rW9r8,7786
|
44
44
|
batFramework/gui/label.py,sha256=yZGAY-qQijCa9_SxWI_Sfs3mf4xB9ufXQa0nCwuYYPo,11675
|
45
|
-
batFramework/gui/layout.py,sha256=
|
45
|
+
batFramework/gui/layout.py,sha256=tzqWeel_yBS6hSJE4Lv_eXt14Q-ENlHAC1nHz1pJsCo,17420
|
46
46
|
batFramework/gui/meter.py,sha256=OhwEsuJjWW43oMdG-S9HVLReqbE7m1yC6advQVPTVYE,3203
|
47
47
|
batFramework/gui/radioButton.py,sha256=TPgYIf75BdKyR4j9mlpJ2OPDabDBCJ1dYAbJBN40PMc,1281
|
48
48
|
batFramework/gui/root.py,sha256=RCMya7OM-DU5j9SeDbvU-1JYOeAA2rHdyshBYjw4WvE,7523
|
@@ -60,8 +60,8 @@ batFramework/gui/constraints/__init__.py,sha256=qqXE8nnSrEvCSeHdqY8UYPZLetqdubFP
|
|
60
60
|
batFramework/gui/constraints/constraints.py,sha256=LwbaIyerVRo5AJhVgjhcFfxFva6Wm9YcOneC0tONlP4,31598
|
61
61
|
batFramework/templates/__init__.py,sha256=E9PmclsTSsTZo-aDrIMiplFJeK4KiUJVFoA9mZw6ur0,25
|
62
62
|
batFramework/templates/controller.py,sha256=xylgodtCUj4Tpz6Yze6-uFgarxs44m7HaKY4q6nWqVQ,2969
|
63
|
-
batframework-1.0.
|
64
|
-
batframework-1.0.
|
65
|
-
batframework-1.0.
|
66
|
-
batframework-1.0.
|
67
|
-
batframework-1.0.
|
63
|
+
batframework-1.0.9a11.dist-info/LICENSE,sha256=A65iXbMDbOxQLDNOODJLqA7o5RxszYlEqIgNSzBQRf4,1073
|
64
|
+
batframework-1.0.9a11.dist-info/METADATA,sha256=DwC5p2f9aODIq1wJ0bZgUbOdsDRCAWuffqYCXoz1Tt8,2938
|
65
|
+
batframework-1.0.9a11.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
66
|
+
batframework-1.0.9a11.dist-info/top_level.txt,sha256=vxAKBIk1oparFTxeXGBrgfIO7iq_YR5Fv1JvPVAIwmA,13
|
67
|
+
batframework-1.0.9a11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|