diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-07 22:07:32 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-07 22:07:32 +0100 |
commit | f2028cd4def82f5f6a52392ff011f6d0fa4aa315 (patch) | |
tree | 149f7ff853c22cc5d7ce5f2917fbc277fa419b33 /game/menus | |
parent | 055ca804ebe27ea77f1c09079f119a0526426e70 (diff) |
correct naming
Diffstat (limited to 'game/menus')
-rw-r--r-- | game/menus/ButtonNextMainMenuSubScript.cpp (renamed from game/menus/ButtonNextMainMenuScript.cpp) | 6 | ||||
-rw-r--r-- | game/menus/ButtonNextMainMenuSubScript.h (renamed from game/menus/ButtonSetMainMenuScript.h) | 2 | ||||
-rw-r--r-- | game/menus/ButtonSetMainMenuSubScript.cpp (renamed from game/menus/ButtonSetMainMenuScript.cpp) | 6 | ||||
-rw-r--r-- | game/menus/ButtonSetMainMenuSubScript.h (renamed from game/menus/ButtonNextMainMenuScript.h) | 2 | ||||
-rw-r--r-- | game/menus/ButtonSetShopSubScript.cpp (renamed from game/menus/ButtonSetShopScript.cpp) | 6 | ||||
-rw-r--r-- | game/menus/ButtonSetShopSubScript.h (renamed from game/menus/ButtonSetShopScript.h) | 2 | ||||
-rw-r--r-- | game/menus/ButtonSubScene.cpp | 16 | ||||
-rw-r--r-- | game/menus/mainmenu/ButtonTransitionPreviewSubScript.cpp (renamed from game/menus/mainmenu/ButtonTransitionPreviewScript.cpp) | 8 | ||||
-rw-r--r-- | game/menus/mainmenu/ButtonTransitionPreviewSubScript.h (renamed from game/menus/mainmenu/ButtonTransitionPreviewScript.h) | 2 | ||||
-rw-r--r-- | game/menus/mainmenu/MainMenuScene.cpp | 4 | ||||
-rw-r--r-- | game/menus/mainmenu/TransitionStartSubScript.cpp (renamed from game/menus/mainmenu/TransitionStartScript.cpp) | 6 | ||||
-rw-r--r-- | game/menus/mainmenu/TransitionStartSubScript.h (renamed from game/menus/mainmenu/TransitionStartScript.h) | 2 |
12 files changed, 31 insertions, 31 deletions
diff --git a/game/menus/ButtonNextMainMenuScript.cpp b/game/menus/ButtonNextMainMenuSubScript.cpp index 7ebb2cf..d6e315e 100644 --- a/game/menus/ButtonNextMainMenuScript.cpp +++ b/game/menus/ButtonNextMainMenuSubScript.cpp @@ -1,4 +1,4 @@ -#include "ButtonNextMainMenuScript.h" +#include "ButtonNextMainMenuSubScript.h" #include "MenusConfig.h" #include "ValueBroker.h" @@ -12,12 +12,12 @@ using namespace crepe; using namespace std; -void ButtonNextMainMenuScript::init(){ +void ButtonNextMainMenuSubScript::init(){ IButtonScript::init(); this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); }); } -bool ButtonNextMainMenuScript::on_button_press(const ButtonPressEvent& e){ +bool ButtonNextMainMenuSubScript::on_button_press(const ButtonPressEvent& e){ RefVector<AudioSource> audios = this->get_components_by_name<AudioSource>("background_music"); for (AudioSource & audio : audios) { diff --git a/game/menus/ButtonSetMainMenuScript.h b/game/menus/ButtonNextMainMenuSubScript.h index 13a33bf..cb5c8ca 100644 --- a/game/menus/ButtonSetMainMenuScript.h +++ b/game/menus/ButtonNextMainMenuSubScript.h @@ -4,7 +4,7 @@ #include <crepe/api/Script.h> -class ButtonSetMainMenuScript : public IButtonScript { +class ButtonNextMainMenuSubScript : public IButtonScript { public: void init() override; bool on_button_press(const crepe::ButtonPressEvent& e); diff --git a/game/menus/ButtonSetMainMenuScript.cpp b/game/menus/ButtonSetMainMenuSubScript.cpp index 1e4179c..2181f44 100644 --- a/game/menus/ButtonSetMainMenuScript.cpp +++ b/game/menus/ButtonSetMainMenuSubScript.cpp @@ -1,4 +1,4 @@ -#include "ButtonSetMainMenuScript.h" +#include "ButtonSetMainMenuSubScript.h" #include "MenusConfig.h" #include <crepe/api/AudioSource.h> @@ -7,12 +7,12 @@ using namespace crepe; using namespace std; -void ButtonSetMainMenuScript::init(){ +void ButtonSetMainMenuSubScript::init(){ IButtonScript::init(); this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); }); } -bool ButtonSetMainMenuScript::on_button_press(const ButtonPressEvent& e){ +bool ButtonSetMainMenuSubScript::on_button_press(const ButtonPressEvent& e){ RefVector<AudioSource> audios = this->get_components_by_name<AudioSource>("background_music"); this->set_next_scene(MAINMENU_SCENE); diff --git a/game/menus/ButtonNextMainMenuScript.h b/game/menus/ButtonSetMainMenuSubScript.h index b9f70b3..40e2c11 100644 --- a/game/menus/ButtonNextMainMenuScript.h +++ b/game/menus/ButtonSetMainMenuSubScript.h @@ -4,7 +4,7 @@ #include <crepe/api/Script.h> -class ButtonNextMainMenuScript : public IButtonScript { +class ButtonSetMainMenuSubScript : public IButtonScript { public: void init() override; bool on_button_press(const crepe::ButtonPressEvent& e); diff --git a/game/menus/ButtonSetShopScript.cpp b/game/menus/ButtonSetShopSubScript.cpp index 88639bd..67005a7 100644 --- a/game/menus/ButtonSetShopScript.cpp +++ b/game/menus/ButtonSetShopSubScript.cpp @@ -1,15 +1,15 @@ -#include "ButtonSetShopScript.h" +#include "ButtonSetShopSubScript.h" #include "MenusConfig.h" using namespace crepe; using namespace std; -void ButtonSetShopScript::init(){ +void ButtonSetShopSubScript::init(){ IButtonScript::init(); this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); }); } -bool ButtonSetShopScript::on_button_press(const ButtonPressEvent& e){ +bool ButtonSetShopSubScript::on_button_press(const ButtonPressEvent& e){ this->set_next_scene(SHOP_SCENE); return false; } diff --git a/game/menus/ButtonSetShopScript.h b/game/menus/ButtonSetShopSubScript.h index 434abc0..8edc7bf 100644 --- a/game/menus/ButtonSetShopScript.h +++ b/game/menus/ButtonSetShopSubScript.h @@ -4,7 +4,7 @@ #include <crepe/api/Script.h> -class ButtonSetShopScript : public IButtonScript { +class ButtonSetShopSubScript : public IButtonScript { public: void init() override; bool on_button_press(const crepe::ButtonPressEvent& e); diff --git a/game/menus/ButtonSubScene.cpp b/game/menus/ButtonSubScene.cpp index ea0df8a..5f7f2b0 100644 --- a/game/menus/ButtonSubScene.cpp +++ b/game/menus/ButtonSubScene.cpp @@ -1,11 +1,11 @@ #include "ButtonSubScene.h" -#include "ButtonNextMainMenuScript.h" -#include "ButtonSetMainMenuScript.h" -#include "ButtonSetShopScript.h" +#include "ButtonNextMainMenuSubScript.h" +#include "ButtonSetMainMenuSubScript.h" +#include "ButtonSetShopSubScript.h" #include "IButtonScript.h" #include "MenusConfig.h" -#include "mainmenu/ButtonTransitionPreviewScript.h" +#include "mainmenu/ButtonTransitionPreviewSubScript.h" #include "../Config.h" @@ -39,16 +39,16 @@ void ButtonSubScene::btn_text(crepe::GameObject & button_object,const Data & dat void ButtonSubScene::set_script(crepe::GameObject & button_object,const Data & data){ switch (data.script_type) { case ScriptSelect::PREVIEW: - button_object.add_component<BehaviorScript>().set_script<ButtonTransitionPreviewScript>(); + button_object.add_component<BehaviorScript>().set_script<ButtonTransitionPreviewSubScript>(); break; case ScriptSelect::SHOP: - button_object.add_component<BehaviorScript>().set_script<ButtonSetShopScript>(); + button_object.add_component<BehaviorScript>().set_script<ButtonSetShopSubScript>(); break; case ScriptSelect::MAINMENU: - button_object.add_component<BehaviorScript>().set_script<ButtonSetMainMenuScript>(); + button_object.add_component<BehaviorScript>().set_script<ButtonSetMainMenuSubScript>(); break; case ScriptSelect::NEXT: - button_object.add_component<BehaviorScript>().set_script<ButtonNextMainMenuScript>(); + button_object.add_component<BehaviorScript>().set_script<ButtonNextMainMenuSubScript>(); break; case ScriptSelect::NONE: button_object.add_component<BehaviorScript>().set_script<IButtonScript>(); diff --git a/game/menus/mainmenu/ButtonTransitionPreviewScript.cpp b/game/menus/mainmenu/ButtonTransitionPreviewSubScript.cpp index 084d02b..8c055ec 100644 --- a/game/menus/mainmenu/ButtonTransitionPreviewScript.cpp +++ b/game/menus/mainmenu/ButtonTransitionPreviewSubScript.cpp @@ -1,21 +1,21 @@ -#include "ButtonTransitionPreviewScript.h" +#include "ButtonTransitionPreviewSubScript.h" #include "../MenusConfig.h" using namespace crepe; using namespace std; -void ButtonTransitionPreviewScript::init(){ +void ButtonTransitionPreviewSubScript::init(){ IButtonScript::init(); this->subscribe<ButtonPressEvent>([this](const ButtonPressEvent& e) { return this->on_button_press(e); }); } -bool ButtonTransitionPreviewScript::on_button_press(const ButtonPressEvent& e){ +bool ButtonTransitionPreviewSubScript::on_button_press(const ButtonPressEvent& e){ if(!this->transition) this->transition = true; return false; } -const char* ButtonTransitionPreviewScript::get_scene_name() const { +const char* ButtonTransitionPreviewSubScript::get_scene_name() const { // Provide the next scene defined in MainMenuConfig return PREVIEW_SCENE; } diff --git a/game/menus/mainmenu/ButtonTransitionPreviewScript.h b/game/menus/mainmenu/ButtonTransitionPreviewSubScript.h index 5973dbf..6e6b0b2 100644 --- a/game/menus/mainmenu/ButtonTransitionPreviewScript.h +++ b/game/menus/mainmenu/ButtonTransitionPreviewSubScript.h @@ -4,7 +4,7 @@ #include "../IButtonScript.h" -class ButtonTransitionPreviewScript : public ITransitionScript, public IButtonScript { +class ButtonTransitionPreviewSubScript : public ITransitionScript, public IButtonScript { public: void init() override; bool on_button_press(const crepe::ButtonPressEvent& e); diff --git a/game/menus/mainmenu/MainMenuScene.cpp b/game/menus/mainmenu/MainMenuScene.cpp index 15cf6d5..e0dfbee 100644 --- a/game/menus/mainmenu/MainMenuScene.cpp +++ b/game/menus/mainmenu/MainMenuScene.cpp @@ -1,6 +1,6 @@ #include "MainMenuScene.h" -#include "TransitionStartScript.h" +#include "TransitionStartSubScript.h" #include "MainMenuConfig.h" #include "../ButtonSubScene.h" @@ -29,7 +29,7 @@ void MainMenuScene::load_scene(){ Camera::Data{ .bg_color = Color::RED, }); - camera_object.add_component<BehaviorScript>().set_script<TransitionStartScript>(); + camera_object.add_component<BehaviorScript>().set_script<TransitionStartSubScript>(); //Button menu diff --git a/game/menus/mainmenu/TransitionStartScript.cpp b/game/menus/mainmenu/TransitionStartSubScript.cpp index 9b395de..6ad4673 100644 --- a/game/menus/mainmenu/TransitionStartScript.cpp +++ b/game/menus/mainmenu/TransitionStartSubScript.cpp @@ -1,15 +1,15 @@ -#include "TransitionStartScript.h" +#include "TransitionStartSubScript.h" #include "../MenusConfig.h" using namespace crepe; using namespace std; -void TransitionStartScript::fixed_update(crepe::duration_t dt){ +void TransitionStartSubScript::fixed_update(crepe::duration_t dt){ if(this->get_key_state(Keycode::ENTER) && this->transition == false) this->transition = true; } -const char* TransitionStartScript::get_scene_name() const { +const char* TransitionStartSubScript::get_scene_name() const { // Provide the next scene defined in MainMenuConfig return START_SCENE; } diff --git a/game/menus/mainmenu/TransitionStartScript.h b/game/menus/mainmenu/TransitionStartSubScript.h index c6df1b9..b41360d 100644 --- a/game/menus/mainmenu/TransitionStartScript.h +++ b/game/menus/mainmenu/TransitionStartSubScript.h @@ -2,7 +2,7 @@ #include "ITransitionScript.h" -class TransitionStartScript : public ITransitionScript { +class TransitionStartSubScript : public ITransitionScript { public: void fixed_update(crepe::duration_t dt) override; const char* get_scene_name() const override; |