e2D 1.4.11__py3-none-any.whl → 1.4.12__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/utils.py CHANGED
@@ -1,86 +1,186 @@
1
1
  from __future__ import annotations
2
+ from typing import Any, Callable, Literal
2
3
  import pygame as pg
3
4
  from e2D import *
4
5
 
5
- KEY_MODE_PRESSED = 0
6
- KEY_MODE_JUST_PRESSED = 1
7
- KEY_MODE_JUST_RELEASED = 2
6
+ pg.font.init()
8
7
 
9
- SCANCODES = {"":0,"backspace":8,"tab":9,"return":13,"escape":27,"space":32,"!":33,"\"":34,"#":35,"$":36,"%":37,"&":38,"'":39,"(":40,")":41,"*":42,"+":43,",":44,"-":45,".":46,"/":47,"0":48,"1":49,"2":50,"3":51,"4":52,"5":53,"6":54,"7":55,"8":56,"9":57,":":58,";":59,"<":60,"=":61,">":62,"?":63,"@":64,"[":91,"\\":92,"]":93,"^":94,"_":95,"`":96,"a":97,"b":98,"c":99,"d":100,"e":101,"f":102,"g":103,"h":104,"i":105,"j":106,"k":107,"l":108,"m":109,"n":110,"o":111,"p":112,"q":113,"r":114,"s":115,"t":116,"u":117,"v":118,"w":119,"x":120,"y":121,"z":122,"delete":127,"caps lock":1073741881,"f1":1073741882,"f2":1073741883,"f3":1073741884,"f4":1073741885,"f5":1073741886,"f6":1073741887,"f7":1073741888,"f8":1073741889,"f9":1073741890,"f10":1073741891,"f11":1073741892,"f12":1073741893,"print screen":1073741894,"scroll lock":1073741895,"break":1073741896,"insert":1073741897,"home":1073741898,"page up":1073741899,"end":1073741901,"page down":1073741902,"right":1073741903,"left":1073741904,"down":1073741905,"up":1073741906,"numlock":1073741907,"[/]":1073741908,"[*]":1073741909,"[-]":1073741910,"[+]":1073741911,"enter":1073741912,"[1]":1073741913,"[2]":1073741914,"[3]":1073741915,"[4]":1073741916,"[5]":1073741917,"[6]":1073741918,"[7]":1073741919,"[8]":1073741920,"[9]":1073741921,"[0]":1073741922,"[.]":1073741923,"power":1073741926,"equals":1073741927,"f13":1073741928,"f14":1073741929,"f15":1073741930,"help":1073741941,"menu":1073741942,"sys req":1073741978,"clear":1073741980,"euro":1073742004,"CurrencySubUnit":1073742005,"left ctrl":1073742048,"left shift":1073742049,"left alt":1073742050,"left meta":1073742051,"right ctrl":1073742052,"right shift":1073742053,"right alt":1073742054,"right meta":1073742055,"alt gr":1073742081,"AC Back":1073742094}
10
- SCANCODES_NUMS = {SCANCODES[key]:i for i,key in enumerate(SCANCODES)}
8
+ __KEY_MODE_TYPES_DICT__ = dict(zip(["pressed", "just_pressed", "just_released"], range(3)))
9
+ __LITERAL_KEY_MODE_TYPES__ = Literal["pressed", "just_pressed", "just_released"]
10
+
11
+ __LITERAL_FONTS__ = Literal['arial', 'arialblack', 'bahnschrift', 'calibri', 'cambria', 'cambriamath', 'candara', 'comicsansms', 'consolas', 'constantia', 'corbel', 'couriernew', 'ebrima', 'franklingothicmedium', 'gabriola', 'gadugi', 'georgia', 'impact', 'inkfree', 'javanesetext', 'leelawadeeui', 'leelawadeeuisemilight', 'lucidaconsole', 'lucidasans', 'malgungothic', 'malgungothicsemilight', 'microsofthimalaya', 'microsoftjhenghei', 'microsoftjhengheiui', 'microsoftnewtailue', 'microsoftphagspa', 'microsoftsansserif', 'microsofttaile', 'microsoftyahei', 'microsoftyaheiui', 'microsoftyibaiti', 'mingliuextb', 'pmingliuextb', 'mingliuhkscsextb', 'mongolianbaiti', 'msgothic', 'msuigothic', 'mspgothic', 'mvboli', 'myanmartext', 'nirmalaui', 'nirmalauisemilight', 'palatinolinotype', 'segoemdl2assets', 'segoeprint', 'segoescript', 'segoeui', 'segoeuiblack', 'segoeuiemoji', 'segoeuihistoric', 'segoeuisemibold', 'segoeuisemilight', 'segoeuisymbol', 'simsun', 'nsimsun', 'simsunextb', 'sitkasmall', 'sitkatext', 'sitkasubheading', 'sitkaheading', 'sitkadisplay', 'sitkabanner', 'sylfaen', 'symbol', 'tahoma', 'timesnewroman', 'trebuchetms', 'verdana', 'webdings', 'wingdings', 'yugothic', 'yugothicuisemibold', 'yugothicui', 'yugothicmedium', 'yugothicuiregular', 'yugothicregular', 'yugothicuisemilight', 'holomdl2assets', 'bizudgothic', 'bizudpgothictruetype', 'bizudminchomedium', 'bizudpminchomediumtruetype', 'meiryo', 'meiryoui', 'msmincho', 'mspmincho', 'uddigikyokashonb', 'uddigikyokashonpb', 'uddigikyokashonkb', 'uddigikyokashonr', 'uddigikyokashonpr', 'uddigikyokashonkr', 'yumincho', 'lcd', 'glassgauge', 'maiandragd', 'maiandragddemi', 'newsgothic', 'quartz', 'kievitoffcpro', 'agencyfbgrassetto', 'agencyfb', 'algerian', 'bookantiquagrassetto', 'bookantiquagrassettocorsivo', 'bookantiquacorsivo', 'arialcorsivo', 'arialrounded', 'baskervilleoldface', 'bauhaus93', 'bell', 'bellgrassetto', 'bellcorsivo', 'bernardcondensed', 'bookantiqua', 'bodonigrassetto', 'bodonigrassettocorsivo', 'bodoniblackcorsivo', 'bodoniblack', 'bodonicondensedgrassetto', 'bodonicondensedgrassettocorsivo', 'bodonicondensedcorsivo', 'bodonicondensed', 'bodonicorsivo', 'bodonipostercompressed', 'bodoni', 'bookmanoldstyle', 'bookmanoldstylegrassetto', 'bookmanoldstylegrassettocorsivo', 'bookmanoldstylecorsivo', 'bradleyhanditc', 'britannic', 'berlinsansfbgrassetto', 'berlinsansfbdemigrassetto', 'berlinsansfb', 'broadway', 'brushscriptcorsivo', 'bookshelfsymbol7', 'californianfbgrassetto', 'californianfbcorsivo', 'californianfb', 'calisto', 'calistograssetto', 'calistograssettocorsivo', 'calistocorsivo', 'castellar', 'centuryschoolbook', 'centaur', 'century', 'chiller', 'colonna', 'cooperblack', 'copperplategothic', 'curlz', 'dubai', 'dubaimedium', 'dubairegular', 'elephant', 'elephantcorsivo', 'engravers', 'erasitc', 'erasdemiitc', 'erasmediumitc', 'felixtitling', 'forte', 'franklingothicbook', 'franklingothicbookcorsivo', 'franklingothicdemi', 'franklingothicdemicond', 'franklingothicdemicorsivo', 'franklingothicheavy', 'franklingothicheavycorsivo', 'franklingothicmediumcond', 'freestylescript', 'frenchscript', 'footlight', 'garamond', 'garamondgrassetto', 'garamondcorsivo', 'gigi', 'gillsansgrassettocorsivo', 'gillsansgrassetto', 'gillsanscondensed', 'gillsanscorsivo', 'gillsansultracondensed', 'gillsansultra', 'gillsans', 'gloucesterextracondensed', 'gillsansextcondensed', 'centurygothic', 'centurygothicgrassetto', 'centurygothicgrassettocorsivo', 'centurygothiccorsivo', 'goudyoldstyle', 'goudyoldstylegrassetto', 'goudyoldstylecorsivo', 'goudystout', 'harlowsolid', 'harrington', 'haettenschweiler', 'hightowertext', 'hightowertextcorsivo', 'imprintshadow', 'informalroman', 'blackadderitc', 'kristenitc', 'jokerman', 'juiceitc', 'kunstlerscript', 'widelatin', 'lucidabright', 'lucidacalligraphy', 'leelawadee', 'leelawadeegrassetto', 'lucidafax', 'lucidafaxdemigrassetto', 'lucidafaxdemigrassettocorsivo', 'lucidafaxcorsivo', 'lucidahandwritingcorsivo', 'lucidasansdemigrassetto', 'lucidasansdemigrassettocorsivo', 'lucidasanscorsivo', 'lucidasanstypewriter', 'lucidasanstypewritergrassetto', 'lucidasanstypewritergrassettooblique', 'lucidasanstypewriteroblique', 'magnetograssetto', 'maturascriptcapitals', 'mistral', 'modernno20', 'microsoftuighurgrassetto', 'microsoftuighur', 'monotypecorsiva', 'extra', 'niagaraengraved', 'niagarasolid', 'ocraextended', 'oldenglishtext', 'onyx', 'msoutlook', 'palacescript', 'papyrus', 'parchment', 'perpetuagrassettocorsivo', 'perpetuagrassetto', 'perpetuacorsivo', 'perpetuatitlinggrassetto', 'perpetuatitlingchiarissimo', 'perpetua', 'playbill', 'poorrichard', 'pristina', 'rage', 'ravie', 'msreferencesansserif', 'msreferencespecialty', 'rockwellcondensedgrassetto', 'rockwellcondensed', 'rockwell', 'rockwellgrassetto', 'rockwellgrassettocorsivo', 'rockwellextra', 'rockwellcorsivo', 'centuryschoolbookgrassetto', 'centuryschoolbookgrassettocorsivo', 'centuryschoolbookcorsivo', 'script', 'showcardgothic', 'snapitc', 'stencil', 'twcengrassettocorsivo', 'twcengrassetto', 'twcencondensedgrassetto', 'twcencondensedextra', 'twcencondensed', 'twcencorsivo', 'twcen', 'tempussansitc', 'vinerhanditc', 'vivaldicorsivo', 'vladimirscript', 'wingdings2', 'wingdings3', 'cascadiacoderegular', 'cascadiamonoregular', 'edwardianscriptitcnormale', 'stoneharbourregular', 'mregular', 'xirodregular', 'minecraft']
12
+
13
+ NEW_FONT :Callable[[int, __LITERAL_FONTS__, bool, bool], pg.font.Font]= lambda size, name="arial", bold=False, italic=False: pg.font.SysFont(name, size, bold, italic)
14
+ FONT_ARIAL_16 = NEW_FONT(16)
15
+ FONT_ARIAL_32 = NEW_FONT(32)
16
+ FONT_ARIAL_64 = NEW_FONT(64)
17
+
18
+
19
+ __LITERAL_PIVOT_POSITIONS__ = Literal["top_left", "top_center", "top_right", "center_left", "center_center", "center_right", "bottom_left", "bottom_center", "bottom_right"]
20
+ __PIVOT_POSITIONS_MULTIPLIER__ = dict(zip(("top_left", "top_center", "top_right", "center_left", "center_center", "center_right", "bottom_left", "bottom_center", "bottom_right"), (Vector2D(x,y) for y in [0, .5, 1] for x in [0, .5, 1])))
21
+
22
+
23
+ # INPUT_CELL_ASCII_TYPE = 0
24
+ # INPUT_CELL_ALPHANUM_TYPE = 1
25
+ # INPUT_CELL_ALPHA_TYPE = 2
26
+ # INPUT_CELL_NUM_TYPE = 3
27
+ # LITERAL_INPUT_CELL_TYPES = Literal[0,1,2,3]
11
28
 
