Repository: MyreMylar/pygame_gui
Pull request #442 (2023-04-16 17:43:34)

Fix a few small issues
prep for a bigger push.


Patch:
diff --git a/pygame_gui/core/colour_parser.py b/pygame_gui/core/colour_parser.py
index a9c23d5..8f707e4 100644
--- a/pygame_gui/core/colour_parser.py
+++ b/pygame_gui/core/colour_parser.py
@@ -78,7 +78,7 @@ def is_degree_string(strdata: str) -> bool:
                 return 0 <= degrees <= 360
         elif is_int_str(strdata):
             degrees = int(strdata)
-            return 0 <= degrees <= 360
+            return -360 <= degrees <= 360
     return False
 
 
diff --git a/pygame_gui/elements/ui_panel.py b/pygame_gui/elements/ui_panel.py
index dcd216c..9394f81 100644
--- a/pygame_gui/elements/ui_panel.py
+++ b/pygame_gui/elements/ui_panel.py
@@ -23,7 +23,7 @@ class UIPanel(UIElement, IContainerLikeInterface):
 
     :param relative_rect: The positioning and sizing rectangle for the panel. See the layout
                           guide for details.
-    :param starting_height: How many layers above its container to place this panel on.
+    :param starting_layer_height: How many layers above its container to place this panel on.
     :param manager: The GUI manager that handles drawing and updating the UI and interactions
                     between elements. If not provided or set to None,
                     it will try to use the first UIManager that was created by your application.
