aboutsummaryrefslogtreecommitdiff
path: root/game/menus/shop/ShopMenuScene.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-08 15:44:51 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-08 15:44:51 +0100
commit94e2988cc8c42e83a4b7b858c48458f997130963 (patch)
tree633abef48dc65e170b2c184ec68beb4154fcdb2a /game/menus/shop/ShopMenuScene.cpp
parent12cf43dd062f41af226e0ac038b2f2838391015f (diff)
parent26fe39ef4e633206a9b202d431c969c66052d2ef (diff)
merge w/ master
Diffstat (limited to 'game/menus/shop/ShopMenuScene.cpp')
-rw-r--r--game/menus/shop/ShopMenuScene.cpp70
1 files changed, 70 insertions, 0 deletions
diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp
index d4542ba..d1ea81d 100644
--- a/game/menus/shop/ShopMenuScene.cpp
+++ b/game/menus/shop/ShopMenuScene.cpp
@@ -5,9 +5,11 @@
#include "../BannerSubScene.h"
#include "../ButtonSubScene.h"
#include "../MenusConfig.h"
+#include "types.h"
#include <crepe/api/Camera.h>
#include <crepe/api/Sprite.h>
+#include <crepe/api/Text.h>
using namespace crepe;
using namespace std;
@@ -51,6 +53,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; }