VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtSessionMenuState Class Reference

Detailed Description

Handles the UI for selecting and starting sessions, both hosted and unhosted. Manages the session menu and responds to user interactions for session creation, including scenario selection for hosted sessions and terrain selection for unhosted sessions.

#include <sessionMenuState.h>

Inheritance diagram for makVre::DtSessionMenuState:
[legend]

Public Member Functions

 DtSessionMenuState (DtPlayerStationApp &app)
 
virtual ~DtSessionMenuState () override
 
virtual void onEnter (const DtPlayerStationStateArgs *args) override
 
virtual void onExit () override
 
virtual void onExposed () override
 
virtual void onStacked () override
 
virtual void tick (double dt) override
 
- Public Member Functions inherited from makVre::DtPlayerStationState
 DtPlayerStationState (DtPlayerStationApp &app, std::string stateType)
 
virtual ~DtPlayerStationState ()
 
 DtPlayerStationState (const DtPlayerStationState &)=delete
 
DtPlayerStationStateoperator= (const DtPlayerStationState &)=delete
 
virtual void onEnter ()
 
virtual void onExposed (const DtPlayerStationStateArgs *args)
 
bool active () const
 
bool exposed () const
 
bool exiting () const
 
bool stacking () const
 
const std::string & stateType () const
 
DtPlayerStationAppapp () const
 

Protected Member Functions

virtual DtVreMessageResult handleVrfSessionStatus (DtVreMessage *msg)
 
virtual DtVreMessageResult handleChooseSessionButtonClicked (DtVreMessage *msg)
 
virtual DtVreMessageResult handleEscKey (DtVreMessage *msg)
 
virtual DtVreMessageResult handleBackButtonClicked (DtVreMessage *msg)
 
virtual DtVreMessageResult handleStartHostedSessionClicked (DtVreMessage *msg)
 
virtual DtVreMessageResult handleStartUnhostedSessionClicked (DtVreMessage *msg)
 
- Protected Member Functions inherited from makVre::DtPlayerStationState
bool pushState (const std::string &newState, DtPlayerStationStateArgs *args=NULL)
 
bool popSelf ()
 
bool popUntilSelf ()
 
bool popUntilState (const std::string &parentState, DtPlayerStationStateArgs *args=NULL)
 
bool switchToState (const std::string &newState, DtPlayerStationStateArgs *args=NULL)
 
bool pushSelf ()
 

Protected Attributes

std::shared_ptr< DtVreStartPagemyStartPage
 
- Protected Attributes inherited from makVre::DtPlayerStationState
DtPlayerStationAppmyApp
 

Constructor & Destructor Documentation

◆ DtSessionMenuState()

makVre::DtSessionMenuState::DtSessionMenuState ( DtPlayerStationApp & app)

Constructor for the session menu state.

Parameters
appReference to the player station application

References makVre::DtPlayerStationState::app().

◆ ~DtSessionMenuState()

virtual makVre::DtSessionMenuState::~DtSessionMenuState ( )
overridevirtual

Virtual destructor for proper cleanup.

Member Function Documentation

◆ onEnter()

virtual void makVre::DtSessionMenuState::onEnter ( const DtPlayerStationStateArgs * args)
overridevirtual

Called when entering this state.

Parameters
argsOptional arguments passed when transitioning to this state

Initializes the session menu UI, registers message handlers, and checks startup configuration for special options. May automatically transition to another state based on startup configuration (join, start, or host modes).

Reimplemented from makVre::DtPlayerStationState.

◆ onExit()

virtual void makVre::DtSessionMenuState::onExit ( )
overridevirtual

Called when exiting this state.

Removes all registered message handlers, closes the start menu UI, and performs cleanup of the connection page if it's visible.

Reimplemented from makVre::DtPlayerStationState.

◆ onExposed()

virtual void makVre::DtSessionMenuState::onExposed ( )
overridevirtual

Called when this state becomes the top-most visible state.

Re-registers UI message handlers and makes the menu visible. This occurs when a state on top of this one is removed.

Reimplemented from makVre::DtPlayerStationState.

◆ onStacked()

virtual void makVre::DtSessionMenuState::onStacked ( )
overridevirtual

Called when another state is pushed on top of this state.

Removes UI message handlers and hides the menu UI but keeps the state alive in the background.

Reimplemented from makVre::DtPlayerStationState.

◆ tick()

virtual void makVre::DtSessionMenuState::tick ( double dt)
overridevirtual

Called every frame to update the state.

Parameters
dtTime elapsed since the last frame in seconds

Handles periodic updates for this state. Currently minimal implementation.

Reimplemented from makVre::DtPlayerStationState.

◆ handleVrfSessionStatus()

virtual DtVreMessageResult makVre::DtSessionMenuState::handleVrfSessionStatus ( DtVreMessage * msg)
protectedvirtual

Handles session status messages from VRF.

Parameters
msgThe session status message
Returns
Result of message handling (HANDLED or IGNORED)

Processes session status info and updates the UI accordingly

◆ handleChooseSessionButtonClicked()

virtual DtVreMessageResult makVre::DtSessionMenuState::handleChooseSessionButtonClicked ( DtVreMessage * msg)
protectedvirtual

Handles button click to choose a session.

Parameters
msgThe button click message
Returns
Result of message handling (HANDLED or IGNORED)

Transitions to the state for choosing a session

◆ handleEscKey()

virtual DtVreMessageResult makVre::DtSessionMenuState::handleEscKey ( DtVreMessage * msg)
protectedvirtual

Handles ESC key press.

Parameters
msgThe escape key message
Returns
Result of message handling (HANDLED or IGNORED)

Transitions back to the previous state

◆ handleBackButtonClicked()

virtual DtVreMessageResult makVre::DtSessionMenuState::handleBackButtonClicked ( DtVreMessage * msg)
protectedvirtual

Handles back button clicks in the UI.

Parameters
msgThe back button click message
Returns
Result of message handling (HANDLED or IGNORED)

Transitions back to the previous state

◆ handleStartHostedSessionClicked()

virtual DtVreMessageResult makVre::DtSessionMenuState::handleStartHostedSessionClicked ( DtVreMessage * msg)
protectedvirtual

Handles requests to start a hosted session.

Parameters
msgThe host session message containing scenario info
Returns
Result of message handling (HANDLED or IGNORED)

Creates a SessionLoadDataMessage and transitions to JOINED_SESSION_STATE

◆ handleStartUnhostedSessionClicked()

virtual DtVreMessageResult makVre::DtSessionMenuState::handleStartUnhostedSessionClicked ( DtVreMessage * msg)
protectedvirtual

Handles requests to start an unhosted session.

Parameters
msgThe unhosted session message containing terrain info
Returns
Result of message handling (HANDLED or IGNORED)

Creates a SessionLoadDataMessage and transitions to JOINED_SESSION_STATE

Member Data Documentation

◆ myStartPage

std::shared_ptr<DtVreStartPage> makVre::DtSessionMenuState::myStartPage
protected

Reference to the start page UI component.

Provides access to the start menu UI for displaying and managing session options and controls


The documentation for this class was generated from the following file: