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

Fixtures and results: the managed club's season calendar and the league schedule round by round. More...

#include <fixtures_scene.h>

Inheritance diagram for FixturesScene:
ManagementScene GUIScene

Public Member Functions

 FixturesScene (GUIView *parent)
 
void update (float deltaTime) 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 Types

enum class  View : uint8_t { CLUB , LEAGUE }
 

Private Member Functions

void renderClubSummary ()
 
void renderClubFixtures (float height)
 
void renderLeagueRound ()
 

Private Attributes

View view = View::CLUB
 
TeamID club_id = 0
 
std::vector< CompetitionView::FixtureRow > club_fixtures
 
std::vector< CompetitionView::FixtureRow > league_fixtures
 
int round_count = 0
 
int selected_round = 1
 
int wins = 0
 
int draws = 0
 
int losses = 0
 
int goals_for = 0
 
int goals_against = 0
 
int next_fixture_index = -1
 
bool scroll_to_next = true
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Additional Inherited Members

- Protected Attributes inherited from GUIScene
GUIView * guiView
 

Detailed Description

Fixtures and results: the managed club's season calendar and the league schedule round by round.

Member Enumeration Documentation

◆ View

enum class FixturesScene::View : uint8_t
strongprivate
Enumerator
CLUB 
LEAGUE 

Constructor & Destructor Documentation

◆ FixturesScene()

FixturesScene::FixturesScene ( GUIView *  parent)
explicit

Member Function Documentation

◆ getID()

SceneID FixturesScene::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 FixturesScene::navSection ( ) const
inlineoverrideprotectedvirtual

Sidebar entry highlighted for this screen.

Implements ManagementScene.

◆ refresh()

void FixturesScene::refresh ( )
overrideprotectedvirtual

Rebuilds cached view models from the game state.

Reimplemented from ManagementScene.

◆ renderClubFixtures()

void FixturesScene::renderClubFixtures ( float  height)
private

◆ renderClubSummary()

void FixturesScene::renderClubSummary ( )
private

◆ renderContent()

void FixturesScene::renderContent ( )
overrideprotectedvirtual

Draws the page body inside the content region.

Implements ManagementScene.

◆ renderLeagueRound()

void FixturesScene::renderLeagueRound ( )
private

◆ update()

void FixturesScene::update ( float  deltaTime)
overridevirtual

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

◆ club_fixtures

std::vector<CompetitionView::FixtureRow> FixturesScene::club_fixtures
private

◆ club_id

TeamID FixturesScene::club_id = 0
private

◆ draws

int FixturesScene::draws = 0
private

◆ goals_against

int FixturesScene::goals_against = 0
private

◆ goals_for

int FixturesScene::goals_for = 0
private

◆ league_fixtures

std::vector<CompetitionView::FixtureRow> FixturesScene::league_fixtures
private

◆ losses

int FixturesScene::losses = 0
private

◆ next_fixture_index

int FixturesScene::next_fixture_index = -1
private

◆ round_count

int FixturesScene::round_count = 0
private

◆ scroll_to_next

bool FixturesScene::scroll_to_next = true
private

◆ selected_round

int FixturesScene::selected_round = 1
private

◆ view

View FixturesScene::view = View::CLUB
private

◆ wins

int FixturesScene::wins = 0
private

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