aboutsummaryrefslogtreecommitdiff
path: root/game/mainmenu/BannerSubScene.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-03 16:12:14 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-03 16:12:14 +0100
commitf18635b6c73f753bd38343684134430a5ce9b22c (patch)
treee838c01914244c517b17d6359241a8cbf78ac6ae /game/mainmenu/BannerSubScene.cpp
parentb82c302e2eb5044ae966230a50aae9bdb698cf8c (diff)
added coins random and menu banner update
Diffstat (limited to 'game/mainmenu/BannerSubScene.cpp')
-rw-r--r--game/mainmenu/BannerSubScene.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/game/mainmenu/BannerSubScene.cpp b/game/mainmenu/BannerSubScene.cpp
index 0f4f075..8de5711 100644
--- a/game/mainmenu/BannerSubScene.cpp
+++ b/game/mainmenu/BannerSubScene.cpp
@@ -9,7 +9,7 @@
using namespace crepe;
using namespace std;
-void BannerSubScene::create(Scene & scn){
+void BannerSubScene::create(Scene & scn,const Data & data){
GameObject menu_banner = scn.new_object("menu_banner","", {0,-414});
menu_banner.add_component<Sprite>(
Asset("asset/ui/settings_container/top_middle_setting.png"),
@@ -31,5 +31,9 @@ void BannerSubScene::create(Scene & scn){
.size = {1100,7},
.position_offset {0,113},
});
+ crepe::vec2 size = {data.banner_title_width,(data.banner_title_width/data.banner_title.size())*2};
+ menu_banner.add_component<Text>(size,data.banner_title_offset + MainMenuConfig::FONTOFFSET, MainMenuConfig::FONT, Text::Data{
+ .text_color = Color::WHITE,
+ }, data.banner_title);
}