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

Club planning: the pre-season (friendlies, tour and training camp), facility projects funded by the board and the mentoring groups. More...

#include <preseason_scene.h>

Inheritance diagram for PreseasonScene:
ManagementScene GUIScene

Classes

struct  FriendlyLine
 One formatted friendly. More...
 
struct  ProjectLine
 One project type with its quote and state. More...
 

Public Member Functions

 PreseasonScene (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 renderPreseason (float width)
 
void renderFriendlyEditor (const FriendlyLine &line)
 
void renderCamp ()
 
void renderProjects (float width)
 
void renderMentoring (float width)
 
void loadOpponents ()
 

Private Attributes

std::vector< FriendlyLine > friendlies
 
int selected_friendly = -1
 
int level = static_cast<int>(std::to_underlying(OpponentLevel::Similar))
 
int region = 0
 
int venue = 0
 
bool tour = false
 
std::vector< OpponentOption > opponents
 
std::vector< std::string > opponent_labels
 
int opponent_index = -1
 
int tour_fee_for = -1
 
std::string tour_fee_text
 
int camp_choice = 0
 
std::array< CampQuote, 3 > camp_quotes
 
bool camp_open = false
 
std::string camp_status
 
std::string camp_suggestion
 
std::vector< ProjectLine > projects
 
std::vector< std::string > completed_projects
 
int seats_choice = 1
 
std::array< std::string, 3 > seat_labels
 
std::string project_message
 
bool project_message_error = false
 
std::vector< std::string > mentoring_lines
 
MentoringDialog mentoring_dialog
 

Friends

class GameFlowTest_GUIFlowLifecycle_Test
 

Additional Inherited Members

- Protected Attributes inherited from GUIScene
GUIView * guiView
 

Detailed Description

Club planning: the pre-season (friendlies, tour and training camp), facility projects funded by the board and the mentoring groups.

Constructor & Destructor Documentation

◆ PreseasonScene()

PreseasonScene::PreseasonScene ( GUIView *  parent)
explicit

Member Function Documentation

◆ getID()

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

◆ loadOpponents()

void PreseasonScene::loadOpponents ( )
private

◆ navSection()

NavSection PreseasonScene::navSection ( ) const
inlineoverrideprotectedvirtual

Sidebar entry highlighted for this screen.

Implements ManagementScene.

◆ refresh()

void PreseasonScene::refresh ( )
overrideprotectedvirtual

Rebuilds cached view models from the game state.

Reimplemented from ManagementScene.

◆ renderCamp()

void PreseasonScene::renderCamp ( )
private

◆ renderContent()

void PreseasonScene::renderContent ( )
overrideprotectedvirtual

Draws the page body inside the content region.

Implements ManagementScene.

◆ renderFriendlyEditor()

void PreseasonScene::renderFriendlyEditor ( const FriendlyLine &  line)
private

◆ renderMentoring()

void PreseasonScene::renderMentoring ( float  width)
private

◆ renderPreseason()

void PreseasonScene::renderPreseason ( float  width)
private

◆ renderProjects()

void PreseasonScene::renderProjects ( float  width)
private

◆ update()

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

◆ camp_choice

int PreseasonScene::camp_choice = 0
private

◆ camp_open

bool PreseasonScene::camp_open = false
private

◆ camp_quotes

std::array<CampQuote, 3> PreseasonScene::camp_quotes
private

◆ camp_status

std::string PreseasonScene::camp_status
private

◆ camp_suggestion

std::string PreseasonScene::camp_suggestion
private

◆ completed_projects

std::vector<std::string> PreseasonScene::completed_projects
private

◆ friendlies

std::vector<FriendlyLine> PreseasonScene::friendlies
private

◆ level

int PreseasonScene::level = static_cast<int>(std::to_underlying(OpponentLevel::Similar))
private

◆ mentoring_dialog

MentoringDialog PreseasonScene::mentoring_dialog
private

◆ mentoring_lines

std::vector<std::string> PreseasonScene::mentoring_lines
private

◆ opponent_index

int PreseasonScene::opponent_index = -1
private

◆ opponent_labels

std::vector<std::string> PreseasonScene::opponent_labels
private

◆ opponents

std::vector<OpponentOption> PreseasonScene::opponents
private

◆ project_message

std::string PreseasonScene::project_message
private

◆ project_message_error

bool PreseasonScene::project_message_error = false
private

◆ projects

std::vector<ProjectLine> PreseasonScene::projects
private

◆ region

int PreseasonScene::region = 0
private

0 domestic, 1 abroad.

◆ seat_labels

std::array<std::string, 3> PreseasonScene::seat_labels
private

◆ seats_choice

int PreseasonScene::seats_choice = 1
private

◆ selected_friendly

int PreseasonScene::selected_friendly = -1
private

◆ tour

bool PreseasonScene::tour = false
private

◆ tour_fee_for

int PreseasonScene::tour_fee_for = -1
private

Opponent index tour_fee_text belongs to.

◆ tour_fee_text

std::string PreseasonScene::tour_fee_text
private

◆ venue

int PreseasonScene::venue = 0
private

0 home, 1 away.


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