Skip to content

Commit

Permalink
move blocking window to top of stack
Browse files Browse the repository at this point in the history
  • Loading branch information
MyreMylar committed May 19, 2024
1 parent ac04524 commit 465307e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_elements/test_ui_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ def test_set_blocking(self, _init_pygame, default_ui_manager: IUIManagerInterfac
'pos': button.rect.center}))
assert not button.held

window.set_blocking(False)
window.always_on_top = True
window.set_blocking(True)

default_ui_manager.process_events(pygame.event.Event(pygame.MOUSEBUTTONDOWN,
{'button': pygame.BUTTON_LEFT,
'pos': button.rect.center}))
assert not button.held

window.set_blocking(False)

def test_set_minimum_dimensions(self, _init_pygame, default_ui_manager: IUIManagerInterface,
_display_surface_return_none):
window = UIWindow(pygame.Rect(200, 200, 200, 200), window_display_title="Test Window",
Expand Down

0 comments on commit 465307e

Please sign in to comment.