|
1 | 1 | """
|
2 |
| -Defines InfoBox class, an helper to draw any kind of popup (menu or informative message). |
| 2 | +Defines InfoBox class, a helper to draw any kind of popup (menu or informative message). |
3 | 3 | """
|
4 | 4 |
|
5 | 5 | from __future__ import annotations
|
@@ -66,7 +66,7 @@ class InfoBox:
|
66 | 66 | element_linked (pygame.Rect): the pygame Rect of the element linked to this infoBox if there is one
|
67 | 67 | has_close_button (bool): whether the infoBox has a close button or not
|
68 | 68 | title_color (pygame.Color): the color of the title
|
69 |
| - element_grid (list[list[BoxElement]): the grid containing the components that should be rendered by the infoBox |
| 69 | + element_grid (list[list[BoxElement]]): the grid containing the components that should be rendered by the infoBox |
70 | 70 | buttons (Sequence[Button]): the sequence of buttons of the infoBox, including the close button if present
|
71 | 71 | sprite (pygame.Surface): the pygame Surface corresponding to the sprite of the infoBox
|
72 | 72 | visible_on_background (bool): whether the popup is visible on background or not
|
@@ -168,7 +168,7 @@ def init_elements(self) -> list[_Row]:
|
168 | 168 | self.title,
|
169 | 169 | pygame.Vector2(0, 0),
|
170 | 170 | _default_fonts["info_box_title"],
|
171 |
| - (20, 0, 20, 0), |
| 171 | + (10, 0, 30, 0), |
172 | 172 | self.title_color,
|
173 | 173 | )
|
174 | 174 | self.__separator["vertical_position"] += title.get_height()
|
@@ -197,7 +197,7 @@ def __determine_height(self) -> int:
|
197 | 197 | Returns:
|
198 | 198 | int: the computed height.
|
199 | 199 | """
|
200 |
| - # Margin to be add at begin and at end |
| 200 | + # Margin to be added at begin and at end |
201 | 201 | height: int = MARGIN_BOX * 2
|
202 | 202 | self.__separator["height"] -= height
|
203 | 203 | self.__separator["vertical_position"] += height
|
|
0 commit comments