aboutsummaryrefslogtreecommitdiff
path: root/game/menus/shop
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2025-01-08 09:03:30 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2025-01-08 09:03:30 +0100
commit93aa94921e027e05d7cb9908305af225c64b1ff2 (patch)
tree8beacc3b049a7150aa2cb5af501b158d11158a9e /game/menus/shop
parent1a61140ab5be8ede0aa19644cd29fb6770261f91 (diff)
Make format
Diffstat (limited to 'game/menus/shop')
-rw-r--r--game/menus/shop/ShopMenuScene.cpp59
1 files changed, 34 insertions, 25 deletions
diff --git a/game/menus/shop/ShopMenuScene.cpp b/game/menus/shop/ShopMenuScene.cpp
index 6c88dc8..21e3f02 100644
--- a/game/menus/shop/ShopMenuScene.cpp
+++ b/game/menus/shop/ShopMenuScene.cpp
@@ -1,9 +1,9 @@
#include "ShopMenuScene.h"
+#include "../BannerSubScene.h"
#include "../ButtonSubScene.h"
#include "../MenusConfig.h"
-#include "../BannerSubScene.h"
#include <crepe/api/Camera.h>
#include <crepe/api/Sprite.h>
@@ -11,36 +11,45 @@
using namespace crepe;
using namespace std;
-void ShopMenuScene::load_scene(){
+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,
- });
+ 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},
- });
+ 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},
- });
-
+ 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::BACK,
- .scale = 0.8
- });
+ button.create(
+ *this,
+ ButtonSubScene::Data {
+ .text = "BACK",
+ .text_width = 115,
+ .position = {-400, -350},
+ .script_type = ButtonSubScene::ScriptSelect::MAINMENU,
+ .button_type = ButtonSubScene::ButtonSelect::BACK,
+ .scale = 0.8
+ }
+ );
}
string ShopMenuScene::get_name() const { return SHOP_SCENE; }