12
29
  class Mouse:
13
30
  def __init__(self, parent) -> None:
14
31
  self.parent = parent
15
- self.pressed :list= [False, False, False]
16
- self.just_pressed :list= [False, False, False]
17
- self.just_released :list= [False, False, False]
18
- self.last_frame_movement = V2z.copy()
19
- self.update()
20
-
21
- def set_position(self, new_position:Vector2D|V2) -> None:
22
- self.position = new_position
23
- pg.mouse.set_pos(new_position())
32
+ self.__last_frame_position_count__ = 0
33
+ self.__last_frame_position__ = Vector2D.new_zero()
34
+ self.__last_frame_movement_count__ = 0
35
+ self.__last_frame_movement__ = Vector2D.new_zero()
36
+
37
+ self.__pressed__ : tuple[bool, bool, bool] = (False, False, False)
38
+ self.update()
39
+
40
+ @property
41
+ def position(self) -> Vector2D:
42
+ if self.__last_frame_position_count__ != self.parent.current_frame:
43
+ self.__last_frame_position__ = Vector2D(*pg.mouse.get_pos())
44
+ self.__last_frame_position_count__ = self.parent.current_frame
45
+ return self.__last_frame_position__
46
+ @position.setter
47
+ def position(self, new_position:Vector2D) -> None:
48
+ self.__last_frame_position_count__ = self.parent.current_frame
49
+ self.__last_frame_position__ = new_position
50
+ pg.mouse.set_pos(self.__last_frame_position__())
24
51
 
