[Updated] Backgrounds to display the desired portion of the image, [Added] Start of the Game class
This commit is contained in:
@@ -4,8 +4,7 @@
|
||||
#include "EFont.h"
|
||||
#include "EScreen.h"
|
||||
|
||||
TutorialScreen::TutorialScreen()
|
||||
{
|
||||
TutorialScreen::TutorialScreen() {
|
||||
Text textBack = Text("Press Enter to go back", EFont::SANSATION, 30, 0, RED);
|
||||
textBack.setPosition({(float)(GetScreenWidth() - textBack.getDimensions().x) / 1.3f,
|
||||
(float)(GetScreenHeight() - textBack.getDimensions().y) / 1.15f});
|
||||
@@ -21,3 +20,18 @@ void TutorialScreen::logic()
|
||||
StateService::getInstance().setScreen(EScreen::MAIN);
|
||||
}
|
||||
}
|
||||
|
||||
void TutorialScreen::draw()
|
||||
{
|
||||
BeginDrawing();
|
||||
this->background.draw();
|
||||
|
||||
if (text.size() > 0)
|
||||
{
|
||||
for (int t = 0; t < text.size(); t++)
|
||||
{
|
||||
text[t].draw();
|
||||
}
|
||||
}
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user