From 62430b3dca0e36a39e8853b2ef036994158bb746 Mon Sep 17 00:00:00 2001 From: Marcelo Geldres Date: Sun, 3 Apr 2022 21:39:52 -0400 Subject: [PATCH] Styling to the Labels --- game/game_logic/src/scenes/main_menu.rs | 36 +++++++++++++++++++----- game/game_logic/src/scenes/pause_menu.rs | 6 ++-- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/game/game_logic/src/scenes/main_menu.rs b/game/game_logic/src/scenes/main_menu.rs index 3ff370e9..ffadfa33 100644 --- a/game/game_logic/src/scenes/main_menu.rs +++ b/game/game_logic/src/scenes/main_menu.rs @@ -102,11 +102,16 @@ impl MainMenu { // TODO: Render stuff //Label Colors - let label_colors = Color::BLACK; - let label_shadow_colors = Color::GRAY; + let label_colors = Color::new(123, 201, 244, 255); + let label_shadow_colors = Color::new(82, 135, 195, 255); //Initial Option placeholder words in the main menu + draw.draw_text(&constants.game_name, 103, 93, 60, label_shadow_colors); + draw.draw_text(&constants.game_name, 97, 87, 60, label_shadow_colors); draw.draw_text(&constants.game_name, 100, 90, 60, label_colors); + + + //Options draw.draw_text("Start Game", 100, 190, 34, label_colors); draw.draw_text("Credits", 100, 410, 34, label_colors); draw.draw_text("Leaderboard", 100, 470, 34, label_colors); @@ -141,7 +146,7 @@ impl MainMenu { } //Volume Controller - //Color Pallete Variables + //Colors Pallete Variables let tile_color = Color::new(158, 93, 65, 255); let outer_ring_color = Color::new(255, 191, 113, 255); let inner_ring_color = Color::new(244, 203, 184, 255); @@ -390,9 +395,10 @@ impl MainMenu { constants: &ProjectConstants, audio_subsystem: &mut RaylibAudio, ) -> MenuStateSignal { + //Colors - let label_colors = Color::BLACK; - let label_shadow_colors = Color::GRAY; + let label_colors = Color::new(123, 201, 244, 255); + let label_shadow_colors = Color::new(82, 135, 195, 255); let credits_colours = Color::new(82, 135, 195, 255); let mut draw = raylib.begin_drawing(rl_thread); @@ -409,6 +415,8 @@ impl MainMenu { let window_height = draw.get_screen_height(); let window_width = draw.get_screen_width(); + draw.draw_text("Credits", (window_width / 2) - 97, 27, 55, label_shadow_colors); + draw.draw_text("Credits", (window_width / 2) - 103, 33, 55, label_shadow_colors); draw.draw_text("Credits", (window_width / 2) - 100, 30, 55, label_colors); draw.draw_text( @@ -506,8 +514,8 @@ impl MainMenu { audio_subsystem: &mut RaylibAudio, ) -> MenuStateSignal { //Colors - let label_colors = Color::BLACK; - let label_shadow_colors = Color::GRAY; + let label_colors = Color::new(123, 201, 244, 255); + let label_shadow_colors = Color::new(82, 135, 195, 255); let mut draw = raylib.begin_drawing(rl_thread); draw.clear_background(Color::WHITE); @@ -524,6 +532,20 @@ impl MainMenu { draw.draw_text(&mouse_y.to_string(), 70, 5, 20, Color::BLACK); let window_width = draw.get_screen_width(); + draw.draw_text( + "Leaderboard", + (window_width / 2) - 173, + 27, + 55, + label_shadow_colors, + ); + draw.draw_text( + "Leaderboard", + (window_width / 2) - 179, + 33, + 55, + label_shadow_colors, + ); draw.draw_text( "Leaderboard", (window_width / 2) - 176, diff --git a/game/game_logic/src/scenes/pause_menu.rs b/game/game_logic/src/scenes/pause_menu.rs index c5069e8e..54573b2f 100644 --- a/game/game_logic/src/scenes/pause_menu.rs +++ b/game/game_logic/src/scenes/pause_menu.rs @@ -54,8 +54,8 @@ impl PauseMenu { draw.clear_background(Color::WHITE); //Color Pallette - let label_colors = Color::BLACK; - let label_shadow_colors = Color::GRAY; + let label_colors = Color::new(123, 201, 244, 255); + let label_shadow_colors = Color::new(82, 135, 195, 255); //Obtain mouse position let mouse_x = draw.get_mouse_x(); @@ -78,6 +78,8 @@ impl PauseMenu { } // Title + draw.draw_text("Paused", 97, 87, 60, label_shadow_colors); + draw.draw_text("Paused", 103, 93, 60, label_shadow_colors); draw.draw_text("Paused", 100, 90, 60, label_colors); //Return to Main Menu button variables