diff --git a/src/tutorial.cpp b/src/tutorial.cpp index 442f7e5..043cd7f 100644 --- a/src/tutorial.cpp +++ b/src/tutorial.cpp @@ -46,20 +46,23 @@ std::string Tutorial::getText(int num) switch(num) // TODO : translations { case TUTORIAL_WALK : - return (std::string)"Press the [W] button to walk forward and the spacebar to jump."; + return (std::string)"Press the [W] button to walk forward."; + + case TUTORIAL_JUMP : + return (std::string)"Press the spacebar to jump."; - case TUTORIAL_LOOK : - return (std::string)"Move the mouse to look around you."; + /* case TUTORIAL_LOOK : + return (std::string)"Move the mouse to look around you."; */ - case TUTORIAL_DIG_PLACE : - return (std::string)"Use the left click to dig nodes and the right click to place them."; + case TUTORIAL_INVENTORY : + return (std::string)"Press the [I] button to open your inventory\nand the [Q] button to interact with nodes."; + + /*case TUTORIAL_DIG_PLACE : + return (std::string)"Use the left click to dig nodes and the right click to place them.";*/ case TUTORIAL_EAT : return (std::string)"Use the [H] button to eat any food."; - case TUTORIAL_INVENTORY : - return (std::string)"Press the [I] button to open your inventory and the [Q] button to interact with nodes."; - default : return (std::string)"Tutorial is done!"; }; @@ -75,6 +78,38 @@ void Tutorial::setCurrentTutorialToNumber(int number) this->currentTutorial = number; } +int Tutorial::getCurrentTutorialNumber() +{ + return this->currentTutorial; +} + +int Tutorial::getCurrentTutorialCompletionValue() +{ + switch(this->currentTutorial) + { + case TUTORIAL_WALK : + return TUTORIAL_KEY_WALK; + + case TUTORIAL_JUMP : + return TUTORIAL_KEY_JUMP; + + /* case TUTORIAL_LOOK : + return (std::string)"Move the mouse to look around you."; */ + + case TUTORIAL_INVENTORY : + return TUTORIAL_KEY_INVENTORY; + + /*case TUTORIAL_DIG_PLACE : + return (std::string)"Use the left click to dig nodes and the right click to place them.";*/ + + case TUTORIAL_EAT : + return TUTORIAL_KEY_EAT; + + default : + return 0; + }; +} + std::string Tutorial::getCurrentTutorialText() { return this->getText(this->currentTutorial); @@ -83,4 +118,4 @@ std::string Tutorial::getCurrentTutorialText() std::string Tutorial::getNumberText(int number) { return this->getText(number); -} \ No newline at end of file +}