batframework 1.0.9a4__py3-none-any.whl → 1.0.9a6__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/__init__.py +1 -1
- batFramework/audioManager.py +1 -1
- batFramework/cutscene.py +13 -4
- batFramework/gui/label.py +4 -7
- batFramework/gui/styleManager.py +1 -1
- batFramework/scrollingSprite.py +3 -7
- {batframework-1.0.9a4.dist-info → batframework-1.0.9a6.dist-info}/METADATA +1 -1
- {batframework-1.0.9a4.dist-info → batframework-1.0.9a6.dist-info}/RECORD +11 -11
- {batframework-1.0.9a4.dist-info → batframework-1.0.9a6.dist-info}/LICENCE +0 -0
- {batframework-1.0.9a4.dist-info → batframework-1.0.9a6.dist-info}/WHEEL +0 -0
- {batframework-1.0.9a4.dist-info → batframework-1.0.9a6.dist-info}/top_level.txt +0 -0
batFramework/__init__.py
CHANGED
@@ -9,8 +9,8 @@ from .utils import Utils as utils
|
|
9
9
|
from .tileset import Tileset
|
10
10
|
from .timeManager import TimeManager,Timer,SceneTimer
|
11
11
|
from .easingController import EasingController
|
12
|
-
import batFramework.cutscene
|
13
12
|
from .cutsceneManager import CutsceneManager
|
13
|
+
from .cutscene import *
|
14
14
|
from .audioManager import AudioManager
|
15
15
|
import batFramework.transition as transition
|
16
16
|
from .action import Action
|
batFramework/audioManager.py
CHANGED
@@ -11,7 +11,7 @@ class AudioManager(metaclass=bf.Singleton):
|
|
11
11
|
self.current_music: str | None = None
|
12
12
|
self.music_volume: float = 1
|
13
13
|
self.sound_volume: float = 1
|
14
|
-
pygame.
|
14
|
+
# pygame.mixer.music.set_endevent(bf.const.MUSIC_END_EVENT)
|
15
15
|
|
16
16
|
def free_sounds(self, force: bool = False):
|
17
17
|
if force:
|
batFramework/cutscene.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import batFramework as bf
|
2
|
-
|
2
|
+
from .transition import Transition
|
3
3
|
class Cutscene:
|
4
4
|
def __init__(self,*cutscenes):
|
5
5
|
self.is_over : bool = False
|
@@ -18,12 +18,14 @@ class Cutscene:
|
|
18
18
|
self.sub_cutscenes[self.sub_index].process_event(event)
|
19
19
|
|
20
20
|
def update(self,dt):
|
21
|
-
if self.sub_index
|
21
|
+
if self.sub_index >= 0:
|
22
22
|
self.sub_cutscenes[self.sub_index].update(dt)
|
23
23
|
if self.sub_cutscenes[self.sub_index].is_over:
|
24
24
|
self.sub_index +=1
|
25
25
|
if self.sub_index >= len(self.sub_cutscenes):
|
26
26
|
self.end()
|
27
|
+
return
|
28
|
+
self.sub_cutscenes[self.sub_index].start()
|
27
29
|
|
28
30
|
def end(self):
|
29
31
|
self.is_over = True
|
@@ -40,5 +42,12 @@ class Wait(Cutscene):
|
|
40
42
|
|
41
43
|
|
42
44
|
|
43
|
-
|
44
|
-
|
45
|
+
class TransitionToScene(Cutscene):
|
46
|
+
def __init__(self,scene_name:str,transition:Transition):
|
47
|
+
super().__init__()
|
48
|
+
self.scene_name = scene_name
|
49
|
+
self.transition: Transition = transition
|
50
|
+
|
51
|
+
def start(self):
|
52
|
+
bf.CutsceneManager().manager.transition_to_scene(self.scene_name,self.transition)
|
53
|
+
bf.Timer(self.transition.duration,end_callback=self.end).start()
|
batFramework/gui/label.py
CHANGED
@@ -246,9 +246,9 @@ class Label(Shape):
|
|
246
246
|
|
247
247
|
def _build_layout(self) -> None:
|
248
248
|
|
249
|
+
# print(self.text_rect.size,self._get_text_rect_required_size(),repr(self.text))
|
249
250
|
self.text_rect.size = self._get_text_rect_required_size()
|
250
|
-
|
251
|
-
# self.text_rect.h = ceil(self.text_rect.h)
|
251
|
+
|
252
252
|
if self.autoresize_h or self.autoresize_w:
|
253
253
|
target_rect = self.inflate_rect_by_padding((0, 0, *self.text_rect.size))
|
254
254
|
if not self.autoresize_w:
|
@@ -256,9 +256,10 @@ class Label(Shape):
|
|
256
256
|
if not self.autoresize_h:
|
257
257
|
target_rect.h = self.rect.h
|
258
258
|
if self.rect.size != target_rect.size:
|
259
|
+
# print("Size not good ! ",self.rect.size,target_rect.size,repr(self.text))
|
259
260
|
self.set_size(target_rect.size)
|
260
261
|
self.apply_updates()
|
261
|
-
|
262
|
+
|
262
263
|
offset = self._get_outline_offset() if self.show_text_outline else (0,0)
|
263
264
|
padded = self.get_padded_rect().move(-self.rect.x + offset[0], -self.rect.y + offset[1])
|
264
265
|
self.align_text(self.text_rect, padded, self.alignment)
|
@@ -271,7 +272,6 @@ class Label(Shape):
|
|
271
272
|
if self.font_object is None:
|
272
273
|
print(f"No font for widget with text : '{self}' :(")
|
273
274
|
return
|
274
|
-
|
275
275
|
params = {
|
276
276
|
"font_name": self.font_object.name,
|
277
277
|
"text": self.text,
|
@@ -333,6 +333,3 @@ class Label(Shape):
|
|
333
333
|
super().paint()
|
334
334
|
if self.font_object:
|
335
335
|
self._paint_text()
|
336
|
-
|
337
|
-
# def set_alignment(self, alignment: bf.alignment) -> Self:
|
338
|
-
# return self
|
batFramework/gui/styleManager.py
CHANGED
batFramework/scrollingSprite.py
CHANGED
@@ -17,19 +17,15 @@ class ScrollingSprite(bf.Sprite):
|
|
17
17
|
# Use integer values for the starting points, converted from floating point scroll values
|
18
18
|
|
19
19
|
super().__init__(size, data, convert_alpha)
|
20
|
-
|
20
|
+
if self.original_surface:
|
21
|
+
self.original_width, self.original_height = self.original_surface.get_size()
|
22
|
+
|
21
23
|
|
22
24
|
def get_debug_outlines(self):
|
23
25
|
yield from super().get_debug_outlines()
|
24
26
|
for r in self._get_mosaic_rect_list():
|
25
27
|
yield r.move(*self.rect.topleft)
|
26
28
|
|
27
|
-
def set_image(
|
28
|
-
self, data: pygame.Surface | str, size: None | tuple[int, int] = None
|
29
|
-
) -> Self:
|
30
|
-
super().set_image(data, size)
|
31
|
-
self.original_width, self.original_height = self.original_surface.get_size()
|
32
|
-
return self
|
33
29
|
|
34
30
|
def set_autoscroll(self, x: float, y: float) -> Self:
|
35
31
|
self.auto_scroll.update(x, y)
|
@@ -1,13 +1,13 @@
|
|
1
|
-
batFramework/__init__.py,sha256=
|
1
|
+
batFramework/__init__.py,sha256=Wu_8kpeyR_XgD5zewnX_xXAF8CwStcO7vivideqsgIw,2590
|
2
2
|
batFramework/action.py,sha256=919IVYKviLyVYDtQL7oZvlVuE_aodjJCuwz6fGi5sCk,8420
|
3
3
|
batFramework/actionContainer.py,sha256=qy6-YY3iX26KJ8NqFMSYo6JExohD8HFk0sC1qhb7qA8,2602
|
4
4
|
batFramework/animatedSprite.py,sha256=IWE8zUgpFaqQPUr7iOUo7TJ_E10aUaMNqlIqv8dW87E,4242
|
5
5
|
batFramework/animation.py,sha256=_XcH6r3TVQZUcLbhzUnTNlXrjy-J-nYiRmFpxvTYEoc,1934
|
6
|
-
batFramework/audioManager.py,sha256=
|
6
|
+
batFramework/audioManager.py,sha256=dq33KoHWKDk8n-6xxXMJYQ2i6PEHZ47VYJpRMtlukzI,3852
|
7
7
|
batFramework/camera.py,sha256=tSy9n20QLeJD3Uz352q-uejzAHPtQczvahaNz7APJcY,9408
|
8
8
|
batFramework/character.py,sha256=AK5sQLvAOY3X4-7vzeHeIO5WDFsubn_TADLYxmYc0Qo,789
|
9
9
|
batFramework/constants.py,sha256=x8a0GqBJdiwMEjlVohyL3AWHaSxyrBy-4pucVKVNakg,1354
|
10
|
-
batFramework/cutscene.py,sha256=
|
10
|
+
batFramework/cutscene.py,sha256=UOz3NApbz4W7Wi6wD_ZEmkxaZCAWt1YWh5ZFzXw5Xco,1749
|
11
11
|
batFramework/cutsceneManager.py,sha256=mvBR4KOv6KV9eHzhYH7r6IJMVLjM71C30C2OuvwbuSU,945
|
12
12
|
batFramework/drawable.py,sha256=5We2ITq3M5ERG22-iQw7Mo_1LNo0nqma1P13tvphDjY,2197
|
13
13
|
batFramework/dynamicEntity.py,sha256=SjXShy5aT4cQzjlTem05zSQRiNeq52AUXEBVodEG6gI,736
|
@@ -21,7 +21,7 @@ batFramework/renderGroup.py,sha256=CO8LtTP1gYI1i_8OwmMk2SlU33Nv4iXnHvK0RVK3D24,2
|
|
21
21
|
batFramework/resourceManager.py,sha256=0cOIAFXT7UzzvgHn9QkWcXsTp8H2bIS70NvvgpBL2_4,3554
|
22
22
|
batFramework/scene.py,sha256=0E7omgNUEl5Uhbx8iO3exyCy4p1MC7bSvqfwncW4KMw,11281
|
23
23
|
batFramework/sceneManager.py,sha256=GCGt7DYoty_wX2LVEhv0C6TaNyNWhKvWocwOqxUIBXc,7099
|
24
|
-
batFramework/scrollingSprite.py,sha256=
|
24
|
+
batFramework/scrollingSprite.py,sha256=6FFS27kPaPto6-lIM7k3zHW1pnlEJ4mFopYP_tyvzb0,3917
|
25
25
|
batFramework/sprite.py,sha256=Cz8qzl8jR8y33DUSCObJQOk5e8PcZeavtFhBdR2TogU,1627
|
26
26
|
batFramework/stateMachine.py,sha256=wC-5xbKvf-vGm_N16X9KhgMya5915GyVXL79uk5Bapw,1359
|
27
27
|
batFramework/tileset.py,sha256=3AJBWHx90PC43BdLYCBFm811XBrMvWoB-nsUgyo6s-I,1728
|
@@ -39,7 +39,7 @@ batFramework/gui/draggableWidget.py,sha256=SKG7oMInZ_GTnrbv2T0aqlppuiuLX1tkVSCQJ
|
|
39
39
|
batFramework/gui/image.py,sha256=CPDSF7Fz1zmGAK-ii7R4MIAD5EZCnPw4mpD_cGv77U8,1925
|
40
40
|
batFramework/gui/indicator.py,sha256=31QAyvT9w-eCWUSoK4pV-4TsTzFvkY_g5snoeI1hATM,1619
|
41
41
|
batFramework/gui/interactiveWidget.py,sha256=ww9WsR2Y87og7NtnzCcyc1zIPE-Bjtn0YZ0SOfKMUbQ,6633
|
42
|
-
batFramework/gui/label.py,sha256=
|
42
|
+
batFramework/gui/label.py,sha256=6GY_2f4el1KmJ3JoLgE57oPl7Xdbx1codaHdAW3h_x0,11639
|
43
43
|
batFramework/gui/layout.py,sha256=MJjcz6fjTWtt4-Td0dAqKd3XRDlRJ5QaDpRbdYEj1w8,21661
|
44
44
|
batFramework/gui/meter.py,sha256=RFzAhSzR3O-Pw0wjdfApWGWFQSJoYa4WohkiREDAAJc,2395
|
45
45
|
batFramework/gui/radioButton.py,sha256=DgCtN1j1s2rUITpdYqArqQ36NnNGump7FiTe_ndEzJg,2436
|
@@ -47,7 +47,7 @@ batFramework/gui/root.py,sha256=r8dhI2xd2h5bUbTe4x_On77BTTZ7Sf8qY5wWJimWXds,5078
|
|
47
47
|
batFramework/gui/shape.py,sha256=PSQRqa8jYA8VsBXRQcpcCuEvTYmWDW8zJkzA_eRFPIo,9349
|
48
48
|
batFramework/gui/slider.py,sha256=rt0f2jnxyd89uepyBqBueP3qw6y9ZTIRGXipI9fhBs4,8467
|
49
49
|
batFramework/gui/style.py,sha256=OeLbft0RkIslQ2IcZpBeF6TaQDONIoBcAHj_Bkh9gFw,131
|
50
|
-
batFramework/gui/styleManager.py,sha256=
|
50
|
+
batFramework/gui/styleManager.py,sha256=mg9VbK0Ux9pwTbq9oICilnQG3xJLnnZEjOzzSg0IVpY,1424
|
51
51
|
batFramework/gui/textInput.py,sha256=v4r110mYmPj0RB97DsCG81U06dUd-7cnNeBj-mnbdiE,11002
|
52
52
|
batFramework/gui/toggle.py,sha256=icvg0GY0pErCZPWoje_SO7L6Ik_sM--XHTM-pUAwdY8,3997
|
53
53
|
batFramework/gui/widget.py,sha256=KrkQH8Z2tSVcnCHhet-xXlHy3SqSjHByBQVNoTOs54E,14597
|
@@ -56,8 +56,8 @@ batFramework/gui/constraints/constraints.py,sha256=XFvrjFFN1nmbYzI6l54DlZkrRP-wW
|
|
56
56
|
batFramework/templates/__init__.py,sha256=8XN-7JwYFKTRx_lnUL_If3spwgn5_2b7bwmrRRBPON0,46
|
57
57
|
batFramework/templates/character.py,sha256=4UEcegUIeIgj48sVgzyRcT6yjpFOZ8Q_gHTtiB5j6kw,1348
|
58
58
|
batFramework/templates/states.py,sha256=WeomVrQ10vHxVCj9Wnk1PcinKyb871uV910mQe287kI,5370
|
59
|
-
batframework-1.0.
|
60
|
-
batframework-1.0.
|
61
|
-
batframework-1.0.
|
62
|
-
batframework-1.0.
|
63
|
-
batframework-1.0.
|
59
|
+
batframework-1.0.9a6.dist-info/LICENCE,sha256=A65iXbMDbOxQLDNOODJLqA7o5RxszYlEqIgNSzBQRf4,1073
|
60
|
+
batframework-1.0.9a6.dist-info/METADATA,sha256=TGefRNmmWF0aOtRuqY6Yh6-G4U5IYUZqE1wfU5lVXx8,1694
|
61
|
+
batframework-1.0.9a6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
62
|
+
batframework-1.0.9a6.dist-info/top_level.txt,sha256=vxAKBIk1oparFTxeXGBrgfIO7iq_YR5Fv1JvPVAIwmA,13
|
63
|
+
batframework-1.0.9a6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|