52
+ @property
53
+ def last_frame_movement(self) -> Vector2D:
54
+ if self.__last_frame_movement_count__ != self.parent.current_frame:
55
+ self.__last_frame_movement__ = Vector2D(*pg.mouse.get_rel())
56
+ self.__last_frame_movement_count__ = self.parent.current_frame
57
+ return self.__last_frame_movement__
58
+
25
59
  def update(self) -> None:
26
- self.position = V2(*pg.mouse.get_pos()) # type: ignore
27
- self.last_frame_movement = V2(*pg.mouse.get_rel())
28
- last_pressed = self.pressed.copy()
29
- self.pressed = list(pg.mouse.get_pressed()) # type: ignore
30
- self.just_pressed = [self.pressed[i] and not last_pressed[i] for i in range(3)]
31
- self.just_released = [not self.pressed[i] and last_pressed[i] for i in range(3)]
32
-
33
- def draw(self) -> None:
34
- pg.draw.circle(self.parent.screen, (110, 0, 0), self.position(), 10) # type: ignore
60
+ self.__last_pressed__ = self.__pressed__
61
+ self.__pressed__ = pg.mouse.get_pressed()
62
+
63
+ def get_key(self, button_id:Literal[0,1,2]=0, mode:__LITERAL_KEY_MODE_TYPES__="pressed") -> bool:
64
+ if mode == "pressed":
65
+ return self.__pressed__[button_id]
66
+ elif mode == "just_pressed":
67
+ return self.__pressed__[button_id] and (not self.__last_pressed__[button_id])
68
+ elif mode == "just_released":
69
+ return (not self.__pressed__[button_id]) and self.__last_pressed__[button_id]
70
+ else:
71
+ raise Exception(f"Unknown mode type: {mode}")
35
72
 
