From af5802c4db5cc06d8d81e6e07dac7c5d52568241 Mon Sep 17 00:00:00 2001 From: CoCo_Sol Date: Sun, 29 Oct 2023 23:57:37 +0100 Subject: [PATCH] Changement de la couleur du texte --- src/scenes/classique.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/scenes/classique.py b/src/scenes/classique.py index 0c8368d..4765c59 100644 --- a/src/scenes/classique.py +++ b/src/scenes/classique.py @@ -21,6 +21,8 @@ from engine import ( World, ) +COLOR_TEXT = Color(66, 39, 148) + class RandomNumber(int): """ @@ -66,7 +68,7 @@ def __initialize_world(world: World): # Bouton valider/rejouer world.create_entity( - Position(Display.WIDTH / 2, 900), + Position(Display.WIDTH / 2, 875), Order(1), Centered(), Texture("classique/valider.png"), @@ -81,7 +83,7 @@ def __initialize_world(world: World): Centered(), typing.Typing("1234567890"), Text(""), - Color(61, 22, 58), + COLOR_TEXT, TextSize(150), ) @@ -92,24 +94,24 @@ def __initialize_world(world: World): Centered(), TextDialogue(), TextSize(150), - Color(61, 22, 58), + COLOR_TEXT, Text("Devine le nombre..."), ) # Text qui affiche le nombre d'essai world.create_entity( - Position(Display.WIDTH - 700, 100), + Position(Display.WIDTH / 2 - 100, 150), Order(4), TextSize(100), NombreEssaiText(), - Color(61, 22, 58), + COLOR_TEXT, Text("il reste : 7 essais"), ) # Bouton pour revenir au menu world.create_entity( Order(11), - Position(100, 100), + Position(150, 150), Texture("classique/arrow.png"), Clickable(lambda world, _: world[Game].change_scene("menu")), HoveredTexture("classique/arrow_hover.png"),