#include "ButtonSubScene.h" #include "ButtonScript.h" #include "ButtonStartScript.h" #include "MainMenuConfig.h" #include #include #include #include #include using namespace crepe; using namespace std; void ButtonSubScene::create(Scene & scn,const Data & data){ GameObject button_object = scn.new_object("button","",data.position,0,1); this->large_btn_overlay(button_object); this->btn_text_middle(button_object,data.text,data.text_offset,data.text_size); this->set_script(button_object,data.script); } void ButtonSubScene::large_btn_overlay(crepe::GameObject & button_object){ button_object.add_component(Asset("asset/ui/buttonBacking.png"),Sprite::Data{ .sorting_in_layer = MainMenuConfig::STARTING_SORTING_IN_LAYER+1, .size = MainMenuConfig::LARGE_OVERLAY_SIZE, }); button_object.add_component