36
73
  class Keyboard:
37
- def __init__(self, parent) -> None:
38
- self.parent = parent
39
- self.__pressed__ :list= [False for _ in SCANCODES_NUMS]
40
- self.__just_pressed__ :list= [False for _ in SCANCODES_NUMS]
41
- self.__just_released__ :list= [False for _ in SCANCODES_NUMS]
74
+ def __init__(self) -> None:
75
+ self.__pressed__ :list= pg.key.get_pressed()
42
76
  self.update()
43
77
 
44
78
  def update(self) -> None:
45
- tmp_pressed = pg.key.get_pressed()
46
- last_pressed = self.__pressed__.copy()
47
- self.__pressed__ :list= [tmp_pressed[i] for i in SCANCODES_NUMS] # type: ignore
48
- self.__just_pressed__ = [self.__pressed__[i] and not last_pressed[i] for i in range(len(SCANCODES_NUMS))]
49
- self.__just_released__ = [not self.__pressed__[i] and last_pressed[i] for i in range(len(SCANCODES_NUMS))]
79
+ self.__last_pressed__ = self.__pressed__
80
+ self.__pressed__ = pg.key.get_pressed()
81
+
82
+ def get_key(self, scan_code:int, mode:__LITERAL_KEY_MODE_TYPES__="pressed") -> bool:
83
+ if mode == "pressed":
84
+ return self.__pressed__[scan_code]
85
+ elif mode == "just_pressed":
86
+ return self.__pressed__[scan_code] and (not self.__last_pressed__[scan_code])
87
+ elif mode == "just_released":
88
+ return (not self.__pressed__[scan_code]) and self.__last_pressed__[scan_code]
89
+ else:
90
+ raise Exception(f"Unknown mode type: {mode}")
91
+
92
+
93
+ class Util:
94
+ def __init__(self) -> None:
95
+ self.rootEnv = None
96
+ self.surface : pg.Surface
97
+ self.id : int|str
98
+ def draw(self) -> None: pass
99
+ def update(self) -> None: pass
100
+
101
+ class InputCell(Util):
102
+ def __init__(self,
103
+ id : int|str,
104
+ initial_value : str,
105
+ position : Vector2D,
106
+ size : Vector2D,
107
+ prefix : str|None = None,
108
+ text_color : tuple[int,int,int]|list[int] = (255,255,255),
109
+ bg_color : None|tuple[int,int,int]|list[int] = None,
110
+ border_color : None|tuple[int,int,int]|list[int] = (255,255,255),
111
+ border_width : float = 0,
112
+ border_radius : int|list[int]|tuple[int,int,int,int] = -1,
113
+ margin : Vector2D = Vector2D.zero(),
114
+ pivot_position : __LITERAL_PIVOT_POSITIONS__ = "center_center",
115
+ font : pg.font.Font = FONT_ARIAL_32,
116
+ personalized_surface : pg.Surface|None = None,
117
+ on_enter_pressed : Callable[[str], Any] = lambda full_text: ...,
118
+ check_when_adding : Callable[[str], str] = lambda new_text: new_text
119
+ ) -> None:
120
+ super().__init__()
121
+
122
+ self.id = id
123
+ self.on_enter_pressed = on_enter_pressed
124
+ self.check_when_adding = check_when_adding
125
+ self.prefix = prefix if prefix != None else ""
50
126
 
