From 3370b924be3fbe5c58880fcbcaf51611f78890ae Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Sat, 2 Oct 2021 19:18:33 -0400 Subject: [PATCH] border the menu screens --- game/src/scenes/how_to_play_screen.rs | 2 ++ game/src/scenes/main_menu_screen.rs | 3 +++ game/src/scenes/options_screen.rs | 2 ++ 3 files changed, 7 insertions(+) diff --git a/game/src/scenes/how_to_play_screen.rs b/game/src/scenes/how_to_play_screen.rs index 1537345..eff189b 100644 --- a/game/src/scenes/how_to_play_screen.rs +++ b/game/src/scenes/how_to_play_screen.rs @@ -71,9 +71,11 @@ impl ScreenSpaceRender for HowToPlayScreen { raylib: &mut crate::utilities::non_ref_raylib::HackedRaylibHandle, config: &GameConfig ) { + let screen_size = raylib.get_screen_size(); // Render the background raylib.clear_background(Color::BLACK); + raylib.draw_rectangle_lines(0, 0, screen_size.x as i32, screen_size.y as i32, config.colors.white); let screen_size = raylib.get_screen_size(); diff --git a/game/src/scenes/main_menu_screen.rs b/game/src/scenes/main_menu_screen.rs index 1ee95a6..80a2fe2 100644 --- a/game/src/scenes/main_menu_screen.rs +++ b/game/src/scenes/main_menu_screen.rs @@ -105,8 +105,11 @@ impl ScreenSpaceRender for MainMenuScreen { raylib: &mut crate::utilities::non_ref_raylib::HackedRaylibHandle, config: &GameConfig, ) { + let screen_size = raylib.get_screen_size(); + // Render the background raylib.clear_background(Color::BLACK); + raylib.draw_rectangle_lines(0, 0, screen_size.x as i32, screen_size.y as i32, config.colors.white); // Calculate the logo position let screen_size = raylib.get_screen_size(); diff --git a/game/src/scenes/options_screen.rs b/game/src/scenes/options_screen.rs index bf51602..a8a952e 100644 --- a/game/src/scenes/options_screen.rs +++ b/game/src/scenes/options_screen.rs @@ -71,9 +71,11 @@ impl ScreenSpaceRender for OptionsScreen { raylib: &mut crate::utilities::non_ref_raylib::HackedRaylibHandle, config: &GameConfig ) { + let screen_size = raylib.get_screen_size(); // Render the background raylib.clear_background(Color::BLACK); + raylib.draw_rectangle_lines(0, 0, screen_size.x as i32, screen_size.y as i32, config.colors.white); let screen_size = raylib.get_screen_size();