Study Dungeon  1.0.0
A group project for COSC345
Public Member Functions
FlashcardApp::ResultsScene Class Reference

A scene for displaying the results of a flashcard study session. More...

#include <flashcard_scene.h>

Inheritance diagram for FlashcardApp::ResultsScene:
ConsoleUI::Scene

Public Member Functions

 ResultsScene (ConsoleUI::UIManager &uiManager, const std::vector< int > &difficultyCount, int score, std::function< void()> goToMainMenu, std::function< void()> goToDeckSelection, std::function< void()> goToGame, bool sessionComplete)
 Construct a new ResultsScene object. More...
 
void init () override
 Initialise the scene.
 
void update () override
 Update the scene state. More...
 
void render (std::shared_ptr< ConsoleUI::ConsoleWindow > window) override
 Render the scene to the console window. More...
 
void handleInput () override
 Handle user input for the scene. More...
 
void setStaticDrawn (bool staticDrawn) override
 Sets the static drawn state of the scene. More...
 
- Public Member Functions inherited from ConsoleUI::Scene
virtual ~Scene ()=default
 Destroy the Scene object.
 

Detailed Description

A scene for displaying the results of a flashcard study session.

This class represents a user interface scene that shows the user their performance in a completed flashcard study session, displaying the number of cards rated as Easy, Medium, and Hard. It also provides options for the user to navigate to other parts of the application.

Constructor & Destructor Documentation

◆ ResultsScene()

FlashcardApp::ResultsScene::ResultsScene ( ConsoleUI::UIManager uiManager,
const std::vector< int > &  difficultyCount,
int  score,
std::function< void()>  goToMainMenu,
std::function< void()>  goToDeckSelection,
std::function< void()>  goToGame,
bool  sessionComplete 
)

Construct a new ResultsScene object.

Parameters
uiManagerThe UI manager responsible for handling the user interface.
difficultyCountA vector containing the count of cards rated as Easy, Medium, and Hard.
goToMainMenuA function to be called when the user wants to return to the main menu.
goToDeckSelectionA function to be called when the user wants to select a new deck.
goToGameA function to be called when the user wants to start a new study session.

Member Function Documentation

◆ handleInput()

void FlashcardApp::ResultsScene::handleInput ( )
overridevirtual

Handle user input for the scene.

This function processes keyboard input to navigate through the available options (Main Menu, Deck Selection, Start Game).

Implements ConsoleUI::Scene.

◆ render()

void FlashcardApp::ResultsScene::render ( std::shared_ptr< ConsoleUI::ConsoleWindow window)
overridevirtual

Render the scene to the console window.

Parameters
windowThe console window to render the scene onto.

Implements ConsoleUI::Scene.

◆ setStaticDrawn()

void FlashcardApp::ResultsScene::setStaticDrawn ( bool  staticDrawn)
overridevirtual

Sets the static drawn state of the scene.

Parameters
staticDrawnBoolean indicating whether the static elements have been drawn.

Implements ConsoleUI::Scene.

◆ update()

void FlashcardApp::ResultsScene::update ( )
overridevirtual

Update the scene state.

This function is called every frame to update the scene's state. Currently, it doesn't perform any actions as the scene doesn't require continuous updates.

Implements ConsoleUI::Scene.


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