Give KO reactions an animated arcade overlay

This commit is contained in:
Peter Stockings
2026-10-05 15:52:30 +11:00
parent f3eeda71e6
commit b5f09a9e9e
3 changed files with 101 additions and 3 deletions
+18
View File
@@ -75,6 +75,24 @@ def test_reactions_work_with_chat_popout_focused(room, qtbot):
popout.close()
def test_arcade_ko_covers_video_then_restores_strip(room, qtbot):
room.activateWindow()
qtbot.wait(30)
room.handle_fight_reaction({'kind': 'ko', 'position': 0})
overlay = room.ringside_strip
assert overlay.size() == room.video_frame.size()
assert overlay.panel.isHidden()
assert not overlay.ko_canvas.isHidden()
assert overlay.ko_animation.state() == overlay.ko_animation.State.Running
room.handle_fight_reaction({'kind': 'bell', 'position': 0})
assert overlay.ko_canvas.isHidden()
assert not overlay.panel.isHidden()
assert overlay.width() <= 540
assert overlay.height() < room.video_frame.height()
room.cleanup()
assert overlay.ko_animation.state() == overlay.ko_animation.State.Stopped
def test_sound_is_enabled_by_default_and_background_effects_are_suppressed(room, qtbot, monkeypatch):
play = Mock()
monkeypatch.setattr(room, '_play_reaction_sound', play)