Ajout du boutton rejouer dans directory_search #59
BIN
assets/story/directory_search/play_again.png
Normal file
BIN
assets/story/directory_search/play_again.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
assets/story/directory_search/play_again_hover.png
Normal file
BIN
assets/story/directory_search/play_again_hover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
|
@ -10,6 +10,7 @@ from plugins import assets as plugin_assets, render, smooth
|
|||
from plugins.animation import Animation
|
||||
from plugins.coroutine import Coroutine, wait
|
||||
from plugins.click import Clickable, Clicked
|
||||
from plugins.hover import HoveredTexture
|
||||
from plugins.inputs import Held, MousePosition
|
||||
from plugins.assets import Assets
|
||||
from plugins.render import Sprite
|
||||
|
@ -241,11 +242,15 @@ def __spawn_search_directory(world: World):
|
|||
"search_directory_failed",
|
||||
callback=lambda world, _: world.new_entity().set(
|
||||
Sprite(
|
||||
world[Assets].get_texture("restart"),
|
||||
Vec2(render.WIDTH / 2, 900),
|
||||
world[Assets].get_texture("play_again"),
|
||||
Vec2(render.WIDTH / 2, 925),
|
||||
10,
|
||||
origin=Vec2(0.5),
|
||||
),
|
||||
HoveredTexture(
|
||||
world[Assets].get_texture("play_again"),
|
||||
world[Assets].get_texture("play_again_hover"),
|
||||
),
|
||||
Clickable(
|
||||
lambda world, _: world.set(
|
||||
CurrentScene(__new_game_scene())
|
||||
|
|
Loading…
Reference in a new issue