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

Post-match report: score, goal and card timeline, team statistics and player ratings for one played fixture; tracked matches of the managed club add an Analysis tab (MatchInsightsView). More...

#include <match_report_scene.h>

Inheritance diagram for MatchReportScene:
ManagementScene GUIScene

Classes

struct  EventRow
 
struct  PlayerRow
 

Public Member Functions

 MatchReportScene (GUIView *parent, GameDateValue date, TeamID homeId, TeamID awayId)
 
void update (float deltaTime) override
 Updates scene logic.
 
SceneID getID () const override
 Gets the ID of the scene.
 
std::optional< NavEntry > historyEntry () const override
 
- 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
 
- 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 renderScore ()
 
void renderEvents (float width, float height) const
 
void renderStats (float width, float height)
 
void renderRatings (const char *id, const std::string &club, const std::vector< PlayerRow > &rows, float width, float height)
 

Static Private Member Functions

static void eventText (const EventRow &event, bool alignRight)
 

Private Attributes

GameDateValue date
 
TeamID home_id
 
TeamID away_id
 
std::optional< MatchReport > report
 
std::string home_name
 
std::string away_name
 
std::string result_note
 
std::vector< EventRow > events
 
std::vector< PlayerRow > home_players
 
std::vector< PlayerRow > away_players
 
MatchInsightsView insights
 
int tab = 0
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Additional Inherited Members

- Protected Attributes inherited from GUIScene
GUIView * guiView
 

Detailed Description

Post-match report: score, goal and card timeline, team statistics and player ratings for one played fixture; tracked matches of the managed club add an Analysis tab (MatchInsightsView).

Constructor & Destructor Documentation

◆ MatchReportScene()

MatchReportScene::MatchReportScene ( GUIView *  parent,
GameDateValue  date,
TeamID  homeId,
TeamID  awayId 
)

Member Function Documentation

◆ eventText()

void MatchReportScene::eventText ( const EventRow &  event,
bool  alignRight 
)
staticprivate

Scorer (or booked player) with the assist on a smaller second line; the home side is right-aligned towards the minute column.

◆ getID()

SceneID MatchReportScene::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.

◆ historyEntry()

std::optional< NavEntry > MatchReportScene::historyEntry ( ) const
inlineoverridevirtual

The screen's sidebar section; detail screens override it.

Reimplemented from ManagementScene.

◆ navSection()

NavSection MatchReportScene::navSection ( ) const
inlineoverrideprotectedvirtual

Sidebar entry highlighted for this screen.

Implements ManagementScene.

◆ refresh()

void MatchReportScene::refresh ( )
overrideprotectedvirtual

Rebuilds cached view models from the game state.

Reimplemented from ManagementScene.

◆ renderContent()

void MatchReportScene::renderContent ( )
overrideprotectedvirtual

Draws the page body inside the content region.

Implements ManagementScene.

◆ renderEvents()

void MatchReportScene::renderEvents ( float  width,
float  height 
) const
private

◆ renderRatings()

void MatchReportScene::renderRatings ( const char *  id,
const std::string &  club,
const std::vector< PlayerRow > &  rows,
float  width,
float  height 
)
private

◆ renderScore()

void MatchReportScene::renderScore ( )
private

◆ renderStats()

void MatchReportScene::renderStats ( float  width,
float  height 
)
private

◆ update()

void MatchReportScene::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

◆ away_id

TeamID MatchReportScene::away_id
private

◆ away_name

std::string MatchReportScene::away_name
private

◆ away_players

std::vector<PlayerRow> MatchReportScene::away_players
private

◆ date

GameDateValue MatchReportScene::date
private

◆ events

std::vector<EventRow> MatchReportScene::events
private

◆ home_id

TeamID MatchReportScene::home_id
private

◆ home_name

std::string MatchReportScene::home_name
private

◆ home_players

std::vector<PlayerRow> MatchReportScene::home_players
private

◆ insights

MatchInsightsView MatchReportScene::insights
private

◆ report

std::optional<MatchReport> MatchReportScene::report
private

◆ result_note

std::string MatchReportScene::result_note
private

◆ tab

int MatchReportScene::tab = 0
private

0 overview, 1 analysis.


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