@@ -42,7 +42,7 @@ class UIPanel(UIElement, IContainerLikeInterface):
     """
     def __init__(self,
                  relative_rect: pygame.Rect,
-                 starting_height: int = 1,
+                 starting_layer_height: int = 1,
                  manager: Optional[IUIManagerInterface] = None,
                  *,
                  element_id: str = 'panel',
@@ -57,7 +57,7 @@ class UIPanel(UIElement, IContainerLikeInterface):
         super().__init__(relative_rect,
                          manager,
                          container,
-                         starting_height=starting_height,
+                         starting_height=starting_layer_height,
                          layer_thickness=1,
                          anchors=anchors,
                          visible=visible)
@@ -93,7 +93,7 @@ class UIPanel(UIElement, IContainerLikeInterface):
                                                                   self.container_margins['bottom']))
 
         self.panel_container = UIContainer(container_rect, manager,
-                                           starting_height=starting_height,
+                                           starting_height=starting_layer_height,
                                            container=container,
                                            parent_element=self,
                                            object_id=ObjectID(object_id='#panel_container',
diff --git a/pygame_gui/elements/ui_text_box.py b/pygame_gui/elements/ui_text_box.py
index afcdf43..41a87bd 100644
--- a/pygame_gui/elements/ui_text_box.py
+++ b/pygame_gui/elements/ui_text_box.py
@@ -67,7 +67,7 @@ class UITextBox(UIElement, IUITextOwnerInterface):
                     it will try to use the first UIManager that was created by your application.
     :param wrap_to_height: False by default, if set to True the box will increase in height to
                            match the text within.
-    :param starting_height: Sets the height, above its container, to start placing the text
+    :param layer_starting_height: Sets the height, above its container, to start placing the text
                                   box at.
     :param container: The container that this element is within. If not provided or set to None
                       will be the root window's container.
@@ -86,7 +86,7 @@ class UITextBox(UIElement, IUITextOwnerInterface):
                  relative_rect: Union[pygame.Rect, Tuple[int, int, int, int]],
                  manager: Optional[IUIManagerInterface] = None,
                  wrap_to_height: bool = False,
-                 starting_height: int = 1,
+                 layer_starting_height: int = 1,
                  container: Optional[IContainerLikeInterface] = None,
                  parent_element: Optional[UIElement] = None,
                  object_id: Optional[Union[ObjectID, str]] = None,
@@ -100,7 +100,7 @@ class UITextBox(UIElement, IUITextOwnerInterface):
                  should_html_unescape_input_text: bool = False):
 
         super().__init__(relative_rect, manager, container,
-                         starting_height=starting_height,
+                         starting_height=layer_starting_height,
                          layer_thickness=2,
                          anchors=anchors,
                          visible=visible
diff --git a/pygame_gui/elements/ui_tool_tip.py b/pygame_gui/elements/ui_tool_tip.py
index 714d772..e2464b5 100644
--- a/pygame_gui/elements/ui_tool_tip.py
+++ b/pygame_gui/elements/ui_tool_tip.py
@@ -66,7 +66,7 @@ class UITooltip(UIElement, IUITooltipInterface):
         self.text_block = UITextBox(html_text,
                                     pygame.Rect(0, 0, self.rect_width, -1),
                                     manager=self.ui_manager,
-                                    starting_height=self._layer,
+                                    layer_starting_height=self._layer,
                                     parent_element=self,
                                     text_kwargs=text_kwargs)
 


Test patch:
diff --git a/.github/workflows/run_tests_ci.yml b/.github/workflows/run_tests_ci.yml
index 8bf9476..498a5e1 100644
--- a/.github/workflows/run_tests_ci.yml
+++ b/.github/workflows/run_tests_ci.yml
@@ -11,7 +11,7 @@ jobs:
         python-version: ['3.8', '3.9', '3.10', '3.11']
         pygame-ce-version: ['2.1.4', '2.2.1']
     steps:
-    - uses: actions/checkout@v1
+    - uses: actions/checkout@v3
     - name: Set up Python ${{ matrix.python-version }}
       uses: actions/setup-python@v1
       with:
@@ -25,7 +25,6 @@ jobs:
         python -m pip install pytest
         python -m pip install pytest-benchmark
         python -m pip install pytest-cov
-        python -m pip install codecov
         python -m pip install -q pygame-ce==${{ matrix.pygame-ce-version }}
         python -m pip install . -U
         sudo apt-get install xvfb
@@ -38,7 +37,7 @@ jobs:
       run: |
         xvfb-run pytest --cov-report=xml --cov=pygame_gui tests/
     - name: Upload to Code Cov
-      uses: codecov/codecov-action@v1
+      uses: codecov/codecov-action@v3
       with:
         token: ${{ secrets.CODECOV_TOKEN }} #required
 
@@ -51,7 +50,7 @@ jobs:
         python-version: [ '3.11' ]
         pygame-ce-version: [ '2.1.4', '2.2.1' ]
     steps:
-      - uses: actions/checkout@v1
+      - uses: actions/checkout@v3
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
@@ -65,7 +64,6 @@ jobs:
           python -m pip install pytest
           python -m pip install pytest-benchmark
           python -m pip install pytest-cov
-          python -m pip install codecov
           python -m pip install -q pygame-ce==${{ matrix.pygame-ce-version }}
           python -m pip install . -U
       - name: Test with pytest
@@ -75,7 +73,7 @@ jobs:
         run: |
           pytest --cov-report=xml --cov=pygame_gui tests/
       - name: Upload to Code Cov
-        uses: codecov/codecov-action@v1
+        uses: codecov/codecov-action@v3
         with:
           token: ${{ secrets.CODECOV_TOKEN }} #required
 
@@ -88,7 +86,7 @@ jobs:
         python-version: [ '3.11' ]
         pygame-ce-version: [ '2.1.4', '2.2.1' ]
     steps:
-      - uses: actions/checkout@v1
+      - uses: actions/checkout@v3
       - name: Set up Python ${{ matrix.python-version }}
         uses: actions/setup-python@v1
         with:
@@ -102,7 +100,6 @@ jobs:
           python -m pip install pytest
           python -m pip install pytest-benchmark
           python -m pip install pytest-cov
-          python -m pip install codecov
           python -m pip install -q pygame-ce==${{ matrix.pygame-ce-version }}
           python -m pip install . -U
       - name: Test with pytest
@@ -112,6 +109,6 @@ jobs:
         run: |
           pytest --cov-report=xml --cov=pygame_gui tests/
       - name: Upload to Code Cov
-        uses: codecov/codecov-action@v1
+        uses: codecov/codecov-action@v3
         with:
           token: ${{ secrets.CODECOV_TOKEN }} #required
diff --git a/tests/test_core/test_colour_parser.py b/tests/test_core/test_colour_parser.py
index d248de4..f82f715 100644
--- a/tests/test_core/test_colour_parser.py
+++ b/tests/test_core/test_colour_parser.py
@@ -158,7 +158,7 @@ class TestColourParsing:
         assert is_u8_string("4.3") is False
 
     def test_degree_on_bounds(self, _init_pygame):
-        assert is_degree_string("0") is True and is_degree_string("360") is True and is_degree_string("-1") is False and is_degree_string("361") is False
+        assert is_degree_string("0") is True and is_degree_string("360") is True and is_degree_string("-361") is False and is_degree_string("361") is False
 
     def test_degree_unit(self, _init_pygame):
         assert is_degree_string("40deg") is True
diff --git a/tests/test_elements/test_ui_panel.py b/tests/test_elements/test_ui_panel.py
index 2fdbc37..89ec1ce 100644
--- a/tests/test_elements/test_ui_panel.py
+++ b/tests/test_elements/test_ui_panel.py
@@ -15,12 +15,12 @@ class TestUIPanel:
 
     def test_creation(self, _init_pygame, _display_surface_return_none, default_ui_manager):
         UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                starting_height=5,
+                starting_layer_height=5,
                 manager=default_ui_manager)
 
     def test_creation_with_margins(self, _init_pygame, _display_surface_return_none, default_ui_manager):
         UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                starting_height=5,
+                starting_layer_height=5,
                 manager=default_ui_manager,
                 margins={'left': 10,
                          'right': 10,
@@ -29,7 +29,7 @@ class TestUIPanel:
 
     def test_update(self, _init_pygame, _display_surface_return_none, default_ui_manager):
         panel = UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=default_ui_manager,
                         margins={'left': 10,
                                  'right': 10,
@@ -45,7 +45,7 @@ class TestUIPanel:
 
     def test_add_button(self, _init_pygame, _display_surface_return_none, default_ui_manager):
         panel = UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=default_ui_manager,
                         margins={'left': 10,
                                  'right': 10,
@@ -68,7 +68,7 @@ class TestUIPanel:
 
     def test_process_event(self, _init_pygame, _display_surface_return_none, default_ui_manager):
         panel = UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=default_ui_manager,
                         margins={'left': 10,
                                  'right': 10,
@@ -91,7 +91,7 @@ class TestUIPanel:
 
     def test_kill(self, _init_pygame, _display_surface_return_none, default_ui_manager: IUIManagerInterface):
         panel = UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=default_ui_manager,
                         margins={'left': 10,
                                  'right': 10,
@@ -123,7 +123,7 @@ class TestUIPanel:
         element_1 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'left',
                                      'top': 'top',
@@ -137,7 +137,7 @@ class TestUIPanel:
         element_2 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'right',
                                      'right': 'right',
                                      'top': 'top',
@@ -151,7 +151,7 @@ class TestUIPanel:
         element_3 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'right',
                                      'right': 'right',
                                      'top': 'bottom',
@@ -165,7 +165,7 @@ class TestUIPanel:
         element_4 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'left',
                                      'top': 'bottom',
@@ -179,7 +179,7 @@ class TestUIPanel:
         element_5 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'right',
                                      'top': 'top',
@@ -201,7 +201,7 @@ class TestUIPanel:
         element = UIPanel(relative_rect=pygame.Rect(100, 100, 50, 50),
                           manager=default_ui_manager,
                           container=test_container,
-                          starting_height=5)
+                          starting_layer_height=5)
 
         element.set_position((150, 30))
 
@@ -210,7 +210,7 @@ class TestUIPanel:
         element_1 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'left',
                                      'top': 'top',
@@ -224,7 +224,7 @@ class TestUIPanel:
         element_2 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'right',
                                      'right': 'right',
                                      'top': 'top',
@@ -238,7 +238,7 @@ class TestUIPanel:
         element_3 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'right',
                                      'right': 'right',
                                      'top': 'bottom',
@@ -252,7 +252,7 @@ class TestUIPanel:
         element_4 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'left',
                                      'top': 'bottom',
@@ -266,7 +266,7 @@ class TestUIPanel:
         element_5 = UIPanel(relative_rect=pygame.Rect(0, 0, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'right',
                                      'top': 'top',
@@ -289,7 +289,7 @@ class TestUIPanel:
         element_1 = UIPanel(relative_rect=pygame.Rect(30, 30, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'left',
                                      'top': 'top',
@@ -310,7 +310,7 @@ class TestUIPanel:
         element_2 = UIPanel(relative_rect=pygame.Rect(-60, 10, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'right',
                                      'right': 'right',
                                      'top': 'top',
@@ -331,7 +331,7 @@ class TestUIPanel:
         element_3 = UIPanel(relative_rect=pygame.Rect(-70, -70, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'right',
                                      'right': 'right',
                                      'top': 'bottom',
@@ -352,7 +352,7 @@ class TestUIPanel:
         element_4 = UIPanel(relative_rect=pygame.Rect(50, -50, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'left',
                                      'top': 'bottom',
@@ -374,7 +374,7 @@ class TestUIPanel:
         element_5 = UIPanel(relative_rect=pygame.Rect(10, 10, 50, 50),
                             manager=default_ui_manager,
                             container=test_container,
-                            starting_height=5,
+                            starting_layer_height=5,
                             anchors={'left': 'left',
                                      'right': 'right',
                                      'top': 'top',
@@ -416,7 +416,7 @@ class TestUIPanel:
         manager = UIManager((800, 600), os.path.join("tests", "data",
                                                      "themes", "ui_panel_non_default.json"))
         panel = UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=manager,
                         margins={'left': 10,
                                  'right': 10,
@@ -435,7 +435,7 @@ class TestUIPanel:
         manager = UIManager((800, 600), os.path.join("tests", "data", "themes",
                                                      "ui_panel_bad_values.json"))
         panel = UIPanel(relative_rect=pygame.Rect(50, 50, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=manager,
                         margins={'left': 10,
                                  'right': 10,
@@ -447,7 +447,7 @@ class TestUIPanel:
     def test_disable(self, _init_pygame: None, default_ui_manager: UIManager,
                      _display_surface_return_none: None):
         panel = UIPanel(relative_rect=pygame.Rect(0, 0, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=default_ui_manager)
         button_1 = UIButton(relative_rect=pygame.Rect(10, 10, 150, 30),
                             text="Test Button",
@@ -481,7 +481,7 @@ class TestUIPanel:
     def test_enable(self, _init_pygame: None, default_ui_manager: UIManager,
                     _display_surface_return_none: None):
         panel = UIPanel(relative_rect=pygame.Rect(0, 0, 150, 400),
-                        starting_height=5,
+                        starting_layer_height=5,
                         manager=default_ui_manager)
         button_1 = UIButton(relative_rect=pygame.Rect(10, 10, 150, 30),
                             text="Test Button",
@@ -515,7 +515,7 @@ class TestUIPanel:
 
     def test_panel_children_inheriting_hidden_status(self, _init_pygame, default_ui_manager: IUIManagerInterface,
                                                      _display_surface_return_none):
-        panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager, visible=0, starting_height=5)
+        panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager, visible=0, starting_layer_height=5)
         button = UIButton(relative_rect=pygame.Rect(0, 0, 50, 50), text="",
                           manager=default_ui_manager, container=panel, visible=1)
         assert panel.visible == 0
@@ -523,7 +523,7 @@ class TestUIPanel:
 
     def test_hidden_panel_children_behaviour_on_show(self, _init_pygame, default_ui_manager: IUIManagerInterface,
                                                      _display_surface_return_none):
-        panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager, visible=0, starting_height=5)
+        panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager, visible=0, starting_layer_height=5)
         button = UIButton(relative_rect=pygame.Rect(0, 0, 50, 50), text="",
                           manager=default_ui_manager, container=panel)
         assert panel.visible == 0
@@ -536,7 +536,7 @@ class TestUIPanel:
                                                       default_ui_manager: IUIManagerInterface,
                                                       _display_surface_return_none):
         panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager,
-                        visible=1, starting_height=5)
+                        visible=1, starting_layer_height=5)
         button = UIButton(relative_rect=pygame.Rect(0, 0, 50, 50), text="",
                           manager=default_ui_manager, container=panel, visible=0)
         assert panel.visible == 1
@@ -549,7 +549,7 @@ class TestUIPanel:
                                                       default_ui_manager: IUIManagerInterface,
                                                       _display_surface_return_none):
         panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager,
-                        visible=1, starting_height=5)
+                        visible=1, starting_layer_height=5)
         button = UIButton(relative_rect=pygame.Rect(0, 0, 50, 50), text="",
                           manager=default_ui_manager, container=panel)
         assert panel.visible == 1
@@ -562,7 +562,7 @@ class TestUIPanel:
                                                      default_ui_manager: IUIManagerInterface,
                                                      _display_surface_return_none):
         panel = UIPanel(pygame.Rect(100, 100, 200, 200), manager=default_ui_manager,
-                        visible=0, starting_height=5)
+                        visible=0, starting_layer_height=5)
         button = UIButton(relative_rect=pygame.Rect(0, 0, 50, 50), text="",
                           manager=default_ui_manager, container=panel)
         button.show()
@@ -580,7 +580,7 @@ class TestUIPanel:
         surface = empty_surface.copy()
         manager = UIManager(resolution)
 
-        panel = UIPanel(pygame.Rect(25, 25, 375, 150), manager=manager, visible=0, starting_height=1)
+        panel = UIPanel(pygame.Rect(25, 25, 375, 150), manager=manager, visible=0, starting_layer_height=1)
         UIButton(relative_rect=pygame.Rect(0, 0, 50, 50), text="",
                  manager=manager, container=panel)
 
diff --git a/tests/test_elements/test_ui_text_box.py b/tests/test_elements/test_ui_text_box.py
index 943d9bd..7319519 100644
--- a/tests/test_elements/test_ui_text_box.py
+++ b/tests/test_elements/test_ui_text_box.py
@@ -675,7 +675,7 @@ class TestUITextBox:
                              relative_rect=rect,
                              manager=default_ui_manager,
                              wrap_to_height=True,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message")
 
         assert text_box.rect.height != 10
@@ -692,7 +692,7 @@ class TestUITextBox:
                              relative_rect=rect,
                              manager=default_ui_manager,
                              wrap_to_height=True,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message")
 
         assert text_box.rect.height != 0
@@ -775,7 +775,7 @@ class TestUITextBox:
                              relative_rect=rect,
                              manager=default_ui_manager,
                              wrap_to_height=False,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message",
                              visible=0)
 
@@ -802,7 +802,7 @@ class TestUITextBox:
                              relative_rect=rect,
                              manager=default_ui_manager,
                              wrap_to_height=False,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message",
                              visible=0)
 
@@ -837,7 +837,7 @@ class TestUITextBox:
                              relative_rect=rect,
                              manager=default_ui_manager,
                              wrap_to_height=False,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message")
 
         assert text_box.visible == 1
@@ -863,7 +863,7 @@ class TestUITextBox:
                              relative_rect=rect,
                              manager=default_ui_manager,
                              wrap_to_height=False,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message")
 
         assert text_box.visible == 1
@@ -895,7 +895,7 @@ class TestUITextBox:
                              relative_rect=pygame.Rect(100, 100, 400, 400),
                              manager=manager,
                              wrap_to_height=False,
-                             starting_height=100,
+                             layer_starting_height=100,
                              object_id="screen_message",
                              visible=0)
         manager.update(0.01)
diff --git a/tests/test_ui_manager.py b/tests/test_ui_manager.py
index 28c74d4..0600ce0 100644
--- a/tests/test_ui_manager.py
+++ b/tests/test_ui_manager.py
@@ -96,7 +96,7 @@ class TestUIManager:
         Fake a click button event on a button to check they are going through the ui event manager properly/
         """
         test_button = UIButton(relative_rect=pygame.Rect(100, 100, 150, 30), text="Test", manager=default_ui_manager)
-        UIMessageWindow(rect=pygame.Rect(500, 400, 250, 300),
+        UIMessageWindow(rect=pygame.Rect(500, 100, 250, 300),
                         window_title="Test Message",
                         html_message="This is a bold test of the message box functionality.",
                         manager=default_ui_manager)