51
- def get_key(self, scan_code:int, mode=KEY_MODE_PRESSED) -> bool:
52
- """
53
- # Check Key State
54
-
55
- ## Parameters:
56
- scan_code (int): The pygame code value of the key to check (e.g., pg.K_SPACE, pg.K_a, pg.K_LEFT, pg.K_RIGHT, etc.).
57
- mode (int): The mode to check the key state: KEY_MODE_PRESSED, KEY_MODE_JUST_PRESSED, or KEY_MODE_JUST_RELEASED. Default is KEY_MODE_PRESSED.
58
-
59
- ## Returns:
60
- bool: True if the specified key condition is met; otherwise, False.
61
-
62
- ## Example:
63
- keyboard = Keyboard(parent_object)
64
- keyboard.update()
65
- if keyboard.get_key(pg.KEY_SPACE, mode=KEY_MODE_JUST_PRESSED):
66
- print("Space key has just been pressed!")
67
-
68
- ## Explanation:
69
- The 'get_key' method is used to check the state of a specific key.
70
-
71
- It takes the 'scan_code' parameter, which represents the name of the key to check (e.g., pg.K_SPACE, pg.K_a, pg.K_LEFT, pg.K_RIGHT, etc.).
72
-
73
- The 'mode' parameter can be used to specify whether to check for 'KEY_MODE_PRESSED' (key is currently pressed), 'KEY_MODE_JUST_PRESSED' (key has just been pressed in the current frame), or 'KEY_MODE_JUST_RELEASED' (key has just been released in the current frame).
74
-
75
- The method returns True if the specified condition is met; otherwise, it returns False.
76
-
77
- Example usage is shown in the "Example" section above.
78
- """
79
- ll = self.__pressed__
80
- if mode == KEY_MODE_PRESSED:
81
- ll = self.__pressed__
82
- elif mode == KEY_MODE_JUST_PRESSED:
83
- ll = self.__just_pressed__
84
- elif mode == KEY_MODE_JUST_RELEASED:
85
- ll = self.__just_released__
86
- return ll[SCANCODES_NUMS[scan_code]]
127
+ self.text_color = text_color
128
+ self.font = font
129
+ self.surface = personalized_surface
130
+ self.bg_color = bg_color
131
+ # size = Vector2D(*self.text_box.get_size()) + self.margin * 2
132
+ self.size = size
133
+ self.position = (position - size * __PIVOT_POSITIONS_MULTIPLIER__[pivot_position] + margin)
134
+ self.bg_rect = [0, 0] + size()
135
+ self.margin_rect = (margin * -1)() + size()
136
+ self.border_color = border_color
137
+ self.border_radius = [border_radius]*4 if not any(isinstance(border_radius, cls) for cls in {tuple, list}) else border_radius
138
+ self.border_width = border_width
139
+
140
+ self.value = initial_value
141
+ self.update_text()
142
+
143
+ self.text_surface = pg.Surface(self.size(), pg.SRCALPHA, 32).convert_alpha()
144
+
145
+ def draw(self) -> None:
146
+ self.text_surface.fill((0,0,0,0))
147
+ if self.bg_color != None:
148
+ pg.draw.rect(self.text_surface, self.bg_color, self.bg_rect, 0, -1, *self.border_radius)
149
+
150
+ self.text_surface.blit(self.text_box, self.text_position())
151
+
152
+ if self.rootEnv.selected_util != self:
153
+ if self.border_width:
154
+ pg.draw.rect(self.text_surface, self.border_color, self.margin_rect, self.border_width, -1, *self.border_radius)
155
+ else:
156
+ pg.draw.rect(self.text_surface, [127 + 127 * _mt.sin(self.rootEnv.get_time_from_start() * 10)]*3, self.margin_rect, self.border_width if self.border_width else 10, -1, *self.border_radius)
157
+
158
+ self.surface.blit(self.text_surface, self.position())
159
+
160
+ def update(self) -> None:
161
+ if self.rootEnv.mouse.get_key(0, "just_pressed"):
162
+ if self.position.x < self.rootEnv.mouse.position.x < self.position.x + self.size.x and\
163
+ self.position.y < self.rootEnv.mouse.position.y < self.position.y + self.size.y:
164
+ self.rootEnv.selected_util = self if self.rootEnv.selected_util != self else None
165
+ self.update_text()
166
+ if self.rootEnv.selected_util == self:
167
+ for event in self.rootEnv.events:
168
+ if event.type == pg.TEXTINPUT:
169
+ self.value += self.check_when_adding(event.text)
170
+ elif event.type == pg.KEYDOWN and event.key == pg.K_BACKSPACE:
171
+ self.value = self.value[:-1]
172
+ if self.rootEnv.keyboard.get_key(pg.K_DELETE):
173
+ self.value = self.value[:-1]
174
+ if self.rootEnv.keyboard.get_key(pg.K_RETURN, "just_pressed"):
175
+ self.on_enter_pressed(self.value)
176
+ if self.rootEnv.keyboard.get_key(pg.K_ESCAPE, "just_pressed"):
177
+ self.rootEnv.selected_util = self if self.rootEnv.selected_util != self else None
178
+ self.update_text()
179
+
180
+ def update_text(self) -> None:
181
+ self.text_box = self.font.render(self.prefix + self.value, True, self.text_color)
182
+ if self.rootEnv != None and self.rootEnv.selected_util == self:
183
+ # self.text_position = self.position + self.size * Vector2D(.85, .5) - Vector2D(*self.text_box.get_size()) * Vector2D(1, .5) - self.position
184
+ self.text_position = self.position + self.size * .5 - Vector2D(*self.text_box.get_size()) * Vector2D(.5, .5) - self.position
185
+ else:
186
+ self.text_position = self.position + self.size * .5 - Vector2D(*self.text_box.get_size()) * Vector2D(.5, .5) - self.position
e2D/winrec.py CHANGED
@@ -9,10 +9,6 @@ class WinRec:
9
9
  self.path = path
