can no longer click behind the result screen

This commit is contained in:
Faraphel 2023-02-25 14:11:36 +01:00
parent a3df2f6c2c
commit 0db1f08f71

View file

@ -3,6 +3,7 @@ from typing import TYPE_CHECKING
import pyglet.clock import pyglet.clock
from source.gui import texture, widget from source.gui import texture, widget
from source.gui.event import StopEvent
from source.gui.scene.abc import Scene from source.gui.scene.abc import Scene
if TYPE_CHECKING: if TYPE_CHECKING:
@ -20,11 +21,16 @@ class Result(Scene):
image=texture.Result.Style1.victory if won else texture.Result.Style1.defeat image=texture.Result.Style1.victory if won else texture.Result.Style1.defeat
) )
# TODO: rendre l'image transparente # TODO: rendre l'image transparente si possible
# TODO: empecher les intéractions
from source.gui.scene import MainMenu from source.gui.scene import MainMenu
pyglet.clock.schedule_once(lambda dt: self.window.set_scene(MainMenu), 5.0) pyglet.clock.schedule_once(lambda dt: self.window.set_scene(MainMenu), 5.0)
def on_mouse_press_after(self, x: int, y: int, button: int, modifiers: int):
raise StopEvent()
def on_mouse_motion_after(self, x: int, y: int, button: int, modifiers: int):
raise StopEvent()
def on_draw(self): def on_draw(self):
self.image.draw() self.image.draw()