aboutsummaryrefslogtreecommitdiff
path: root/game/menus/mainmenu
diff options
context:
space:
mode:
Diffstat (limited to 'game/menus/mainmenu')
-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.cpp4
-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
5 files changed, 11 insertions, 11 deletions
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;