10
10
  self.fps = fps
11
11
  self.video_writer = cv2.VideoWriter(self.path, cv2.VideoWriter_fourcc(*'mp4v'), self.fps, self.rootEnv.screen_size()) #type: ignore
12
- self.reset()
13
-
14
- def reset(self) -> None:
15
- self.frames = []
16
12
 
17
13
  def update(self) -> None:
18
14
  frame = cv2.cvtColor(np.swapaxes(pg.surfarray.array3d(self.rootEnv.screen), 0, 1), cv2.COLOR_RGB2BGR)
@@ -24,7 +20,7 @@ class WinRec:
24
20
  def draw(self, draw_on_screen=False) -> None:
25
21
  text = f"[cfps:{self.rootEnv.current_frame} || realtime:{round(self.get_rec_seconds(),2)} || apptime:{round(self.rootEnv.get_time_from_start(),2)}]"
26
22
  pg.display.set_caption(text)
27
- if draw_on_screen: self.rootEnv.print(text, self.rootEnv.screen_size, fixed_sides=TEXT_FIXED_SIDES_BOTTOM_RIGHT)
23
+ if draw_on_screen: self.rootEnv.print(text, self.rootEnv.screen_size, pivot_position='bottom_right')
28
24
 
29
25
  def quit(self) -> None:
