e2D 1.4.16__py3-none-any.whl → 1.4.17__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.
e2D/envs.py CHANGED
@@ -59,7 +59,7 @@ class RootEnv:
59
59
  self.current_frame = 0
60
60
  self.show_fps = show_fps
61
61
  self.events :list[pg.event.Event]= []
62
- self.background_color = Color.black()
62
+ self.background_color = BLACK_COLOR_PYG
63
63
  self.clear_screen_each_frame = clear_screen_each_frame
64
64
  self.utils :dict[int|str, Util]= {}
65
65
  self.selected_util :Util|None = None
@@ -115,7 +115,7 @@ class RootEnv:
115
115
  self.env = sub_env
116
116
 
117
117
  def clear(self) -> None:
118
- self.screen.fill(self.background_color())
118
+ self.screen.fill(self.background_color)
119
119
 
120
120
  def clear_rect(self, position:Vector2D, size:Vector2D) -> None:
121
121
  self.screen.fill(self.background_color, position() + size())
@@ -123,25 +123,25 @@ class RootEnv:
123
123
  def print(self,
124
124
  text : str,
125
125
  position : Vector2D,
126
- color : Color = Color.white(),
126
+ color : pg.color.Color = WHITE_COLOR_PYG,
127
127
  pivot_position : __LITERAL_PIVOT_POSITIONS__ = "top_left",
128
128
  font : pg.font.Font = FONT_ARIAL_32,
129
- bg_color : None|Color = None,
130
- border_color : Color = Color.white(),
129
+ bg_color : None|pg.color.Color = None,
130
+ border_color : pg.color.Color = WHITE_COLOR_PYG,
131
131
  border_width : float = 0.0,
132
132
  border_radius : int|list[int]|tuple[int,int,int,int] = -1,
133
133
  margin : Vector2D = Vector2D.zero(),
134
134
  personalized_surface : pg.Surface|None = None
135
135
  ) -> None:
136
- text_box = font.render(text, True, color())
136
+ text_box = font.render(text, True, color)
137
137
  size = Vector2D(*text_box.get_size()) + margin * 2
138
138
  pivotted_position = position - size * __PIVOT_POSITIONS_MULTIPLIER__[pivot_position] + margin
139
139
  if not any(isinstance(border_radius, cls) for cls in {tuple, list}): border_radius = [border_radius]*4
140
140
  surface = (self.screen if personalized_surface == None else personalized_surface)
141
141
  if bg_color != None:
142
- pg.draw.rect(surface, bg_color(), (pivotted_position - margin)() + size(), 0, -1, *border_radius)
142
+ pg.draw.rect(surface, bg_color, (pivotted_position - margin)() + size(), 0, -1, *border_radius)
143
143
  if border_width:
144
- pg.draw.rect(surface, border_color(), (pivotted_position - margin)() + size(), border_width, -1, *border_radius)
144
+ pg.draw.rect(surface, border_color, (pivotted_position - margin)() + size(), border_width, -1, *border_radius)
145
145
  surface.blit(text_box, pivotted_position())
146
146
 
147
147
  def __draw__(self) -> None:
@@ -152,7 +152,7 @@ class RootEnv:
152
152
  self.env.draw()
153
153
  for util in self.utils.values(): util.draw()
154
154
 
155
- if self.show_fps: self.print(str(round(self.current_fps,2)), self.screen_size * .01, bg_color=Color.black())
155
+ if self.show_fps: self.print(str(round(self.current_fps,2)), self.screen_size * .01, bg_color=BLACK_COLOR_PYG)
156
156
  pg.display.flip()
157
157
 
158
158
  def __update__(self) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: e2D
3
- Version: 1.4.16
3
+ Version: 1.4.17
4
4
  Summary: Python library for 2D games. Streamlines dev with keyboard/mouse input, vector calculations, color manipulation, and collision detection. Simplify game creation and unleash creativity!
5
5
  Home-page: https://github.com/marick-py/e2D
6
6
  Author: Riccardo Mariani
@@ -0,0 +1,13 @@
1
+ e2D/__init__.py,sha256=kY54r5Hv_5wFZ2xu_Fn1iIzew4hDm8Xnm7Sx7KZh4zw,23099
2
+ e2D/__init__.pyi,sha256=YgNYO9ungr1qqVnzQZe14v7_zt7jZ4lWtc5rBsA8TYY,48092
3
+ e2D/colors.py,sha256=7EXlRWmK-ie5XrEtpRAj3_TZ61AVGope2RTFRkEhyZ4,20396
4
+ e2D/def_colors.py,sha256=3sJq2L6qFZ3svn2qEWIx0SinNXjb9huNaFigDeJipm8,43805
5
+ e2D/envs.py,sha256=W2Yj-vPit_l8wKq6yPAT_gOrx9NBC-qy9cc0bCaN9C4,6342
6
+ e2D/plots.py,sha256=MTvIeQl_9ASDW7QUd6fgrL2IDK-5NFtiXsm7rhFKdNs,36078
7
+ e2D/utils.py,sha256=cJarYc6OTIdud7AJZHxwOhxMcEJLlgfKu60kkBu4hB8,14116
8
+ e2D/winrec.py,sha256=EFFfWYbk27NhS-rWD-BLChXvLjFW1uYZ5LkRGMj_Xo0,1116
9
+ e2D-1.4.17.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
10
+ e2D-1.4.17.dist-info/METADATA,sha256=tCqqaOzNTZgLg95iJf9ejt510YB0XMCmiycwYVdRejc,9611
11
+ e2D-1.4.17.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
12
+ e2D-1.4.17.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
13
+ e2D-1.4.17.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- e2D/__init__.py,sha256=CtupqrGE_LUp310YGk4EqHuOlWe-nSAikc4uhzKiCME,23014
2
- e2D/__init__.pyi,sha256=rMceBt26-bozw_Xt3JQWfQ_20G8RAkE2j4CqIf7PIuQ,48013
3
- e2D/colors.py,sha256=2pMvI6n6l1fsxmXywlhO3gZSkpegmMT4lQL51Nu_hNI,20319
4
- e2D/envs.py,sha256=W8SC30_U5SaYFld9DcdG-_jgzbqX366S4OoMSgU_Pbc,6316
5
- e2D/plots.py,sha256=MTvIeQl_9ASDW7QUd6fgrL2IDK-5NFtiXsm7rhFKdNs,36078
6
- e2D/utils.py,sha256=cJarYc6OTIdud7AJZHxwOhxMcEJLlgfKu60kkBu4hB8,14116
7
- e2D/winrec.py,sha256=EFFfWYbk27NhS-rWD-BLChXvLjFW1uYZ5LkRGMj_Xo0,1116
8
- e2D-1.4.16.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
9
- e2D-1.4.16.dist-info/METADATA,sha256=wKb-TFAUr-oT2WEY1kgJIWojQQCFs1fQwyahjQDyng4,9611
10
- e2D-1.4.16.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
11
- e2D-1.4.16.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
12
- e2D-1.4.16.dist-info/RECORD,,
File without changes
File without changes