Fix names/positions

This commit is contained in:
Tipragot 2023-11-03 12:42:15 +01:00
parent dc6f4136d8
commit dd0ef63115

View file

@ -21,42 +21,6 @@ LINES = 3
COLUMNS = 5
SPACING = 200
NAMES = [
"Classique",
"Menteur",
"Tricheur",
"Histoire",
"Je t'aime",
"Hello",
"Cheval",
"Defender",
"Dansons",
"Secrets",
"Edmond",
"Mon Amour",
"Melatonin",
"Films",
"Cinéma",
]
POSITIONS = [
Vec2(1348, 903),
Vec2(988, 903),
Vec2(808, 737),
Vec2(628, 903),
Vec2(268, 903),
Vec2(1168, 405),
Vec2(988, 571),
Vec2(808, 405),
Vec2(448, 737),
Vec2(268, 405),
Vec2(1348, 239),
Vec2(988, 239),
Vec2(628, 73),
Vec2(448, 239),
Vec2(88, 239),
]
class Directory:
"""
@ -142,6 +106,42 @@ def __initialize(world: World):
"""
assets = world[Assets]
# Définition des noms et positions des dossiers
names = [
"Classique",
"Menteur",
"Tricheur",
"Histoire",
"Je t'aime",
"Hello",
"Cheval",
"Defender",
"Dansons",
"Secrets",
"Edmond",
"Mon Amour",
"Melatonin",
"Films",
"Cinéma",
]
positions = [
Vec2(1348, 903),
Vec2(988, 903),
Vec2(808, 737),
Vec2(628, 903),
Vec2(268, 903),
Vec2(1168, 405),
Vec2(988, 571),
Vec2(808, 405),
Vec2(448, 737),
Vec2(268, 405),
Vec2(1348, 239),
Vec2(988, 239),
Vec2(628, 73),
Vec2(448, 239),
Vec2(88, 239),
]
# Ajout du fond
world.new_entity().set(Sprite(assets.get_texture("background")))
@ -150,8 +150,8 @@ def __initialize(world: World):
for y in range(LINES):
for x in range(COLUMNS):
# Récupération du nom et de la position
position = POSITIONS.pop()
name = NAMES.pop()
position = positions.pop()
name = names.pop()
# Création de l'entité du dossier
entity = world.new_entity()