Player12
An open source football management simulator
Loading...
Searching...
No Matches
opposition_scene.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <optional>
12#include <string>
13#include <vector>
14
17
25{
26 public:
27 explicit OppositionScene(GUIView* parent);
28
29 void update(float /*deltaTime*/) override
30 {
31 // Rendering reads current state; there is no per-frame update work.
32 }
33 [[nodiscard]] SceneID getID() const override { return SceneID::OPPOSITION; }
34
35 protected:
36 void renderContent() override;
37 [[nodiscard]] NavSection navSection() const override
38 {
40 }
41 void refresh() override;
42
43 private:
45
46 void renderSummary() const;
47 void renderLikelyXi(float width);
48 void renderKeyPlayers(float width);
49 void renderProfile(float width) const;
50 void renderCounters(float width);
51
52 std::optional<GameController::NextFixture> fixture;
53 std::string opponent_name;
55 std::vector<OppositionInstruction> instructions;
56 std::vector<bool> applied;
57};
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
Base class for every in-career screen.
Definition management_scene.h:93
Pre-match opposition report of the next fixture: form, averages against the league,...
Definition opposition_scene.h:25
void update(float) override
Updates scene logic.
Definition opposition_scene.h:29
void renderContent() override
Draws the page body inside the content region.
Definition opposition_scene.cpp:93
SceneID getID() const override
Gets the ID of the scene.
Definition opposition_scene.h:33
void refresh() override
Rebuilds cached view models from the game state.
Definition opposition_scene.cpp:71
std::vector< OppositionInstruction > instructions
Definition opposition_scene.h:55
void renderSummary() const
Definition opposition_scene.cpp:134
OppositionReport report
Definition opposition_scene.h:54
void renderLikelyXi(float width)
Definition opposition_scene.cpp:269
std::optional< GameController::NextFixture > fixture
Definition opposition_scene.h:52
void renderKeyPlayers(float width)
Definition opposition_scene.cpp:249
void renderCounters(float width)
Definition opposition_scene.cpp:179
void renderProfile(float width) const
Definition opposition_scene.cpp:224
NavSection navSection() const override
Sidebar entry highlighted for this screen.
Definition opposition_scene.h:37
std::string opponent_name
Definition opposition_scene.h:53
std::vector< bool > applied
Definition opposition_scene.h:56
friend class GameFlowTest_GUIFlowLifecycle_Test
Definition opposition_scene.h:44
SceneID
Identifiers for different GUI scenes.
Definition gui_scene.h:24
NavSection
Screens of the management shell. The sidebar groups them into a few hubs (Home, Inbox,...
Definition nav_history.h:26
The pre-match opposition report.
Definition opposition_report.h:118