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

National-team call-ups of the head coach: the announced squad of the coming window (editable until the players report), the players the nation may call up with ability, form, condition and caps in the assistant's order, and the nation's next matches. More...

#include <callup_scene.h>

Inheritance diagram for CallUpScene:
ManagementScene GUIScene

Classes

struct  FixtureLine
 
struct  Row
 One player line, pre-formatted at refresh time. More...
 

Public Member Functions

 CallUpScene (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 Member Functions

void renderTiles () const
 
void renderSquad (float width)
 
void renderCandidates (float width)
 
void renderFixtures (float width) const
 
void renderTable (const char *id, const std::vector< const Row * > &rows, bool squad)
 
void renderDetail (const Row &row, bool squad)
 
void rebuildLists ()
 
void confirm ()
 

Private Attributes

GameController::CallUpView view
 
std::vector< Row > rows
 
std::vector< PlayerID > working
 
std::vector< const Row * > squad_rows
 
std::vector< const Row * > candidate_rows
 
std::vector< FixtureLine > fixtures
 
std::string subtitle
 
std::string status_value
 
std::string status_note
 
std::string squad_value
 
std::string keepers_value
 
std::string squad_title
 
GameDateValue cached_date
 
PlayerID selected = 0
 
int filter = 0
 
size_t keepers = 0
 
bool dirty = false
 
bool lists_stale = false
 
bool confirm_requested = false
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Additional Inherited Members

- Protected Attributes inherited from GUIScene
GUIView * guiView
 

Detailed Description

National-team call-ups of the head coach: the announced squad of the coming window (editable until the players report), the players the nation may call up with ability, form, condition and caps in the assistant's order, and the nation's next matches.

Constructor & Destructor Documentation

◆ CallUpScene()

CallUpScene::CallUpScene ( GUIView *  parent)
explicit

Member Function Documentation

◆ confirm()

void CallUpScene::confirm ( )
private

◆ getID()

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

Sidebar entry highlighted for this screen.

Implements ManagementScene.

◆ rebuildLists()

void CallUpScene::rebuildLists ( )
private

◆ refresh()

void CallUpScene::refresh ( )
overrideprotectedvirtual

Rebuilds cached view models from the game state.

Reimplemented from ManagementScene.

◆ renderCandidates()

void CallUpScene::renderCandidates ( float  width)
private

◆ renderContent()

void CallUpScene::renderContent ( )
overrideprotectedvirtual

Draws the page body inside the content region.

Implements ManagementScene.

◆ renderDetail()

void CallUpScene::renderDetail ( const Row &  row,
bool  squad 
)
private

◆ renderFixtures()

void CallUpScene::renderFixtures ( float  width) const
private

◆ renderSquad()

void CallUpScene::renderSquad ( float  width)
private

◆ renderTable()

void CallUpScene::renderTable ( const char *  id,
const std::vector< const Row * > &  rows,
bool  squad 
)
private

◆ renderTiles()

void CallUpScene::renderTiles ( ) const
private

◆ update()

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

◆ cached_date

GameDateValue CallUpScene::cached_date
private

◆ candidate_rows

std::vector<const Row*> CallUpScene::candidate_rows
private

◆ confirm_requested

bool CallUpScene::confirm_requested = false
private

◆ dirty

bool CallUpScene::dirty = false
private

◆ filter

int CallUpScene::filter = 0
private

0 all, then position groups.

◆ fixtures

std::vector<FixtureLine> CallUpScene::fixtures
private

◆ keepers

size_t CallUpScene::keepers = 0
private

◆ keepers_value

std::string CallUpScene::keepers_value
private

◆ lists_stale

bool CallUpScene::lists_stale = false
private

◆ rows

std::vector<Row> CallUpScene::rows
private

◆ selected

PlayerID CallUpScene::selected = 0
private

◆ squad_rows

std::vector<const Row*> CallUpScene::squad_rows
private

◆ squad_title

std::string CallUpScene::squad_title
private

◆ squad_value

std::string CallUpScene::squad_value
private

◆ status_note

std::string CallUpScene::status_note
private

◆ status_value

std::string CallUpScene::status_value
private

◆ subtitle

std::string CallUpScene::subtitle
private

◆ view

GameController::CallUpView CallUpScene::view
private

◆ working

std::vector<PlayerID> CallUpScene::working
private

The squad being edited (player ids), saved by confirm().


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