Changement de la couleur du texte

This commit is contained in:
CoCo_Sol 2023-10-29 23:57:37 +01:00
parent bfb1fbcef4
commit af5802c4db

View file

@ -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"),