aboutsummaryrefslogtreecommitdiff
path: root/game/menus/shop
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-06 17:49:39 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-06 17:49:39 +0100
commit07615060da6c211e08a3d7f2e1bb9e99ffc05364 (patch)
treee272fd896ac25aa7ac6d7b4c20dbe5c49a042dce /game/menus/shop
parentce655acf72c5d5be62497dbaac41af7ef49be411 (diff)
moved and updated files
Diffstat (limited to 'game/menus/shop')
-rw-r--r--game/menus/shop/ShopMenuScene.cpp44
-rw-r--r--game/menus/shop/ShopMenuScene.h11
2 files changed, 55 insertions, 0 deletions
diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp
new file mode 100644
index 0000000..c0a5a72
--- /dev/null
+++ b/game/menus/shop/ShopMenuScene.cpp
@@ -0,0 +1,44 @@
+
+#include "ShopMenuScene.h"
+#include "../ButtonSubScene.h"
+#include "api/Camera.h"
+#include "../MenusConfig.h"
+#include "api/Sprite.h"
+#include "../BannerSubScene.h"
+
+using namespace crepe;
+using namespace std;
+
+void ShopMenuScene::load_scene(){
+ GameObject camera_object = this->new_object(CAMERA_NAME);
+ camera_object.add_component<Camera>(ivec2(990, 720), vec2(1100, 800),
+ Camera::Data{
+ .bg_color = Color::RED,
+ });
+ BannerSubScene banner;
+ banner.create(*this,{
+ .banner_title = "SHOP",
+ .banner_title_width = 200,
+ .banner_title_offset = {0,65},
+ });
+ GameObject menu_background = this->new_object("menu_background");
+ menu_background.add_component<Sprite>(
+ Asset("asset/ui/background.png"),
+ Sprite::Data{
+ .sorting_in_layer = STARTING_SORTING_IN_LAYER+0,
+ .size = {1100,860},
+ .position_offset {0},
+ });
+
+ ButtonSubScene button;
+ button.create(*this,ButtonSubScene::Data{
+ .text = "BACK",
+ .text_width = 115,
+ .position = {-400,-350},
+ .script_type = ButtonSubScene::ScriptSelect::MAINMENU,
+ .button_type = ButtonSubScene::ButtonSelect::SMALL,
+ .scale = 0.8
+ });
+}
+
+string ShopMenuScene::get_name() const { return "shopmenu"; }
diff --git a/game/menus/shop/ShopMenuScene.h b/game/menus/shop/ShopMenuScene.h
new file mode 100644
index 0000000..7178372
--- /dev/null
+++ b/game/menus/shop/ShopMenuScene.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#include <crepe/api/Scene.h>
+#include <string>
+
+class ShopMenuScene : public crepe::Scene {
+public:
+ void load_scene();
+
+ std::string get_name() const;
+};