Player12
An open source football management simulator
Loading...
Searching...
No Matches
AwardsScene Class Reference

League honours: the running award race, the season awards and the Team of the Season, and every monthly winner of a league and season. More...

#include <awards_scene.h>

Inheritance diagram for AwardsScene:
ManagementScene GUIScene

Classes

struct  MonthRow
 One month of the monthly awards table. More...
 
struct  RaceRow
 One line of the award race. More...
 
struct  Winner
 A winner line: who, for whom and the figure. More...
 

Public Member Functions

 AwardsScene (GUIView *parent)
 
void update (float) override
 Updates scene logic.
 
SceneID getID () const override
 Gets the ID of the scene.
 
- Public Member Functions inherited from ManagementScene
 ManagementScene (GUIView *guiViewPtr)
 
void render () final
 Renders the scene.
 
void onEnter () override
 Called when the scene is entered/becomes active.
 
void onResume () override
 Called when an overlay above this scene closes and it becomes the active scene again. Screens use it to refresh cached view models after a match, a transfer or any other state change made elsewhere.
 
void handleEvent (const SDL_Event &event) override
 
std::optional< NavEntry > historyEntry () const override
 
- Public Member Functions inherited from GUIScene
 GUIScene (GUIView *guiView_ptr)
 Constructs a new GUIScene.
 
virtual ~GUIScene ()=default
 Destroys the GUIScene.
 
virtual void onExit ()
 Called when the scene is exited/becomes inactive.
 
virtual void onResize (int width, int height)
 Called when the window is resized.
 

Protected Member Functions

void renderContent () override
 Draws the page body inside the content region.
 
NavSection navSection () const override
 Sidebar entry highlighted for this screen.
 
void refresh () override
 Rebuilds cached view models from the game state.
 
- Protected Member Functions inherited from ManagementScene
virtual std::optional< EditorContext > editorContext () const
 
void showToast (std::string message, bool isError=false)
 Shows a short confirmation message in the top bar.
 
HolidayDialog & holidayDialog ()
 Holiday planner and return report of this screen.
 
- Protected Member Functions inherited from GUIScene
SDL_Renderer * getRenderer () const
 Gets the SDL renderer.
 
SDL_Window * getWindow () const
 Gets the SDL window.
 
GUIView * getGuiView () const
 Gets the associated GUIView.
 
void changeScene (std::unique_ptr< GUIScene > newScene)
 Requests a scene change.
 
void quit ()
 Requests the application to quit.
 

Private Member Functions

void renderSelectors ()
 
void renderRace (float width)
 
void renderSeason (float width)
 
void renderTeamOfSeason (float width)
 
void renderMonths ()
 
void renderWinner (const Winner &winner, float width)
 

Private Attributes

LeagueID league_id = 0
 
uint16_t season_year = 0
 
std::vector< uint16_t > seasons
 
bool current_season = true
 
std::vector< Winner > season_winners
 
std::vector< Winner > team_of_season
 
std::vector< MonthRow > months
 
std::vector< RaceRow > race
 
std::vector< RaceRow > young_race
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Additional Inherited Members

- Protected Attributes inherited from GUIScene
GUIView * guiView
 

Detailed Description

League honours: the running award race, the season awards and the Team of the Season, and every monthly winner of a league and season.

Constructor & Destructor Documentation

◆ AwardsScene()

AwardsScene::AwardsScene ( GUIView *  parent)
explicit

Member Function Documentation

◆ getID()

SceneID AwardsScene::getID ( ) const
inlineoverridevirtual

Gets the ID of the scene.

Returns
The SceneID of this scene.

GUIView uses this identifier to apply match-specific event and scene behavior.

Implements GUIScene.

◆ navSection()

NavSection AwardsScene::navSection ( ) const
inlineoverrideprotectedvirtual

Sidebar entry highlighted for this screen.

Implements ManagementScene.

◆ refresh()

void AwardsScene::refresh ( )
overrideprotectedvirtual

Rebuilds cached view models from the game state.

Reimplemented from ManagementScene.

◆ renderContent()

void AwardsScene::renderContent ( )
overrideprotectedvirtual

Draws the page body inside the content region.

Implements ManagementScene.

◆ renderMonths()

void AwardsScene::renderMonths ( )
private

◆ renderRace()

void AwardsScene::renderRace ( float  width)
private

◆ renderSeason()

void AwardsScene::renderSeason ( float  width)
private

◆ renderSelectors()

void AwardsScene::renderSelectors ( )
private

◆ renderTeamOfSeason()

void AwardsScene::renderTeamOfSeason ( float  width)
private

◆ renderWinner()

void AwardsScene::renderWinner ( const Winner &  winner,
float  width 
)
private

◆ update()

void AwardsScene::update ( float  deltaTime)
inlineoverridevirtual

Updates scene logic.

Parameters
deltaTimeThe time elapsed since the last update.

Implements GUIScene.

Friends And Related Symbol Documentation

◆ GameFlowTest_GUIFlowLifecycle_Test

friend class GameFlowTest_GUIFlowLifecycle_Test
friend

Member Data Documentation

◆ current_season

bool AwardsScene::current_season = true
private

◆ league_id

LeagueID AwardsScene::league_id = 0
private

◆ months

std::vector<MonthRow> AwardsScene::months
private

◆ race

std::vector<RaceRow> AwardsScene::race
private

◆ season_winners

std::vector<Winner> AwardsScene::season_winners
private

◆ season_year

uint16_t AwardsScene::season_year = 0
private

◆ seasons

std::vector<uint16_t> AwardsScene::seasons
private

◆ team_of_season

std::vector<Winner> AwardsScene::team_of_season
private

◆ young_race

std::vector<RaceRow> AwardsScene::young_race
private

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