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

Pre-match opposition report of the next fixture: form, averages against the league, likely XI (scouted estimates only), key players, strengths and weaknesses, suggested counter-tactics with their reasons and individual instructions against opposing players. More...

#include <opposition_scene.h>

Inheritance diagram for OppositionScene:
ManagementScene GUIScene

Public Member Functions

 OppositionScene (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 renderSummary () const
 
void renderLikelyXi (float width)
 
void renderKeyPlayers (float width)
 
void renderProfile (float width) const
 
void renderCounters (float width)
 

Private Attributes

std::optional< GameController::NextFixture > fixture
 
std::string opponent_name
 
OppositionReport report
 
std::vector< OppositionInstruction > instructions
 
std::vector< bool > applied
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Additional Inherited Members

- Protected Attributes inherited from GUIScene
GUIView * guiView
 

Detailed Description

Pre-match opposition report of the next fixture: form, averages against the league, likely XI (scouted estimates only), key players, strengths and weaknesses, suggested counter-tactics with their reasons and individual instructions against opposing players.

Constructor & Destructor Documentation

◆ OppositionScene()

OppositionScene::OppositionScene ( GUIView *  parent)
explicit

Member Function Documentation

◆ getID()

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

Sidebar entry highlighted for this screen.

Implements ManagementScene.

◆ refresh()

void OppositionScene::refresh ( )
overrideprotectedvirtual

Rebuilds cached view models from the game state.

Reimplemented from ManagementScene.

◆ renderContent()

void OppositionScene::renderContent ( )
overrideprotectedvirtual

Draws the page body inside the content region.

Implements ManagementScene.

◆ renderCounters()

void OppositionScene::renderCounters ( float  width)
private

◆ renderKeyPlayers()

void OppositionScene::renderKeyPlayers ( float  width)
private

◆ renderLikelyXi()

void OppositionScene::renderLikelyXi ( float  width)
private

◆ renderProfile()

void OppositionScene::renderProfile ( float  width) const
private

◆ renderSummary()

void OppositionScene::renderSummary ( ) const
private

◆ update()

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

◆ applied

std::vector<bool> OppositionScene::applied
private

Per counter.

◆ fixture

std::optional<GameController::NextFixture> OppositionScene::fixture
private

◆ instructions

std::vector<OppositionInstruction> OppositionScene::instructions
private

Per likely XI row.

◆ opponent_name

std::string OppositionScene::opponent_name
private

◆ report

OppositionReport OppositionScene::report
private

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