Repository: MyreMylar/pygame_gui
Pull request #499 (2024-01-28 10:36:16)

Update CI runner versions and pygame-ce version generally
As title.


Patch:
diff --git a/README.md b/README.md
index 850f25a..38641f9 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ A GUI system for pygame CE.
 ## Requirements
 
  - Python 3.8+
- - Pygame Community Edition 2.1.4+
+ - Pygame Community Edition 2.4.0+
  - python-i18n (does localization to different languages)
 
 ## How to install
diff --git a/pygame_gui/elements/ui_button.py b/pygame_gui/elements/ui_button.py
index 1ef8e41..09bd78c 100644
--- a/pygame_gui/elements/ui_button.py
+++ b/pygame_gui/elements/ui_button.py
@@ -315,7 +315,7 @@ class UIButton(UIElement):
                 if self.is_enabled:
                     if (self.allow_double_clicks and self.last_click_button == event.button and
                             self.double_click_timer <= self.ui_manager.get_double_click_time()):
-                        self.on_double_clicked()
+                        self.on_double_clicked(event.button)
                     else:
                         self.on_start_press(event.button)
                         self.double_click_timer = 0.0
@@ -370,7 +370,7 @@ class UIButton(UIElement):
                         'mouse_button': button}
         pygame.event.post(pygame.event.Event(UI_BUTTON_PRESSED, event_data))
 
-    def on_double_clicked(self):
+    def on_double_clicked(self, button: int):
         # old event to remove in 0.8.0
         event_data = {'user_type': OldType(UI_BUTTON_DOUBLE_CLICKED),
                         'ui_element': self,
@@ -380,7 +380,7 @@ class UIButton(UIElement):
         # new event
         event_data = {'ui_element': self,
                         'ui_object_id': self.most_specific_combined_id,
-                        'mouse_button': event.button}
+                        'mouse_button': button}
         pygame.event.post(pygame.event.Event(UI_BUTTON_DOUBLE_CLICKED, event_data))
         
 
diff --git a/setup.py b/setup.py
index d65e63a..1b1af44 100644
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ setup(
       zip_safe=False,
       python_requires='>=3.8',
       setup_requires=[],
-      install_requires=['pygame-ce>=2.3.2',
+      install_requires=['pygame-ce>=2.4.0',
                         'python-i18n>=0.3.9',
                         'importlib_resources>1.3; python_version < "3.9"'],
       include_package_data=True,


Test patch:
diff --git a/.github/workflows/run_tests_ci.yml b/.github/workflows/run_tests_ci.yml
index f59467c..ba1ab19 100644
--- a/.github/workflows/run_tests_ci.yml
+++ b/.github/workflows/run_tests_ci.yml
@@ -9,11 +9,11 @@ jobs:
       max-parallel: 4
       matrix:
         python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
-        pygame-ce-version: ['2.3.2']
+        pygame-ce-version: ['2.4.0']
     steps:
-    - uses: actions/checkout@v4.1.0
+    - uses: actions/checkout@v4.1.1
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v4.7.1
+      uses: actions/setup-python@v5.0.0
       with:
         python-version: ${{ matrix.python-version }}
         pygame-ce-version: ${{ matrix.pygame-ce-version }}
@@ -37,7 +37,7 @@ jobs:
       run: |
         xvfb-run pytest --cov-report=xml --cov=pygame_gui tests/
     - name: Upload to Code Cov
-      uses: codecov/codecov-action@v3
+      uses: codecov/codecov-action@v3.1.5
       with:
         token: ${{ secrets.CODECOV_TOKEN }} #required
 
@@ -48,11 +48,11 @@ jobs:
       max-parallel: 4
       matrix:
         python-version: [ '3.11','3.12' ]
-        pygame-ce-version: [ '2.3.2' ]
+        pygame-ce-version: [ '2.4.0' ]
     steps:
-      - uses: actions/checkout@v4.1.0
+      - uses: actions/checkout@v4.1.1
       - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v4.7.1
+        uses: actions/setup-python@v5.0.0
         with:
           python-version: ${{ matrix.python-version }}
           pygame-ce-version: ${{ matrix.pygame-ce-version }}
@@ -73,7 +73,7 @@ jobs:
         run: |
           pytest --cov-report=xml --cov=pygame_gui tests/
       - name: Upload to Code Cov
-        uses: codecov/codecov-action@v3
+        uses: codecov/codecov-action@v3.1.5
         with:
           token: ${{ secrets.CODECOV_TOKEN }} #required