batframework 1.0.10__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.
Files changed (81) hide show
  1. batFramework/__init__.py +83 -52
  2. batFramework/action.py +280 -252
  3. batFramework/actionContainer.py +105 -38
  4. batFramework/animatedSprite.py +81 -117
  5. batFramework/animation.py +91 -0
  6. batFramework/audioManager.py +156 -85
  7. batFramework/baseScene.py +249 -0
  8. batFramework/camera.py +245 -123
  9. batFramework/constants.py +57 -75
  10. batFramework/cutscene.py +239 -119
  11. batFramework/cutsceneManager.py +34 -0
  12. batFramework/drawable.py +107 -0
  13. batFramework/dynamicEntity.py +30 -23
  14. batFramework/easingController.py +58 -0
  15. batFramework/entity.py +130 -123
  16. batFramework/enums.py +171 -0
  17. batFramework/fontManager.py +65 -0
  18. batFramework/gui/__init__.py +28 -14
  19. batFramework/gui/animatedLabel.py +90 -0
  20. batFramework/gui/button.py +18 -84
  21. batFramework/gui/clickableWidget.py +244 -0
  22. batFramework/gui/collapseContainer.py +98 -0
  23. batFramework/gui/constraints/__init__.py +1 -0
  24. batFramework/gui/constraints/constraints.py +1066 -0
  25. batFramework/gui/container.py +220 -49
  26. batFramework/gui/debugger.py +140 -47
  27. batFramework/gui/draggableWidget.py +63 -0
  28. batFramework/gui/image.py +61 -23
  29. batFramework/gui/indicator.py +116 -40
  30. batFramework/gui/interactiveWidget.py +243 -22
  31. batFramework/gui/label.py +147 -110
  32. batFramework/gui/layout.py +442 -81
  33. batFramework/gui/meter.py +155 -0
  34. batFramework/gui/radioButton.py +43 -0
  35. batFramework/gui/root.py +228 -60
  36. batFramework/gui/scrollingContainer.py +282 -0
  37. batFramework/gui/selector.py +232 -0
  38. batFramework/gui/shape.py +286 -86
  39. batFramework/gui/slider.py +353 -0
  40. batFramework/gui/style.py +10 -0
  41. batFramework/gui/styleManager.py +49 -0
  42. batFramework/gui/syncedVar.py +43 -0
  43. batFramework/gui/textInput.py +331 -0
  44. batFramework/gui/textWidget.py +308 -0
  45. batFramework/gui/toggle.py +140 -62
  46. batFramework/gui/tooltip.py +35 -0
  47. batFramework/gui/widget.py +546 -307
  48. batFramework/manager.py +131 -50
  49. batFramework/particle.py +118 -0
  50. batFramework/propertyEaser.py +79 -0
  51. batFramework/renderGroup.py +34 -0
  52. batFramework/resourceManager.py +130 -0
  53. batFramework/scene.py +31 -226
  54. batFramework/sceneLayer.py +134 -0
  55. batFramework/sceneManager.py +200 -165
  56. batFramework/scrollingSprite.py +115 -0
  57. batFramework/sprite.py +46 -0
  58. batFramework/stateMachine.py +49 -51
  59. batFramework/templates/__init__.py +2 -0
  60. batFramework/templates/character.py +15 -0
  61. batFramework/templates/controller.py +158 -0
  62. batFramework/templates/stateMachine.py +39 -0
  63. batFramework/tileset.py +46 -0
  64. batFramework/timeManager.py +213 -0
  65. batFramework/transition.py +162 -157
  66. batFramework/triggerZone.py +22 -22
  67. batFramework/utils.py +306 -184
  68. {batframework-1.0.10.dist-info → batframework-2.0.0a1.dist-info}/LICENSE +20 -20
  69. {batframework-1.0.10.dist-info → batframework-2.0.0a1.dist-info}/METADATA +2 -2
  70. batframework-2.0.0a1.dist-info/RECORD +72 -0
  71. batFramework/cutsceneBlocks.py +0 -176
  72. batFramework/debugger.py +0 -48
  73. batFramework/easing.py +0 -71
  74. batFramework/gui/constraints.py +0 -204
  75. batFramework/gui/frame.py +0 -19
  76. batFramework/particles.py +0 -77
  77. batFramework/time.py +0 -75
  78. batFramework/transitionManager.py +0 -0
  79. batframework-1.0.10.dist-info/RECORD +0 -43
  80. {batframework-1.0.10.dist-info → batframework-2.0.0a1.dist-info}/WHEEL +0 -0
  81. {batframework-1.0.10.dist-info → batframework-2.0.0a1.dist-info}/top_level.txt +0 -0
