diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 15:33:41 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2025-01-08 15:33:41 +0100 |
commit | ce83df284173cfb4f6e430bf3ed8080ea21204d7 (patch) | |
tree | cb30e6bd44b4cf61ee696b55b46f7b817bf4157a /game/menus/shop/ShopMenuScene.cpp | |
parent | 698628cf1fb1b8a1f68bf6a5672d984bd64be58f (diff) | |
parent | 26fe39ef4e633206a9b202d431c969c66052d2ef (diff) |
Merge branch 'master' into niels/game
Diffstat (limited to 'game/menus/shop/ShopMenuScene.cpp')
-rw-r--r-- | game/menus/shop/ShopMenuScene.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp index d5b5af3..5ada0d3 100644 --- a/game/menus/shop/ShopMenuScene.cpp +++ b/game/menus/shop/ShopMenuScene.cpp @@ -1,13 +1,16 @@ #include "ShopMenuScene.h" +#include "../../Config.h" #include "../BannerSubScene.h" #include "../ButtonSubScene.h" #include "../MenusConfig.h" +#include "types.h" #include "../../Config.h" #include <crepe/api/Camera.h> #include <crepe/api/Sprite.h> +#include <crepe/api/Text.h> using namespace crepe; using namespace std; @@ -51,6 +54,74 @@ void ShopMenuScene::load_scene() { .scale = 0.8 } ); + + GameObject shop_item_bullet = this->new_object("bullet", "shop_item", vec2(-100, 0)); + shop_item_bullet.add_component<Sprite>( + Asset("asset/other_effects/effect_rocketmgshell_TVOS.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 100}, + .position_offset = {0, 0}, + } + ); + shop_item_bullet.add_component<Text>( + vec2 {100, 50}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::WHITE, + }, + vec2 {0, -75}, "BULLETS" + ); + shop_item_bullet.add_component<Sprite>( + Asset("asset/ui/buttonCoinsSmall.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 45}, + .position_offset = {25, 75}, + } + ); + shop_item_bullet.add_component<Text>( + vec2 {37.5, 37.5}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::GOLD, + }, + vec2 {-25, 75}, "0" + ); + + GameObject shop_item_bubble = this->new_object("bubble", "shop_item", vec2(100, 0)); + shop_item_bubble.add_component<Sprite>( + Asset("asset/background/aquarium/bubble.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 100}, + .position_offset = {0, 0}, + } + ); + shop_item_bubble.add_component<Text>( + vec2 {100, 50}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::WHITE, + }, + vec2 {0, -75}, "BUBBLE" + ); + shop_item_bubble.add_component<Sprite>( + Asset("asset/ui/buttonCoinsSmall.png"), + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {0, 45}, + .position_offset = {45, 75}, + } + ); + shop_item_bubble.add_component<Text>( + vec2 {100, 25}, FONT, + Text::Data { + .world_space = true, + .text_color = Color::GOLD, + }, + vec2 {-25, 75}, "1000" + ); } string ShopMenuScene::get_name() const { return SHOP_SCENE; } |