Skip to content

Commit

Permalink
Add UI2DSlider element tests
Browse files Browse the repository at this point in the history
Step 5 of splitting mega-PR #494 into smaller easier to review PRs

Co-authored-by: GimLala <[email protected]>
  • Loading branch information
MyreMylar and GimLala committed Mar 12, 2024
1 parent 47173fd commit eaf9bb8
Show file tree
Hide file tree
Showing 2 changed files with 412 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygame_gui/elements/ui_2d_slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class UI2DSlider(UIElement):
def __init__(self,
relative_rect: pygame.Rect,
start_value_x: Union[float, int],
value_range_x: Tuple[Union[float, int], Union[float, int]],
value_range_x: Union[Tuple[float, float], Tuple[int, int]],
start_value_y: Union[float, int],
value_range_y: Tuple[Union[float, int], Union[float, int]],
value_range_y: Union[Tuple[float, float], Tuple[int, int]],
invert_y: bool = True,
manager: Optional[IUIManagerInterface] = None,
container: Optional[IContainerLikeInterface] = None,
Expand Down Expand Up @@ -264,7 +264,7 @@ def update(self, time_delta: float):
"ui_object_id": self.most_specific_combined_id}
pygame.event.post(pygame.event.Event(UI_2D_SLIDER_MOVED, event_data))

def get_current_value(self) -> Tuple[Union[float, int], Union[float, int]]:
def get_current_value(self) -> Tuple[Union[float, float], Union[int, int]]:
"""
Gets the current value the slider is set to.
Expand Down
Loading

0 comments on commit eaf9bb8

Please sign in to comment.