R-Type 0.1
Loading...
Searching...
No Matches
rtype::client::MenuScene Class Reference

Title screen, which waits for the Confirm action. More...

#include <scene/menuScene.hpp>

Public Member Functions

 MenuScene (rtk::RenderWindow &window)
 Creates the scene.
 
void onEnter (rtk::EngineContext &context)
 Shows the menu picture.
 
std::optional< SceneType > onUpdate (rtk::EngineContext &context, const rtk::InputState &inputState, float dt)
 Goes to the connection scene when Confirm is pressed.
 
void onExit (rtk::EngineContext &context)
 Destroys the menu entities.
 

Static Public Attributes

static constexpr SceneType Type = SceneType::Menu
 Identifier of this scene.
 

Detailed Description

Title screen, which waits for the Confirm action.

Constructor & Destructor Documentation

◆ MenuScene()

rtype::client::MenuScene::MenuScene ( rtk::RenderWindow & window)
explicit

Creates the scene.

Parameters
windowWindow used to load the menu texture.

Member Function Documentation

◆ onEnter()

void rtype::client::MenuScene::onEnter ( rtk::EngineContext & context)

Shows the menu picture.

Parameters
contextEngine services.

◆ onUpdate()

std::optional< SceneType > rtype::client::MenuScene::onUpdate ( rtk::EngineContext & context,
const rtk::InputState & inputState,
float dt )

Goes to the connection scene when Confirm is pressed.

Parameters
contextEngine services.
inputStateInput state of the frame.
dtElapsed time since the last frame, in seconds.
Returns
The next scene, or std::nullopt to stay.

◆ onExit()

void rtype::client::MenuScene::onExit ( rtk::EngineContext & context)

Destroys the menu entities.

Parameters
contextEngine services.