30
26
  self.video_writer.release()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: e2D
3
- Version: 1.4.11
3
+ Version: 1.4.12
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
@@ -263,7 +263,7 @@ e2D is open-source software licensed under the [MIT License](LICENSE).
263
263
 
264
264
  ## Contact
265
265
 
266
- For inquiries, you can reach me at [ricomari2006@gmail.com](mailto:ricomari2006@gmail.com).
266
+ For inquiries, you can reach me at [emptyhead.dev@gmail.com](mailto:emptyhead.dev@gmail.com).
267
267
 
268
268
  ## Acknowledgements
269
269
  The e2D is developed and maintained by [marick-py](https://github.com/marick-py) but is inspired by the Pygame library and various other game development resources. We would like to express our gratitude to the Pygame community and all the developers who have contributed to the open-source projects that made e2D possible.
@@ -0,0 +1,12 @@
1
+ e2D/__init__.py,sha256=rHhqZG95FEZ8lkU8QRClAPcvgQeNqcKE_kszwCXAw3Y,22971
2
+ e2D/__init__.pyi,sha256=U_mwTgruVO91O3y0CJxp9jJpO-ngcxbO9zREPo5U0xA,48495
3
+ e2D/cvb.py,sha256=xMpwUBE1G2TOdah-x62W_6yXZey-n1p0OkvfiijZfNY,37445
4
+ e2D/envs.py,sha256=dnve_1pmtN9P3tyXOc51yerI8GzP2pSkFsrsoKY62xk,6266
5
+ e2D/plots.py,sha256=qNQZTwpYqDyonXGv_cDt-R3nGvu3xR7RSFDRdJma4rA,36069
6
+ e2D/utils.py,sha256=7SkfQj5Y6J3_pW9ssWMKVDSawrDANv3GtehGRVeH96k,14048
7
+ e2D/winrec.py,sha256=QMcQrED4xC8o5KAHEbhOR03lJ_-XRNAtUI3y-cRHsck,1122
8
+ e2D-1.4.12.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
9
+ e2D-1.4.12.dist-info/METADATA,sha256=RPqIVVgTietngTbLEDXlPuz4Ry4eco4_0oiSvPnX13A,9611
10
+ e2D-1.4.12.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
11
+ e2D-1.4.12.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
12
+ e2D-1.4.12.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- e2D/__init__.py,sha256=m7BKK9r6t8csv9k_Rmm5sTegvvyx-6-2xPof85Y5BI4,56244
2
- e2D/cvb.py,sha256=xMpwUBE1G2TOdah-x62W_6yXZey-n1p0OkvfiijZfNY,37445
3
- e2D/envs.py,sha256=9T5COi1mwbEXOSXOBtZWBYr48WnqJQWhVny8U0g2ql0,9771
4
- e2D/plots.py,sha256=hLib9scdz10pXgiimaqdg7A363h1TP1X8KpIGRpM1cw,33111
5
- e2D/utils.py,sha256=0BBnUygsLp-fx5cVgKhxe-WGZNj0YZvJz1ejlD7Emfc,5534
6
- e2D/winrec.py,sha256=WBdRJELP4ia_xPinBbY5AfHrFqRRkehqCPLDq5wH2s4,1218
7
- e2D-1.4.11.dist-info/LICENSE,sha256=wymkNVDvj3qmjdO_rAhkRPM4t5y3_SqffGsFdgfvznU,1066
8
- e2D-1.4.11.dist-info/METADATA,sha256=6R1oYvr4cFOrbW_AWj2Hs0q3toGZfCNUv6r92OR6ya4,9609
9
- e2D-1.4.11.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
10
- e2D-1.4.11.dist-info/top_level.txt,sha256=3vKZ-CGzNlTCpzVMmM0Ht76krCofKw7hZ0wBf-dnKdM,4
11
- e2D-1.4.11.dist-info/RECORD,,
File without changes