diff --git a/src/logic/shop/mainui.rs b/src/logic/shop/mainui.rs index 192f516..8de60aa 100644 --- a/src/logic/shop/mainui.rs +++ b/src/logic/shop/mainui.rs @@ -27,7 +27,7 @@ pub fn render_shop( Color::BLACK, ); - // Items + // Stun Gun let stun_gun_buy_ui = ShopItemUi::new( "Stun Gun".to_string(), match &game_core.player.inventory.stun_gun { @@ -48,6 +48,69 @@ pub fn render_shop( game_core.player.coins >= stun_gun_buy_ui.cost, ); + // Flippers + let flippers_buy_ui = ShopItemUi::new( + "Flippers".to_string(), + match &game_core.player.inventory.flippers { + Some(x) => x.level, + None => 0, + }, + 3, + 10, + ); + flippers_buy_ui.render( + draw_handle, + Rectangle { + x: bounds.x + 5.0, + y: bounds.y + 160.0, + width: bounds.width - 10.0, + height: 50.0, + }, + game_core.player.coins >= flippers_buy_ui.cost, + ); + + // Flashlight + let flashlight_buy_ui = ShopItemUi::new( + "Flashlight".to_string(), + match &game_core.player.inventory.flashlight { + Some(x) => x.level, + None => 0, + }, + 3, + 10, + ); + flashlight_buy_ui.render( + draw_handle, + Rectangle { + x: bounds.x + 5.0, + y: bounds.y + 220.0, + width: bounds.width - 10.0, + height: 50.0, + }, + game_core.player.coins >= flashlight_buy_ui.cost, + ); + + // Air Bag + let air_bag_buy_ui = ShopItemUi::new( + "Bag of Air".to_string(), + match &game_core.player.inventory.air_bag { + Some(x) => x.level, + None => 0, + }, + 3, + 10, + ); + air_bag_buy_ui.render( + draw_handle, + Rectangle { + x: bounds.x + 5.0, + y: bounds.y + 280.0, + width: bounds.width - 10.0, + height: 50.0, + }, + game_core.player.coins >= air_bag_buy_ui.cost, + ); + return None; } diff --git a/src/logic/shop/mod.rs b/src/logic/shop/mod.rs index 96f44f7..d025468 100644 --- a/src/logic/shop/mod.rs +++ b/src/logic/shop/mod.rs @@ -92,7 +92,7 @@ impl Screen for ShopScreen { x: win_width as f32 - (win_width as f32 / 2.0) - 130.0, y: 10.0, width: 120.0, - height: 120.0, + height: 30.0, }; // Render the shop UI