aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-03 19:52:46 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-03 19:52:46 +0100
commit209957a36c19968292032ead5974a695b22ffceb (patch)
treea238b75fb568fbcfde91542933caa27585e636a4
parent41b1941f9ce1b0b31d2d5a3f0b34b0d3d6a0027a (diff)
merge
-rw-r--r--game/mainmenu/BannerSubScene.cpp5
-rw-r--r--game/mainmenu/ButtonSubScene.cpp10
2 files changed, 7 insertions, 8 deletions
diff --git a/game/mainmenu/BannerSubScene.cpp b/game/mainmenu/BannerSubScene.cpp
index 8de5711..ed093aa 100644
--- a/game/mainmenu/BannerSubScene.cpp
+++ b/game/mainmenu/BannerSubScene.cpp
@@ -33,7 +33,6 @@ void BannerSubScene::create(Scene & scn,const Data & data){
});
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);
+ menu_banner.add_component<Text>( size, MainMenuConfig::FONT, Text::Data{.text_color = Color::WHITE,}, data.banner_title_offset + MainMenuConfig::FONTOFFSET, data.banner_title);
+
}
diff --git a/game/mainmenu/ButtonSubScene.cpp b/game/mainmenu/ButtonSubScene.cpp
index 7562128..8890ccc 100644
--- a/game/mainmenu/ButtonSubScene.cpp
+++ b/game/mainmenu/ButtonSubScene.cpp
@@ -4,6 +4,7 @@
#include "ButtonTransitionPreviewScript.h"
#include "IButtonScript.h"
#include "MainMenuConfig.h"
+#include "api/Color.h"
#include <crepe/api/BehaviorScript.h>
#include <crepe/api/Sprite.h>
@@ -25,10 +26,9 @@ void ButtonSubScene::create(Scene & scn,const Data & data){
void ButtonSubScene::btn_text(crepe::GameObject & button_object,const Data & data){
crepe::vec2 size = {data.text_width,(data.text_width/data.text.size())*2};
-
- button_object.add_component<Text>(size,data.text_offset+MainMenuConfig::FONTOFFSET, MainMenuConfig::FONT, Text::Data{
+ button_object.add_component<Text>(size, MainMenuConfig::FONT,Text::Data{
.text_color = Color::WHITE,
- }, data.text);
+ }, data.text_offset+MainMenuConfig::FONTOFFSET, data.text);
}
void ButtonSubScene::set_script(crepe::GameObject & button_object,const Data & data){
@@ -78,7 +78,7 @@ void ButtonSubScene::large_btn_overlay(crepe::GameObject & button_object){
.sorting_in_layer = MainMenuConfig::STARTING_SORTING_IN_LAYER+1,
.size = MainMenuConfig::LARGE_OVERLAY_SIZE,
});
- button_object.add_component<Button>(MainMenuConfig::LARGE_OVERLAY_SIZE,vec2{0,0});
+ button_object.add_component<Button>(MainMenuConfig::LARGE_OVERLAY_SIZE,Button::Data{});
this->btn_color_side(button_object,SIDE_PANEL_OFFSET);
}
@@ -93,7 +93,7 @@ void ButtonSubScene::small_btn_overlay(crepe::GameObject & button_object){
.size = MainMenuConfig::SMALL_OVERLAY_SIZE_LEFT,
.position_offset = {-80,0},
});
- button_object.add_component<Button>(vec2{MainMenuConfig::SMALL_OVERLAY_SIZE_LEFT.x+MainMenuConfig::SMALL_OVERLAY_SIZE_RIGHT.x,MainMenuConfig::SMALL_OVERLAY_SIZE_LEFT.y},vec2{0,0});
+ button_object.add_component<Button>(vec2{MainMenuConfig::SMALL_OVERLAY_SIZE_LEFT.x+MainMenuConfig::SMALL_OVERLAY_SIZE_RIGHT.x,MainMenuConfig::SMALL_OVERLAY_SIZE_LEFT.y},Button::Data{});
}
void ButtonSubScene::btn_color_side(crepe::GameObject & button_object,const vec2 & offset){