From 3374d3dd5164231bc4f8cb2943c514e38a2dd0b4 Mon Sep 17 00:00:00 2001 From: Tipragot Date: Sun, 5 Nov 2023 09:01:53 +0100 Subject: [PATCH] Ajout de l'order --- src/plugins/dialog.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/plugins/dialog.py b/src/plugins/dialog.py index e099b19..3bc5986 100644 --- a/src/plugins/dialog.py +++ b/src/plugins/dialog.py @@ -45,7 +45,12 @@ def spawn_all_dialogs( pygame.mixer.Sound(f"assets/dialogs/{name}/{i}.mp3"), callback=lambda world, entity: entity.destroy(), ), - Text(text, position=Vec2(render.WIDTH / 2, height), origin=Vec2(0.5)), + Text( + text, + position=Vec2(render.WIDTH / 2, height), + order=1000, + origin=Vec2(0.5), + ), ) yield __spawn_all_condition(entity) yield wait(waiting_between) @@ -73,7 +78,12 @@ def spawn_dialog( pygame.mixer.Sound(f"assets/dialogs/{name}/{index}.mp3"), callback=lambda world, entity: __sound_end(world, entity, callback), ), - Text(text, position=Vec2(render.WIDTH / 2, height), origin=Vec2(0.5)), + Text( + text, + position=Vec2(render.WIDTH / 2, height), + order=1000, + origin=Vec2(0.5), + ), )