|
Player12
An open source football management simulator
|
The managed club's tactics: style and instructions, player roles and duties, and the shape with the ball. More...
#include <strategy_scene.h>
Public Member Functions | |
| StrategyScene (GUIView *parent) | |
| Constructs a new StrategyScene. | |
| ~StrategyScene () override=default | |
| Destroys the StrategyScene. | |
| void | update (float deltaTime) override |
| Updates scene logic. | |
| SceneID | getID () const override |
| Gets the ID of this 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 | renderInstructions (float width) |
| void | renderSummary (float width) const |
| void | renderRoles (float width) |
| void | renderShapeEditor (const Lineup &lineup, float width) |
| void | renderSlotList (const Lineup &lineup) |
| void | renderSlotDetails (const Lineup &lineup) |
| void | renderShapePresets (const Lineup &lineup, float width) |
| Strategy * | clubStrategy () const |
| const Lineup * | clubLineup () const |
| SlotInstruction | slotAt (const Lineup &lineup, int slot) const |
| void | storeSlot (const SlotInstruction &instruction) const |
| void | setRole (const Lineup &lineup, TacticalRole role) |
| void | setDuty (const Lineup &lineup, RoleDuty duty) |
| void | applyShape (const Lineup &lineup, PossessionShape shape) |
| void | suggestRoles (const Lineup &lineup) |
| void | applySliders () const |
| bool | changedSinceEntry () const |
| void | revert () |
| void | loadStrategy () |
Private Attributes | |
| StrategySliders | current_sliders |
| Strategy | entry_strategy |
| int | selected_preset = -1 |
| int | selected_slot = 0 |
| int | dragging_slot = -1 |
Static Private Attributes | |
| static constexpr int | KEEPER_SLOT = -1 |
Friends | |
| class | GameFlowTest_GUIFlowLifecycle_Test |
Additional Inherited Members | |
Protected Attributes inherited from GUIScene | |
| GUIView * | guiView |
The managed club's tactics: style and instructions, player roles and duties, and the shape with the ball.
Every change applies to the club's tactic in memory straight away (it is written with the next save), so leaving the screen by any route never loses an edit; Revert restores the tactic as it was on arrival.
|
explicit |
Constructs a new StrategyScene.
| parent | Pointer to the GUIView. |
|
overridedefault |
Destroys the StrategyScene.
|
private |
|
private |
|
private |
Whether the tactic differs from the one on arrival.
|
private |
|
private |
The club's tactic and lineup (nullptr without a managed club).
|
overridevirtual |
|
private |
|
inlineoverrideprotectedvirtual |
Sidebar entry highlighted for this screen.
Implements ManagementScene.
|
inlineoverrideprotectedvirtual |
Rebuilds cached view models from the game state.
Reimplemented from ManagementScene.
|
overrideprotectedvirtual |
Draws the page body inside the content region.
Implements ManagementScene.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Instruction of an outfield slot (a Standard one when none is stored).
|
private |
|
private |
|
overridevirtual |
|
friend |
|
private |
|
private |
Outfield slot dragged on the shape editor (-1 none).
|
private |
The tactic as it was when the screen was opened (Revert).
|
staticconstexprprivate |
Selection on the roles card: the goalkeeper or an outfield slot.
|
private |
|
private |