From 93aa94921e027e05d7cb9908305af225c64b1ff2 Mon Sep 17 00:00:00 2001 From: Max-001 Date: Wed, 8 Jan 2025 09:03:30 +0100 Subject: Make format --- game/menus/BannerSubScene.cpp | 53 ++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 23 deletions(-) (limited to 'game/menus/BannerSubScene.cpp') diff --git a/game/menus/BannerSubScene.cpp b/game/menus/BannerSubScene.cpp index ea43c69..006a829 100644 --- a/game/menus/BannerSubScene.cpp +++ b/game/menus/BannerSubScene.cpp @@ -3,40 +3,47 @@ #include "../Config.h" -#include #include +#include #include using namespace crepe; using namespace std; -void BannerSubScene::create(Scene & scn,const Data & data){ - GameObject menu_banner = scn.new_object("menu_banner","", {0,-414}); +void BannerSubScene::create(Scene & scn, const Data & data) { + GameObject menu_banner = scn.new_object("menu_banner", "", {0, -414}); menu_banner.add_component( Asset("asset/ui/settings_container/top_middle_setting.png"), - Sprite::Data{ - .sorting_in_layer = STARTING_SORTING_IN_LAYER+1, - .size = {1100,88}, - }); + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {1100, 88}, + } + ); menu_banner.add_component( Asset("asset/ui/settings_container/top_2_middle_setting.png"), - Sprite::Data{ - .sorting_in_layer = STARTING_SORTING_IN_LAYER+1, - .size = {1100,66}, - .position_offset {0,77}, - }); + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .size = {1100, 66}, + .position_offset {0, 77}, + } + ); menu_banner.add_component( Asset("asset/ui/settings_container/banner_bottom.png"), - Sprite::Data{ - .sorting_in_layer = STARTING_SORTING_IN_LAYER+1, - .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( size, FONT, Text::Data{ - .world_space = true, - .text_color = Color::WHITE, - }, data.banner_title_offset + FONTOFFSET, data.banner_title); + Sprite::Data { + .sorting_in_layer = STARTING_SORTING_IN_LAYER + 1, + .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( + size, FONT, + Text::Data { + .world_space = true, + .text_color = Color::WHITE, + }, + data.banner_title_offset + FONTOFFSET, data.banner_title + ); } -- cgit v1.2.3