batFramework/camera.py CHANGED
@@ -1,123 +1,245 @@
1
- import batFramework as bf
2
- import pygame
3
- from pygame.math import Vector2
4
-
5
-
6
- class Camera:
7
- def __init__(self, flags=0) -> None:
8
- self.rect = pygame.FRect(0, 0, *bf.const.RESOLUTION)
9
- self.flags: int = flags
10
- # self.blit_special_flags : int =pygame.BLEND_PREMULTIPLIED if (flags & pygame.SRCALPHA) else 0
11
- self.blit_special_flags: int = pygame.BLEND_ALPHA_SDL2
12
- self._clear_color : pygame.Color = pygame.Color(0, 0, 0, 0)
13
- self.zoom_factor = 1
14
- self.cached_surfaces: dict[float, pygame.Surface] = {}
15
- self.surface: pygame.Surface = pygame.Surface((0,0))
16
- self.follow_point_func = None
17
- self.max_zoom = 2
18
- self.min_zoom = 0.1
19
- self.zoom(1)
20
-
21
- def set_clear_color(self, color: pygame.Color|tuple):
22
- if not isinstance(color,pygame.Color):
23
- color = pygame.Color(color)
24
- self._clear_color = color
25
-
26
- def set_max_zoom(self,value:float):
27
- self.max_zoom = value
28
-
29
- def set_min_zoom(self,value:float):
30
- self.min_zoom = value
31
-
32
- def clear(self):
33
- """
34
- Clear the camera surface with the set clear color
35
- (default is tranparent)
36
- """
37
- self.surface.fill(self._clear_color)
38
-
39
- def get_center(self):
40
- return self.rect.center
41
-
42
-
43
-
44
- def move(self, x, y):
45
- """
46
- Moves the camera rect by the given coordinates (+=)
47
- """
48
- self.rect.topleft += Vector2(x, y)
49
-
50
- def set_position(self, x, y):
51
- """
52
- Set the camera rect topleft position
53
- """
54
- self.rect.topleft = (x, y)
55
-
56
- def set_center(self, x, y):
57
- """
58
- Set the camera rect center position
59
- """
60
- self.rect.center = (x, y)
61
-
62
- def set_follow_dynamic_point(self, func):
63
- """
64
- Set the following function (returns tuple x y)
65
- (camera will center its position to the center of the given coordinates)
66
- """
67
- self.follow_point_func = func
68
-
69
- def zoom_by(self, amount:float):
70
- self.zoom(self.zoom_factor + amount)
71
-
72
- def zoom(self, factor):
73
- if factor <self.min_zoom:
74
- return
75
- if factor > self.max_zoom:
76
- return
77
- factor = round(factor,2)
78
- self.zoom_factor = factor
79
- if factor not in self.cached_surfaces:
80
- # if factor != 1 : print("creating new surface in cache : ",tuple(i * factor for i in const.RESOLUTION), self.flags)
81
- self.cached_surfaces[factor] = pygame.Surface(
82
- tuple(i / factor for i in bf.const.RESOLUTION), flags=self.flags
83
- ).convert_alpha()
84
- # c = self.surface.get_colorkey() if self.surface else None
85
- # if c : self.cached_surfaces[factor].set_colorkey(c)
86
- self.cached_surfaces[factor].fill((0, 0, 0, 0))
87
-
88
- self.surface = self.cached_surfaces[self.zoom_factor]
89
- self.rect = self.surface.get_frect(center=self.rect.center)
90
- # if factor != 1 : print(self.cached_surfaces)
91
-
92
- def intersects(self, rect: pygame.Rect | pygame.FRect) -> bool:
93
- return (
94
- self.rect.x < rect.right
95
- and self.rect.right > rect.x
96
- and self.rect.y < rect.bottom
97
- and self.rect.bottom > rect.y
98
- )
99
-
100
-
101
- def transpose(self, rect: pygame.Rect | pygame.FRect) -> pygame.Rect | pygame.FRect:
102
- x, y = round(rect.x - self.rect.left), round(rect.y - self.rect.top)
103
- return pygame.Rect(x, y, *rect.size)
104
-
105
- def convert_screen_to_world(self, x, y):
106
- return x / self.zoom_factor + self.rect.x, y / self.zoom_factor + self.rect.y
107
-
108
- def update(self, dt):
109
- if self.follow_point_func:
110
- target = self.follow_point_func()
111
- self.rect.center = Vector2(self.rect.center).lerp(target, ((dt * 60) * 0.1))
112
-
113
- def draw(self, surface: pygame.Surface):
114
- # pygame.draw.circle(surface,bf.color.ORANGE,self.surface.get_rect().center,4)
115
- if self.zoom_factor == 1:
116
- surface.blit(self.surface, (0, 0), special_flags=self.blit_special_flags)
117
- return
118
- # print("From",self.surface,"Target RESOLUTION",const.RESOLUTION,"Destination",surface)
119
- surface.blit(
120
- pygame.transform.scale(self.surface, bf.const.RESOLUTION),
121
- (0, 0),
122
- special_flags=self.blit_special_flags,
123
- )
1
+ import pygame
2
+ from pygame.math import Vector2
3
+ import batFramework as bf
4
+ from typing import Self
5
+ import math
6
+
7
+
8
+ class Camera:
9
+ def __init__(
10
+ self, flags=0, size: tuple[int, int] | None = None, convert_alpha: bool = False,fullscreen:bool=True
11
+ ) -> None:
12
+ self.cached_surfaces: dict[tuple[int, int], pygame.Surface] = {}
13
+ self.fullscreen : bool = fullscreen # auto fill the screen (i.e react to VIDEORESIZE event)
14
+ self.flags: int = flags | (pygame.SRCALPHA if convert_alpha else 0)
15
+ self.blit_special_flags: int = pygame.BLEND_ALPHA_SDL2
16
+
17
+ size = size if size else bf.const.RESOLUTION
18
+ self.rect = pygame.FRect(0, 0, *size)
19
+ self.transform_target_surface : pygame.Surface = pygame.Surface(self.rect.size,self.flags)
20
+ self.should_convert_alpha: bool = convert_alpha
21
+ self.world_rect = pygame.FRect(0, 0, *self.rect.size)
22
+
23
+ self.vector_center = Vector2(0, 0)
24
+ self.rotation = 0.0 # Rotation in degrees
25
+
26
+ self.surface: pygame.Surface = pygame.Surface((0, 0)) # dynamic : create new at each new zoom value
27
+
28
+ self._clear_color: pygame.typing.ColorLike = pygame.Color(0, 0, 0, 0) if convert_alpha else pygame.Color(0, 0, 0)
29
+
30
+ self.follow_point_func = None
31
+ self.damping = float("inf")
32
+ self.dead_zone_radius = 10
33
+
34
+ self.zoom_factor = 1
35
+ self.max_zoom = 2
36
+ self.min_zoom = 0.1
37
+ self.zoom(1,force=True)
38
+
39
+ def get_mouse_pos(self) -> tuple[float, float]:
40
+ return self.screen_to_world(pygame.mouse.get_pos())
41
+
42
+ def set_clear_color(self, color: pygame.Color | tuple | str) -> Self:
43
+ self._clear_color = color
44
+ return self
45
+
46
+ def set_max_zoom(self, value: float) -> Self:
47
+ self.max_zoom = value
48
+ return self
49
+
50
+ def set_min_zoom(self, value: float) -> Self:
51
+ self.min_zoom = value
52
+ return self
53
+
54
+ def set_rotation(self, angle: float) -> Self:
55
+ """
56
+ Set the camera rotation in degrees.
57
+ """
58
+ self.rotation = angle % 360
59
+ return self
60
+
61
+ def rotate_by(self,angle:float)->Self:
62
+ """
63
+ Increment rotation by given angle in degrees.
64
+ """
65
+ self.rotation+=angle
66
+ self.rotation%=360
67
+ return self
68
+
69
+ def clear(self) -> None:
70
+ if self._clear_color is None:
71
+ return
72
+ self.surface.fill(self._clear_color)
73
+
74
+ def get_center(self) -> tuple[float, float]:
75
+ return self.world_rect.center
76
+
77
+ def get_position(self) -> tuple[float, float]:
78
+ return self.world_rect.topleft
79
+
80
+ def move_by(self, x: float | int, y: float | int) -> Self:
81
+ # self.world_rect.move_ip(x, y)
82
+ self.world_rect.x += x
83
+ self.world_rect.y += y
84
+ return self
85
+
86
+ def set_position(self, x, y) -> Self:
87
+ self.world_rect.topleft = (x, y)
88
+ return self
89
+
90
+ def set_center(self, x, y) -> Self:
91
+ self.world_rect.center = (x, y)
92
+ return self
93
+
94
+ def set_follow_point_func(self, func) -> Self:
95
+ self.follow_point_func = func
96
+ return self
97
+
98
+ def set_follow_speed(self, speed: float) -> Self:
99
+ self.follow_speed = speed
100
+ return self
101
+
102
+ def set_follow_damping(self, damping: float) -> Self:
103
+ self.damping = damping
104
+ return self
105
+
106
+ def set_dead_zone_radius(self, radius: float) -> Self:
107
+ self.dead_zone_radius = radius
108
+ return self
109
+
110
+ def zoom_by(self, amount: float) -> Self:
111
+ return self.zoom(self.zoom_factor + amount)
112
+
113
+ def zoom(self, factor: float,force:bool=False) -> Self:
114
+ clamped = max(self.min_zoom, min(self.max_zoom, round(factor, 2)))
115
+ if clamped == self.zoom_factor and not force:
116
+ return self
117
+
118
+ self.zoom_factor = clamped
119
+ new_res = tuple([round((i / clamped) / 2) * 2 for i in self.rect.size])
120
+
121
+ if self.surface.get_size() != new_res:
122
+ self.surface = self._get_cached_surface((new_res[0],new_res[1]))
123
+
124
+ self.world_rect = self.surface.get_frect(center=self.world_rect.center)
125
+ self.clear()
126
+ return self
127
+
128
+ def _free_cache(self):
129
+ self.cached_surfaces.clear()
130
+
131
+ def _get_cached_surface(self, new_size: tuple[int, int]):
132
+ surface = self.cached_surfaces.get(new_size)
133
+ if surface is None:
134
+ surface = pygame.Surface(new_size, flags=self.flags)
135
+ # if self.flags & pygame.SRCALPHA:
136
+ # surface = surface.convert_alpha()
137
+ self.cached_surfaces[new_size] = surface
138
+ return surface
139
+
140
+ def set_size(self, size: tuple[int, int] | None = None) -> Self:
141
+ if size is None:
142
+ size = bf.const.RESOLUTION
143
+ center = self.rect.center
144
+ self.rect.size = size
145
+ self.rect.center = center
146
+ self.transform_target_surface = pygame.Surface(self.rect.size,self.flags)
147
+ self.world_rect.center = (size[0] / 2, size[1] / 2)
148
+ self.zoom(self.zoom_factor)
149
+ return self
150
+
151
+ def intersects(self, rect: pygame.Rect | pygame.FRect) -> bool:
152
+ return self.world_rect.colliderect(rect)
153
+
154
+ def world_to_screen(self, rect: pygame.Rect | pygame.FRect) -> pygame.FRect:
155
+ return pygame.FRect(
156
+ (rect[0] - self.world_rect.left), (rect[1] - self.world_rect.top), rect[2], rect[3]
157
+ )
158
+
159
+ def world_to_screen_scaled(self, rect: pygame.Rect | pygame.FRect) -> pygame.FRect:
160
+ screen_rect = self.world_to_screen(rect)
161
+ return pygame.FRect(
162
+ screen_rect.x * self.zoom_factor,
163
+ screen_rect.y * self.zoom_factor,
164
+ screen_rect.w * self.zoom_factor,
165
+ screen_rect.h * self.zoom_factor,
166
+ )
167
+
168
+ def world_to_screen_point(self, point: tuple[float, float] | tuple[int, int]) -> tuple[float, float]:
169
+ return (
170
+ (point[0] - self.world_rect.x),
171
+ (point[1] - self.world_rect.y),
172
+ )
173
+
174
+ def world_to_screen_point_scaled(self, point: tuple[float, float] | tuple[int, int]) -> tuple[float, float]:
175
+ return (
176
+ (point[0] - self.world_rect.x) * self.zoom_factor,
177
+ (point[1] - self.world_rect.y) * self.zoom_factor,
178
+ )
179
+
180
+
181
+ def screen_to_world(self, point: tuple[float, float] | tuple[int, int]) -> tuple[float, float]:
182
+ """
183
+ roates, scales and translates point to world coordinates
184
+
185
+ """
186
+ # Center of the screen (zoomed+rotated surface)
187
+ cx, cy = self.rect.w / 2, self.rect.h / 2
188
+
189
+ # Offset from center
190
+ dx, dy = point[0] - cx, point[1] - cy
191
+
192
+ # rotate that offset
193
+ if self.rotation != 0:
194
+ angle_rad = math.radians(self.rotation)
195
+ cos_a = math.cos(angle_rad)
196
+ sin_a = math.sin(angle_rad)
197
+ dx, dy = cos_a * dx - sin_a * dy, sin_a * dx + cos_a * dy
198
+
199
+ # Un-zoom and add camera position
200
+ wx = (dx + cx) / self.zoom_factor + self.world_rect.x
201
+ wy = (dy + cy) / self.zoom_factor + self.world_rect.y
202
+ return wx, wy
203
+
204
+
205
+ def update(self, dt: float):
206
+ if not self.follow_point_func or not (math.isfinite(dt) and dt > 0):
207
+ return
208
+
209
+ target = Vector2(self.follow_point_func())
210
+ self.vector_center.xy.update(self.world_rect.center)
211
+
212
+ if self.damping == float("inf"):
213
+ self.vector_center.xy = target.xy
214
+ elif math.isfinite(self.damping) and self.damping > 0:
215
+ damping_factor = 1 - math.exp(-self.damping * dt)
216
+ if not math.isnan(damping_factor):
217
+ diff = target - self.vector_center
218
+ self.vector_center += diff * damping_factor
219
+
220
+ self.world_rect.center = self.vector_center
221
+
222
+
223
+ def draw(self, surface: pygame.Surface):
224
+ """
225
+ Draw the camera view onto the provided surface with proper scaling and rotation.
226
+
227
+ Args:
228
+ surface (pygame.Surface): Surface to draw the camera view onto.
229
+ """
230
+ # Scale the camera surface to the target size
231
+ if self.zoom_factor == 1 and self.rotation == 0:
232
+ surface.blit(self.surface, (0, 0), special_flags=self.blit_special_flags)
233
+ return
234
+
235
+ pygame.transform.scale(self.surface, self.rect.size, self.transform_target_surface)
236
+
237
+ result_surface = self.transform_target_surface
238
+
239
+ if self.rotation != 0:
240
+ # Rotate around the center of the target surface
241
+ rotated_surface = pygame.transform.rotate(result_surface, self.rotation)
242
+ rect = rotated_surface.get_rect(center=(self.rect.w // 2, self.rect.h // 2))
243
+ surface.blit(rotated_surface, rect.topleft, special_flags=self.blit_special_flags)
244
+ else:
245
+ surface.blit(result_surface, (0, 0), special_flags=self.blit_special_flags)
batFramework/constants.py CHANGED
@@ -1,75 +1,57 @@
1
- import pygame
2
- from enum import Enum
3
-
4
-
5
- class Constants:
6
- SCREEN = None
7
- RESOLUTION: tuple[int, int] = (1280,720)
8
- VSYNC = 0
9
- FLAGS: int = pygame.SCALED | pygame.RESIZABLE
10
- FPS: int = 60
11
- RESOURCE_PATH = "."
12
-
13
- @staticmethod
14
- def init_screen(resolution:tuple[int,int],flags:int= 0, vsync:int= 0):
15
- Constants.RESOLUTION = resolution
16
- Constants.FLAGS = flags
17
- Constants.VSYNC = vsync
18
- Constants.SCREEN = pygame.display.set_mode(Constants.RESOLUTION, Constants.FLAGS,vsync=Constants.VSYNC)
19
- print(f"Window : {resolution[0]}x{resolution[1]}px | flags:{flags.bit_count()}, vsync:{pygame.display.is_vsync()}")
20
- MUSIC_END_EVENT = pygame.event.custom_type()
21
-
22
- # ------------GUI SPECIFIC
23
- DEFAULT_TEXT_SIZE: int = 8
24
-
25
- GUI_SCALE: int = 1
26
- # ---------------------
27
-
28
- @staticmethod
29
- def set_resolution(resolution : tuple[int,int]):
30
- Constants.RESOLUTION = resolution
31
-
32
- @staticmethod
33
- def set_resource_path(path: str):
34
- print("set resource path :", path)
35
- Constants.RESOURCE_PATH = path
36
-
37
- @staticmethod
38
- def set_fps_limit(value: int):
39
- Constants.FPS = value
40
- print("FPS limit to : ", value)
41
-
42
- @staticmethod
43
- def set_gui_scale(value: int):
44
- Constants.GUI_SCALE = value
45
- print("GUI_SCALE to : ", value)
46
-
47
- @staticmethod
48
- def set_default_text_size(size:int):
49
- Constants.DEFAULT_TEXT_SIZE = size
50
-
51
- class Colors:
52
- LIGHT_CYAN = (179, 229, 252)
53
- WASHED_BLUE = (52, 73, 94)
54
- RIVER_BLUE = (52, 152, 219)
55
- DARK_INDIGO = (40, 53, 147)
56
- LIGHT_BLUE = (3, 169, 244)
57
- DEEP_BLUE = (41, 121, 255)
58
- DARK_BLUE = (44, 62, 80)
59
- GREEN = (67, 160, 71)
60
- DARK_GREEN = (39, 174, 96)
61
- BROWN = (109, 76, 65)
62
- DARK_RED = (192, 57, 43)
63
- ORANGE = (251, 140, 0)
64
- CLOUD_WHITE = (236, 240, 241)
65
- SILVER = (189, 195, 199)
66
- DARK_GRAY = (66, 66, 66)
67
-
68
- DARK_GB = (27, 42, 9)
69
- SHADE_GB = (14, 69, 11)
70
- BASE_GB = (73, 107, 34)
71
- LIGHT_GB = (154, 158, 63)
72
-
73
- class Axis(Enum):
74
- HORIZONTAL = 1
75
- VERTICAL = 2
1
+ import pygame
2
+
3
+
4
+ class Constants:
5
+ SCREEN: pygame.Surface = None
6
+ RESOLUTION: tuple[int, int] = (1280, 720)
7
+ WIDTH = 1280
8
+ HEIGHT = 720
9
+ VSYNC = 0
10
+ FLAGS: int = pygame.SCALED | pygame.RESIZABLE
11
+ FPS: int = 60
12
+ MUSIC_END_EVENT = pygame.event.custom_type()
13
+
14
+ DEFAULT_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
15
+ DEFAULT_HOVER_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
16
+ DEFAULT_CLICK_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
17
+
18
+ BF_INITIALIZED: bool = False
19
+ ALLOW_DEBUG : bool = True
20
+
21
+ WIDGET_KEY_REPEAT_DELAY = 200
22
+ WIDGET_KEY_REPEAT_INTERVAL = 50
23
+ GLOBAL_KEY_REPEAT_DELAY = 200
24
+ GLOBAL_KEY_REPEAT_INTERVAL = 50
25
+
26
+
27
+ @staticmethod
28
+ def set_allow_debug(allow_debug:bool):
29
+ Constants.ALLOW_DEBUG = allow_debug
30
+
31
+ @staticmethod
32
+ def set_resolution(resolution: tuple[int, int]):
33
+ Constants.RESOLUTION = resolution
34
+ Constants.WIDTH = resolution[0]
35
+ Constants.HEIGHT = resolution[1]
36
+ Constants.update_screen()
37
+
38
+ @staticmethod
39
+ def update_screen():
40
+ if Constants.BF_INITIALIZED:
41
+ Constants.SCREEN = pygame.display.set_mode(Constants.RESOLUTION,Constants.FLAGS,vsync=Constants.VSYNC)
42
+
43
+ @staticmethod
44
+ def set_default_cursor(cursor: pygame.Cursor):
45
+ Constants.DEFAULT_CURSOR = cursor
46
+
47
+ @staticmethod
48
+ def set_default_hover_cursor(cursor: pygame.Cursor):
49
+ Constants.DEFAULT_HOVER_CURSOR = cursor
50
+
51
+ @staticmethod
52
+ def set_default_click_cursor(cursor: pygame.Cursor):
53
+ Constants.DEFAULT_CLICK_CURSOR = cursor
54
+
55
+ @staticmethod
56
+ def set_fps_limit(value: int):
57
+ Constants.FPS = value