From 602242c03ebe821bb6df5aa27d831911a2695e05 Mon Sep 17 00:00:00 2001 From: Tipragot Date: Mon, 30 Oct 2023 01:06:32 +0100 Subject: [PATCH] Better cool --- src/scenes/directory_search.py | 36 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/scenes/directory_search.py b/src/scenes/directory_search.py index d233dc1..bb9c1d6 100644 --- a/src/scenes/directory_search.py +++ b/src/scenes/directory_search.py @@ -118,6 +118,8 @@ def __change_folders_speeds(world: World, _e: Entity): """ for entity in world.query(DirectoryPosition, smooth.Speed): entity[smooth.Speed] = smooth.Speed(random.uniform(2.0, 2.5)) + for entity in world.query(TextSize): + entity[TextSize] = TextSize(40) def __remove_folders_speeds(world: World): @@ -163,21 +165,21 @@ def __initialize_world(world: World): ] positions = [ - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), - Position(0, 0), + Position(40 + (7 * 180) + 48, 35 + (5 * 166) + 38), + Position(40 + (5 * 180) + 48, 35 + (5 * 166) + 38), + Position(40 + (4 * 180) + 48, 35 + (4 * 166) + 38), + Position(40 + (3 * 180) + 48, 35 + (5 * 166) + 38), + Position(40 + (1 * 180) + 48, 35 + (5 * 166) + 38), + Position(40 + (6 * 180) + 48, 35 + (2 * 166) + 38), + Position(40 + (5 * 180) + 48, 35 + (3 * 166) + 38), + Position(40 + (4 * 180) + 48, 35 + (2 * 166) + 38), + Position(40 + (2 * 180) + 48, 35 + (4 * 166) + 38), + Position(40 + (1 * 180) + 48, 35 + (2 * 166) + 38), + Position(40 + (7 * 180) + 48, 35 + (1 * 166) + 38), + Position(40 + (5 * 180) + 48, 35 + (1 * 166) + 38), + Position(40 + (3 * 180) + 48, 35 + (0 * 166) + 38), + Position(40 + (2 * 180) + 48, 35 + (1 * 166) + 38), + Position(40 + (0 * 180) + 48, 35 + (1 * 166) + 38), ] for y in range(LINES): @@ -201,7 +203,7 @@ def __initialize_world(world: World): Order(1), Centered(), Text(names.pop()), - TextSize(25), + TextSize(0), DirectoryName(entity), ) @@ -261,6 +263,8 @@ def __move_directories(world: World): # On met à jour la séléction mouse = world[Mouse] for entity in world.query(Hovered, DirectoryPosition): + if Animation in entity: + continue if mouse.is_button_pressed(1): world[SelectedDirectory] = SelectedDirectory(entity, Vec2(mouse.position)) break