batframework 1.1.0__py3-none-any.whl → 2.0.0a1__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 +84 -52
- batFramework/action.py +280 -252
- batFramework/actionContainer.py +105 -38
- batFramework/animatedSprite.py +81 -117
- batFramework/animation.py +91 -0
- batFramework/audioManager.py +156 -85
- batFramework/baseScene.py +249 -0
- batFramework/camera.py +245 -123
- batFramework/constants.py +57 -75
- batFramework/cutscene.py +239 -119
- batFramework/cutsceneManager.py +34 -0
- batFramework/drawable.py +107 -0
- batFramework/dynamicEntity.py +30 -23
- batFramework/easingController.py +58 -0
- batFramework/entity.py +130 -123
- batFramework/enums.py +171 -0
- batFramework/fontManager.py +65 -0
- batFramework/gui/__init__.py +28 -14
- batFramework/gui/animatedLabel.py +90 -0
- batFramework/gui/button.py +18 -84
- batFramework/gui/clickableWidget.py +244 -0
- batFramework/gui/collapseContainer.py +98 -0
- batFramework/gui/constraints/__init__.py +1 -0
- batFramework/gui/constraints/constraints.py +1066 -0
- batFramework/gui/container.py +220 -49
- batFramework/gui/debugger.py +140 -47
- batFramework/gui/draggableWidget.py +63 -0
- batFramework/gui/image.py +61 -23
- batFramework/gui/indicator.py +116 -40
- batFramework/gui/interactiveWidget.py +243 -22
- batFramework/gui/label.py +147 -110
- batFramework/gui/layout.py +442 -81
- batFramework/gui/meter.py +155 -0
- batFramework/gui/radioButton.py +43 -0
- batFramework/gui/root.py +228 -60
- batFramework/gui/scrollingContainer.py +282 -0
- batFramework/gui/selector.py +232 -0
- batFramework/gui/shape.py +286 -86
- batFramework/gui/slider.py +353 -0
- batFramework/gui/style.py +10 -0
- batFramework/gui/styleManager.py +49 -0
- batFramework/gui/syncedVar.py +43 -0
- batFramework/gui/textInput.py +331 -0
- batFramework/gui/textWidget.py +308 -0
- batFramework/gui/toggle.py +140 -62
- batFramework/gui/tooltip.py +35 -0
- batFramework/gui/widget.py +546 -307
- batFramework/manager.py +131 -50
- batFramework/particle.py +118 -0
- batFramework/propertyEaser.py +79 -0
- batFramework/renderGroup.py +34 -0
- batFramework/resourceManager.py +130 -0
- batFramework/scene.py +31 -226
- batFramework/sceneLayer.py +134 -0
- batFramework/sceneManager.py +200 -165
- batFramework/scrollingSprite.py +115 -0
- batFramework/sprite.py +46 -0
- batFramework/stateMachine.py +49 -51
- batFramework/templates/__init__.py +2 -0
- batFramework/templates/character.py +15 -0
- batFramework/templates/controller.py +158 -0
- batFramework/templates/stateMachine.py +39 -0
- batFramework/tileset.py +46 -0
- batFramework/timeManager.py +213 -0
- batFramework/transition.py +162 -157
- batFramework/triggerZone.py +22 -22
- batFramework/utils.py +306 -184
- {batframework-1.1.0.dist-info → batframework-2.0.0a1.dist-info}/LICENSE +20 -20
- {batframework-1.1.0.dist-info → batframework-2.0.0a1.dist-info}/METADATA +7 -2
- batframework-2.0.0a1.dist-info/RECORD +72 -0
- batFramework/cutsceneBlocks.py +0 -176
- batFramework/debugger.py +0 -48
- batFramework/easing.py +0 -71
- batFramework/gui/constraints.py +0 -204
- batFramework/gui/frame.py +0 -19
- batFramework/particles.py +0 -77
- batFramework/time.py +0 -75
- batFramework/transitionManager.py +0 -0
- batframework-1.1.0.dist-info/RECORD +0 -43
- {batframework-1.1.0.dist-info → batframework-2.0.0a1.dist-info}/WHEEL +0 -0
- {batframework-1.1.0.dist-info → batframework-2.0.0a1.dist-info}/top_level.txt +0 -0
batFramework/utils.py
CHANGED
@@ -1,184 +1,306 @@
|
|
1
|
-
import pygame
|
2
|
-
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
class
|
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
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
for
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
@staticmethod
|
171
|
-
def
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
1
|
+
import pygame
|
2
|
+
import batFramework as bf
|
3
|
+
import math
|
4
|
+
import random
|
5
|
+
from .enums import *
|
6
|
+
import re
|
7
|
+
from typing import Callable, TYPE_CHECKING
|
8
|
+
from functools import cache
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from .drawable import Drawable
|
11
|
+
from .entity import Entity
|
12
|
+
from pygame.math import Vector2
|
13
|
+
|
14
|
+
|
15
|
+
class Singleton(type):
|
16
|
+
_instances = {}
|
17
|
+
|
18
|
+
def __call__(cls, *args, **kwargs):
|
19
|
+
if cls not in cls._instances:
|
20
|
+
cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
|
21
|
+
return cls._instances[cls]
|
22
|
+
|
23
|
+
|
24
|
+
class Utils:
|
25
|
+
|
26
|
+
@staticmethod
|
27
|
+
def split_surface(
|
28
|
+
surface: pygame.Surface, split_size: tuple[int, int], func=None
|
29
|
+
) -> dict[tuple[int, int], pygame.Surface]:
|
30
|
+
"""
|
31
|
+
Splits a surface into subsurfaces based on a given size and returns a dictionary of them with their coordinates as keys.
|
32
|
+
|
33
|
+
Args:
|
34
|
+
surface (pygame.Surface): The surface to be split.
|
35
|
+
split_size (tuple[int, int]): The size of each subsurface (width, height).
|
36
|
+
func (callable, optional): A function to apply to each subsurface. Defaults to None.
|
37
|
+
|
38
|
+
Returns:
|
39
|
+
dict[tuple[int, int], pygame.Surface]: A dictionary with (x, y) coordinates as keys and the corresponding subsurfaces as values.
|
40
|
+
"""
|
41
|
+
width, height = surface.get_size()
|
42
|
+
res = {}
|
43
|
+
for iy, y in enumerate(range(0, height, split_size[1])):
|
44
|
+
for ix, x in enumerate(range(0, width, split_size[0])):
|
45
|
+
sub = surface.subsurface((x, y, split_size[0], split_size[1]))
|
46
|
+
|
47
|
+
if func is not None:
|
48
|
+
sub = func(sub)
|
49
|
+
|
50
|
+
res[(ix, iy)] = sub
|
51
|
+
|
52
|
+
return res
|
53
|
+
|
54
|
+
@staticmethod
|
55
|
+
def filter_text(text_mode: textMode):
|
56
|
+
"""
|
57
|
+
Filters a string based on the specified text mode.
|
58
|
+
|
59
|
+
Args:
|
60
|
+
text_mode (textMode): Mode specifying the type of filtering (ALPHABETICAL, NUMERICAL, ALPHANUMERICAL).
|
61
|
+
|
62
|
+
Returns:
|
63
|
+
callable: A function that takes a string and removes all characters not allowed by the text mode.
|
64
|
+
|
65
|
+
Raises:
|
66
|
+
ValueError: If an unsupported text mode is provided.
|
67
|
+
"""
|
68
|
+
|
69
|
+
if text_mode == textMode.ALPHABETICAL:
|
70
|
+
pattern = re.compile(r"[^a-zA-Z]")
|
71
|
+
elif text_mode == textMode.NUMERICAL:
|
72
|
+
pattern = re.compile(r"[^0-9]")
|
73
|
+
elif text_mode == textMode.ALPHANUMERICAL:
|
74
|
+
pattern = re.compile(r"[^a-zA-Z0-9]")
|
75
|
+
else:
|
76
|
+
raise ValueError("Unsupported text mode")
|
77
|
+
|
78
|
+
def filter_function(s: str) -> str:
|
79
|
+
return pattern.sub("", s)
|
80
|
+
|
81
|
+
return filter_function
|
82
|
+
|
83
|
+
|
84
|
+
@staticmethod
|
85
|
+
def create_spotlight(inside_color, outside_color, radius, radius_stop=None, dest_surf=None,size=None):
|
86
|
+
"""
|
87
|
+
Creates a spotlight effect on a surface with a gradient from inside_color to outside_color.
|
88
|
+
|
89
|
+
Args:
|
90
|
+
inside_color (tuple[int, int, int]): RGB color at the center of the spotlight.
|
91
|
+
outside_color (tuple[int, int, int]): RGB color at the outer edge of the spotlight.
|
92
|
+
radius (int): Radius of the inner circle.
|
93
|
+
radius_stop (int, optional): Radius where the spotlight ends. Defaults to the value of radius.
|
94
|
+
dest_surf (pygame.Surface, optional): Surface to draw the spotlight on. Defaults to None.
|
95
|
+
size (tuple[int, int], optional): Size of the surface if dest_surf is None. Defaults to a square based on radius_stop.
|
96
|
+
|
97
|
+
Returns:
|
98
|
+
pygame.Surface: The surface with the spotlight effect drawn on it.
|
99
|
+
"""
|
100
|
+
|
101
|
+
if radius_stop is None:
|
102
|
+
radius_stop = radius
|
103
|
+
diameter = radius_stop * 2
|
104
|
+
|
105
|
+
if dest_surf is None:
|
106
|
+
if size is None:
|
107
|
+
size = (diameter,diameter)
|
108
|
+
dest_surf = pygame.Surface(size, pygame.SRCALPHA)
|
109
|
+
|
110
|
+
dest_surf.fill((0,0,0,0))
|
111
|
+
|
112
|
+
|
113
|
+
center = dest_surf.get_rect().center
|
114
|
+
|
115
|
+
if radius_stop != radius:
|
116
|
+
for r in range(radius_stop, radius - 1, -1):
|
117
|
+
color = [
|
118
|
+
inside_color[i] + (outside_color[i] - inside_color[i]) * (r - radius) / (radius_stop - radius)
|
119
|
+
for i in range(3)
|
120
|
+
] + [255] # Preserve the alpha channel as fully opaque
|
121
|
+
pygame.draw.circle(dest_surf, color, center, r)
|
122
|
+
else:
|
123
|
+
pygame.draw.circle(dest_surf, inside_color, center, radius)
|
124
|
+
|
125
|
+
return dest_surf
|
126
|
+
|
127
|
+
@staticmethod
|
128
|
+
def draw_spotlight(dest_surf:pygame.Surface,inside_color,outside_color,radius,radius_stop=None,center=None):
|
129
|
+
"""
|
130
|
+
Draws a spotlight effect directly onto an existing surface.
|
131
|
+
|
132
|
+
Args:
|
133
|
+
dest_surf (pygame.Surface): The surface to draw the spotlight on.
|
134
|
+
inside_color (tuple[int, int, int]): RGB color at the center of the spotlight.
|
135
|
+
outside_color (tuple[int, int, int]): RGB color at the outer edge of the spotlight.
|
136
|
+
radius (int): Radius of the inner circle.
|
137
|
+
radius_stop (int, optional): Radius where the spotlight ends. Defaults to the value of radius.
|
138
|
+
center (tuple[int, int], optional): Center point of the spotlight. Defaults to the center of dest_surf.
|
139
|
+
"""
|
140
|
+
|
141
|
+
if radius_stop is None:
|
142
|
+
radius_stop = radius
|
143
|
+
center = dest_surf.get_rect().center if center is None else center
|
144
|
+
if radius_stop != radius:
|
145
|
+
for r in range(radius_stop, radius - 1, -1):
|
146
|
+
color = [
|
147
|
+
inside_color[i] + (outside_color[i] - inside_color[i]) * (r - radius) / (radius_stop - radius)
|
148
|
+
for i in range(3)
|
149
|
+
] + [255]
|
150
|
+
pygame.draw.circle(dest_surf, color, center, r)
|
151
|
+
else:
|
152
|
+
pygame.draw.circle(dest_surf, inside_color, center, radius)
|
153
|
+
|
154
|
+
|
155
|
+
@staticmethod
|
156
|
+
def random_color(min_value: int = 0, max_value: int = 255) -> tuple[int, int, int]:
|
157
|
+
"""
|
158
|
+
Generates a random color as an RGB tuple.
|
159
|
+
|
160
|
+
Args:
|
161
|
+
min_value (int): Minimum value for each RGB component (inclusive). Defaults to 0.
|
162
|
+
max_value (int): Maximum value for each RGB component (inclusive). Defaults to 255.
|
163
|
+
|
164
|
+
Returns:
|
165
|
+
tuple[int, int, int]: A tuple representing a random color in RGB format, with each component
|
166
|
+
between min_value and max_value.
|
167
|
+
"""
|
168
|
+
return random.randint(min_value, max_value), random.randint(min_value, max_value), random.randint(min_value, max_value)
|
169
|
+
|
170
|
+
@staticmethod
|
171
|
+
def random_point_on_screen(margin: int = 0) -> tuple[int, int]:
|
172
|
+
"""
|
173
|
+
Generates a random point on the screen, considering a margin from the edges.
|
174
|
+
|
175
|
+
Args:
|
176
|
+
margin (int): Margin from the screen edges, where the point won't be generated.
|
177
|
+
If margin is less than 0 or greater than half the screen resolution, returns (0, 0).
|
178
|
+
|
179
|
+
Returns:
|
180
|
+
tuple[int, int]: A tuple representing a random point (x, y) on the screen within the screen
|
181
|
+
resolution minus the margin.
|
182
|
+
"""
|
183
|
+
if margin < 0 or margin > bf.const.RESOLUTION[0]//2 or margin > bf.const.RESOLUTION[1]//2:
|
184
|
+
return 0, 0
|
185
|
+
return random.randint(margin, bf.const.RESOLUTION[0] - margin), random.randint(margin, bf.const.RESOLUTION[1] - margin)
|
186
|
+
|
187
|
+
@staticmethod
|
188
|
+
def distance_point(a:tuple[float,float],b:tuple[float,float]):
|
189
|
+
return math.sqrt((a[0]-b[0]) ** 2 + (a[1]-b[1])**2)
|
190
|
+
|
191
|
+
@staticmethod
|
192
|
+
def rotate_point(point: Vector2, angle: float, center: Vector2) -> Vector2:
|
193
|
+
"""Rotate a point around a center by angle (in degrees)."""
|
194
|
+
rad = math.radians(angle)
|
195
|
+
translated = point - center
|
196
|
+
rotated = Vector2(
|
197
|
+
translated.x * math.cos(rad) - translated.y * math.sin(rad),
|
198
|
+
translated.x * math.sin(rad) + translated.y * math.cos(rad)
|
199
|
+
)
|
200
|
+
return rotated + center
|
201
|
+
|
202
|
+
|
203
|
+
def draw_triangle(surface:pygame.Surface, color, rect:pygame.FRect|pygame.Rect, direction:bf.enums.direction=bf.enums.direction.RIGHT,width:int=0):
|
204
|
+
"""
|
205
|
+
Draw a filled triangle inside a rectangle on a Pygame surface, pointing in the specified direction.
|
206
|
+
|
207
|
+
Args:
|
208
|
+
surface: The Pygame surface to draw on.
|
209
|
+
color: The color of the triangle (e.g., (255, 0, 0) for red).
|
210
|
+
rect: A pygame.Rect object defining the rectangle's position and size.
|
211
|
+
direction: A string ('up', 'down', 'left', 'right') indicating the triangle's orientation.
|
212
|
+
"""
|
213
|
+
# Define the three vertices of the triangle based on direction
|
214
|
+
rect = rect.copy()
|
215
|
+
rect.inflate_ip(-1,-1)
|
216
|
+
if direction == direction.UP:
|
217
|
+
points = [
|
218
|
+
(rect.left, rect.bottom), # Bottom-left corner
|
219
|
+
(rect.right, rect.bottom), # Bottom-right corner
|
220
|
+
(rect.centerx, rect.top) # Top center (apex)
|
221
|
+
]
|
222
|
+
elif direction == direction.DOWN:
|
223
|
+
points = [
|
224
|
+
(rect.left, rect.top), # Top-left corner
|
225
|
+
(rect.right, rect.top), # Top-right corner
|
226
|
+
(rect.centerx, rect.bottom) # Bottom center (apex)
|
227
|
+
]
|
228
|
+
elif direction == direction.LEFT:
|
229
|
+
points = [
|
230
|
+
(rect.right, rect.top), # Top-right corner
|
231
|
+
(rect.right, rect.bottom), # Bottom-right corner
|
232
|
+
(rect.left, rect.centery) # Left center (apex)
|
233
|
+
]
|
234
|
+
elif direction == direction.RIGHT:
|
235
|
+
points = [
|
236
|
+
(rect.left, rect.top), # Top-left corner
|
237
|
+
(rect.left, rect.bottom), # Bottom-left corner
|
238
|
+
(rect.right, rect.centery) # Right center (apex)
|
239
|
+
]
|
240
|
+
else:
|
241
|
+
raise ValueError("Invalid direction")
|
242
|
+
|
243
|
+
# Draw the filled triangle
|
244
|
+
pygame.draw.polygon(surface, color, points,width=width)
|
245
|
+
|
246
|
+
def draw_arc_by_points(surface, color, start_pos, end_pos, tightness=0.5, width=1, resolution=0.5,antialias:bool=False):
|
247
|
+
"""
|
248
|
+
Draw a smooth circular arc connecting start_pos and end_pos.
|
249
|
+
`tightness` controls curvature: 0 is straight line, 1 is semicircle, higher = more bulge.
|
250
|
+
Negative tightness flips the bulge direction.
|
251
|
+
|
252
|
+
Args:
|
253
|
+
surface - pygame Surface
|
254
|
+
color - RGB or RGBA
|
255
|
+
start_pos - (x, y)
|
256
|
+
end_pos - (x, y)
|
257
|
+
tightness - curvature control, 0 = straight, 1 = half circle
|
258
|
+
width - line width
|
259
|
+
resolution - approx pixels per segment
|
260
|
+
Returns:
|
261
|
+
pygame.Rect bounding the drawn arc
|
262
|
+
"""
|
263
|
+
p0 = pygame.Vector2(start_pos)
|
264
|
+
p1 = pygame.Vector2(end_pos)
|
265
|
+
chord = p1 - p0
|
266
|
+
if chord.length_squared() == 0:
|
267
|
+
if antialias:
|
268
|
+
return pygame.draw.aacircle(surface, color, p0, width // 2)
|
269
|
+
return pygame.draw.circle(surface, color, p0, width // 2)
|
270
|
+
|
271
|
+
# Midpoint and perpendicular
|
272
|
+
mid = (p0 + p1) * 0.5
|
273
|
+
perp = pygame.Vector2(-chord.y, chord.x).normalize()
|
274
|
+
|
275
|
+
# Distance of center from midpoint, based on tightness
|
276
|
+
h = chord.length() * tightness
|
277
|
+
center = mid + perp * h
|
278
|
+
|
279
|
+
# Radius and angles
|
280
|
+
r = (p0 - center).length()
|
281
|
+
ang0 = math.atan2(p0.y - center.y, p0.x - center.x)
|
282
|
+
ang1 = math.atan2(p1.y - center.y, p1.x - center.x)
|
283
|
+
|
284
|
+
# Normalize sweep direction based on sign of tightness
|
285
|
+
sweep = ang1 - ang0
|
286
|
+
if tightness > 0 and sweep < 0:
|
287
|
+
sweep += 2 * math.pi
|
288
|
+
elif tightness < 0 and sweep > 0:
|
289
|
+
sweep -= 2 * math.pi
|
290
|
+
|
291
|
+
# Number of points
|
292
|
+
arc_len = abs(sweep * r)
|
293
|
+
segs = max(2, int(arc_len / max(resolution, 1)))
|
294
|
+
|
295
|
+
points = []
|
296
|
+
for i in range(segs + 1):
|
297
|
+
t = i / segs
|
298
|
+
a = ang0 + sweep * t
|
299
|
+
points.append((
|
300
|
+
center.x + math.cos(a) * r,
|
301
|
+
center.y + math.sin(a) * r
|
302
|
+
))
|
303
|
+
if antialias:
|
304
|
+
return pygame.draw.aalines(surface, color, False, points)
|
305
|
+
|
306
|
+
return pygame.draw.lines(surface, color, False, points, width)
|
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) [2023] [TURAN BATURAY]
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) [2023] [TURAN BATURAY]
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
21
|
SOFTWARE.
|
@@ -1,7 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: batframework
|
3
|
-
Version:
|
3
|
+
Version: 2.0.0a1
|
4
4
|
Summary: Pygame framework for making games easier.
|
5
|
+
Author-email: Turan Baturay <baturayturan@gmail.com>
|
5
6
|
License: MIT License
|
6
7
|
|
7
8
|
Copyright (c) [2023] [TURAN BATURAY]
|
@@ -23,6 +24,10 @@ License: MIT License
|
|
23
24
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
24
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
25
26
|
SOFTWARE.
|
27
|
+
Project-URL: Homepage, https://github.com/TuranBaturay/batFramework
|
28
|
+
Classifier: Programming Language :: Python :: 3
|
29
|
+
Classifier: License :: OSI Approved :: MIT License
|
30
|
+
Classifier: Operating System :: OS Independent
|
26
31
|
Requires-Python: >=3.11
|
27
32
|
Description-Content-Type: text/markdown
|
28
33
|
License-File: LICENSE
|
@@ -30,7 +35,7 @@ Requires-Dist: pygame-ce
|
|
30
35
|
|
31
36
|
# batFramework
|
32
37
|
|
33
|
-
batFramework is a Python game framework built using Pygame, designed to simplify game development
|
38
|
+
batFramework is a Python game framework built using Pygame, designed to simplify game development.
|
34
39
|
|
35
40
|
## Purpose and Overview
|
36
41
|
The primary objective of batFramework is to streamline game development. It is mainly designed to program small 2D games
|
@@ -0,0 +1,72 @@
|
|
1
|
+
batFramework/__init__.py,sha256=uH7yXtXjXG0SQdsHJhpzAeRuhCjnz8OzNARcV7u9Vxw,2994
|
2
|
+
batFramework/action.py,sha256=KwnfpYaqKnQWwwIe0YKiC3BLckQcfiQ8cq9AP4jtFqg,8461
|
3
|
+
batFramework/actionContainer.py,sha256=mpdjO7wE2ukj5HaALBoBy3xlnocJ9TFBcSVYcF4KAxg,3233
|
4
|
+
batFramework/animatedSprite.py,sha256=4pArYyHi387ejpmRwRrKn_hw3k_-u-E4bKlNYJSjsVA,3167
|
5
|
+
batFramework/animation.py,sha256=Dtf9SnlgfxECYH4pjTsUjHlFoQM8AckKnPu1_TN8Ff0,3485
|
6
|
+
batFramework/audioManager.py,sha256=GcJ8M7SNp_E92liQ4BqL89mZrzI1BN9MYW7UivXRF6U,5895
|
7
|
+
batFramework/baseScene.py,sha256=m3M-Pdwq2K41u2h0weLQWc09OL1YjsbkizZg6E9MmLA,7704
|
8
|
+
batFramework/camera.py,sha256=7rQ2qLvC_c7SfCr9sxIM3__UTa1RUsO7kCfQYIegTFc,8977
|
9
|
+
batFramework/constants.py,sha256=PSsc7xDTlbU8efvM-DODXdmQa20zOSZxAjDZ5-XDTRg,1742
|
10
|
+
batFramework/cutscene.py,sha256=eBNAM2KryE7VN3tAZnxTiFhzVsgyQ2q0gCRPmSfzoAE,7176
|
11
|
+
batFramework/cutsceneManager.py,sha256=qF79OQGl824dts_JhX_SKG7AFITq4iEyB4HVOpc4B_M,1105
|
12
|
+
batFramework/drawable.py,sha256=Rwhy-XWMcYyCA3SSjiwtTtPkb6x3H0GFZWmvjo6-Bmw,3319
|
13
|
+
batFramework/dynamicEntity.py,sha256=-Ffo08LNEZn23rdQRDnY0qcUtIqKH92ywwKs8eh6AvE,766
|
14
|
+
batFramework/easingController.py,sha256=SMCGo29A0cc25hjvAfwA-fJVDzX6e-MfByhXymloibU,1850
|
15
|
+
batFramework/entity.py,sha256=gkxhwMdfUn79AGciM4ikxz8L9qvgflG6o9lUd8UtgHU,3609
|
16
|
+
batFramework/enums.py,sha256=II9G7zX7tcPvVHLVoEXNOTzloziHiFaT-ndfs60DwuM,4895
|
17
|
+
batFramework/fontManager.py,sha256=6N6TTlaNHGRpZQaiDwZmnv9UM79tmVSKUmNZq-Ka7To,2319
|
18
|
+
batFramework/manager.py,sha256=_4f4etdo55p8xNSReIiRX1WcKkm12HRViKHyCnr8bWM,4537
|
19
|
+
batFramework/particle.py,sha256=cymuqWBywUNa9i1gEZ8NBTqjB81KVqZUD6Z14lFu7ss,3296
|
20
|
+
batFramework/propertyEaser.py,sha256=HcwdXXfAHAO23tKMlEzODqu-ZIuGGVyhO8c01LHO2Lg,2662
|
21
|
+
batFramework/renderGroup.py,sha256=Kg8qfMNC1sL1PIiRebPXqeXsyDMNYNIr0Jo1u231aeE,1123
|
22
|
+
batFramework/resourceManager.py,sha256=bGWeloXKMuV9JorLY0iLEyICn9ILpgwiw9YRwztx-J0,4718
|
23
|
+
batFramework/scene.py,sha256=wBbF0kWHxY4EEV5aCRNT8nliZA19Ea4I6tZJULxR1w0,961
|
24
|
+
batFramework/sceneLayer.py,sha256=Jm79d9u0E2RIYRDvLUByCXmjhpO9XHwW6I9BLzv86tI,5114
|
25
|
+
batFramework/sceneManager.py,sha256=YeVFzOODbpUvOFZNjQDYpbNjL7NX8UeDh2AezGghX1Y,7226
|
26
|
+
batFramework/scrollingSprite.py,sha256=vMg7ULiLDKfk99FAmLGSqH0Z4PJo4oQFFu-dIYWvW8Q,4284
|
27
|
+
batFramework/sprite.py,sha256=vwewKu75ibFdSBPc0nQ7CNFvGqRzWG_oqASDcL1iVMM,1426
|
28
|
+
batFramework/stateMachine.py,sha256=XkWvR0TX5etTvNi8cIwKQSwgVUBogRBPI0B3-KWw5Do,1329
|
29
|
+
batFramework/tileset.py,sha256=zKGeexiqj4sr0JlBwDSrxq2RuO9q-6Q17-rH0p1kM7I,1774
|
30
|
+
batFramework/timeManager.py,sha256=pHXJqrmILPTHjyvoBu8wMCNHpKwLXRyYz0CSzxe_NlI,6873
|
31
|
+
batFramework/transition.py,sha256=YD2Z3lB0bLmpUb1IoXxVasVBtKbbl-YGpycanJAPLN4,5188
|
32
|
+
batFramework/triggerZone.py,sha256=qO4bPGibecerzKQTtLK5FIha44yI00xO027kc2XyrC0,674
|
33
|
+
batFramework/utils.py,sha256=iTi_Q-hD4sHU_X4Y0rPtLCfTX7s9BINpQr9hkKBIEMc,12560
|
34
|
+
batFramework/gui/__init__.py,sha256=NjoYQJNSgM8i25P3EF1_nQJhua7XTabAAyBvE5i99Ec,959
|
35
|
+
batFramework/gui/animatedLabel.py,sha256=j-a3yYJQjPwQt-SsEW8ZS3lPCTOzFZ-1xoUoViWVNLY,3242
|
36
|
+
batFramework/gui/button.py,sha256=0v3UawFDlMxH_Lk4JHPcpujrXX2lfT8yxLMffFtEjyM,581
|
37
|
+
batFramework/gui/clickableWidget.py,sha256=Kd8E0YL-BQVykCXDqBIhv9moVeMrOJDQAYBYrg2GZVU,8510
|
38
|
+
batFramework/gui/collapseContainer.py,sha256=pHJhRytbkIxClv030pw5rk9eymyPvLYFuLOSy2EKzzg,3682
|
39
|
+
batFramework/gui/container.py,sha256=9Ms4DxhC2A9PDLvMNNawT91EM_04meguX2q1tO_1K40,7552
|
40
|
+
batFramework/gui/debugger.py,sha256=Rw9GqhzKnEQJssu6VxQ24ywdfNw_6ZABkWfD5DsnbVk,3981
|
41
|
+
batFramework/gui/draggableWidget.py,sha256=9YXea9rhzzaPhxwXK_-J5POjMp4aOF2fw4n55QwUhaM,2428
|
42
|
+
batFramework/gui/image.py,sha256=4wuFSUR21916qPK-zUTjB6u8xQS2QROHADY5lLb2tyg,1889
|
43
|
+
batFramework/gui/indicator.py,sha256=n4JcDgKfvj6KGpP1rWajTdKRx37_QAeijKNywplaRo4,3331
|
44
|
+
batFramework/gui/interactiveWidget.py,sha256=xZ4-lRPtplS0GpQtV1pnZwzUCrJtKE9WxA04o82u15M,8703
|
45
|
+
batFramework/gui/label.py,sha256=8AHHKqireGuD0OmPFQkqAotI-7NvDbeS6Wjd2HifgBg,4789
|
46
|
+
batFramework/gui/layout.py,sha256=kYTq4AQYXHzsdHXjOKdigGSiwByjMb4-FcaGv-ny2rY,18778
|
47
|
+
batFramework/gui/meter.py,sha256=faJzZ_U-_bb54_7CF8zSNlzZj4fiKMNpEhRzkw7E_cE,5905
|
48
|
+
batFramework/gui/radioButton.py,sha256=LEjhU8YVuTGJhaLMJQSyorp-GU6qmLfEUCjhJhTe4zw,1619
|
49
|
+
batFramework/gui/root.py,sha256=YPpPEj36Z6OfrY3PdYkXZ7flhkHK6VZiPAGxMddnmvY,7538
|
50
|
+
batFramework/gui/scrollingContainer.py,sha256=JiMg9GgXaWt6yIZTs--9hOeI-obQfxzua8CjB7tTMas,9536
|
51
|
+
batFramework/gui/selector.py,sha256=sYn9NVb-qmZCW15TsjYcryaarGrRQiPOoAJynMN0xr4,8532
|
52
|
+
batFramework/gui/shape.py,sha256=grjH3huNQTamvA2T9vaIZYBqfGRKMRYf1efYUo4K-eo,10305
|
53
|
+
batFramework/gui/slider.py,sha256=kctCLYYj2gyrn7ia_f-rY5tlwNU3H5I35cjy0Q62IWw,14116
|
54
|
+
batFramework/gui/style.py,sha256=o0o2KrXsqvXFCJbMIra_d9ilvzJDUJsaoF7k9pRCxNo,141
|
55
|
+
batFramework/gui/styleManager.py,sha256=bwd7XL4TaILXdmcOTVKuoyKb9MWC15k9iXMRziYxik8,1505
|
56
|
+
batFramework/gui/syncedVar.py,sha256=xKctuuVdPcz--yy242W-JHnsLFyyo5k5zWFA2adYdgY,1445
|
57
|
+
batFramework/gui/textInput.py,sha256=hLmU2nMQB_tfgnysCxQMLy-3o42UHi9KEv1Qx3fqGeA,13245
|
58
|
+
batFramework/gui/textWidget.py,sha256=UYI_UIQFA3ZR95czHR0j-8snE-F_oIbHll2y5pW960s,10131
|
59
|
+
batFramework/gui/toggle.py,sha256=OnAPxNhH3mWxmof2hTCCjAA_v4nohZCsJUNqdVu49sc,5244
|
60
|
+
batFramework/gui/tooltip.py,sha256=v1i01iisabJaneD0m_W5qYaAuAMUl59yWdOFwuXxaw4,1089
|
61
|
+
batFramework/gui/widget.py,sha256=KsVT1-vEWGoGRet6q1eKlVlK-Y8hn-0M8Vdn9gNqCN4,19617
|
62
|
+
batFramework/gui/constraints/__init__.py,sha256=ODeCtbhv-TJMuepP9OW46Su_NBOEN6mdmT9tVASuD_0,27
|
63
|
+
batFramework/gui/constraints/constraints.py,sha256=c2gDkjfP02EXwyO8JQiSYl64aHPK2wDQtjnea8wFE6s,35745
|
64
|
+
batFramework/templates/__init__.py,sha256=0C_SzDmslATebvovJ6geQHjs_4YFRPJOoZb7eiSOrBc,51
|
65
|
+
batFramework/templates/character.py,sha256=gOCUV0mx-H3uJvpIkw-6-iuoVM6t5O8zi9GZs_ZmOL0,374
|
66
|
+
batFramework/templates/controller.py,sha256=6x2t5fNRIH_m_vcmLi-aNy25toCgSmV8JR9GkzqBWlQ,5305
|
67
|
+
batFramework/templates/stateMachine.py,sha256=xod52HElH9VsdqKc-AxR9zUfQyeg-Jtn7JFuBVCFFZM,1370
|
68
|
+
batframework-2.0.0a1.dist-info/LICENSE,sha256=54j0O9xfOFxLDp_G60NM1FYbaB8jXK9sO1E70QX7Nnk,1093
|
69
|
+
batframework-2.0.0a1.dist-info/METADATA,sha256=S86uZaa6dVDeJxfOPfYinQC7i03PEvy45qj1cuKz6zs,2714
|
70
|
+
batframework-2.0.0a1.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
71
|
+
batframework-2.0.0a1.dist-info/top_level.txt,sha256=vxAKBIk1oparFTxeXGBrgfIO7iq_YR5Fv1JvPVAIwmA,13
|
72
|
+
batframework-2.0.0a1.dist-info/RECORD,,
|