|
Player12
An open source football management simulator
|
Club inbox: pinned decisions with their actions in place, and the information feed with category filters and digest grouping. More...
#include <inbox_scene.h>
Classes | |
| struct | Decision |
| A pending decision with what can be done about it. More... | |
| struct | Thread |
| One visible row: a single message or a folded digest. More... | |
Public Member Functions | |
| InboxScene (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 | rebuildThreads () |
| void | rebuildDecisions () |
| void | renderDecisions () |
| void | renderDecision (const Decision &decision) |
| void | renderFilters (float width, float height) |
| void | renderThreads (float width, float height) |
| void | renderReader (float height) |
| void | openMessage (size_t messageIndex) |
| void | renderReaderActions (const InboxMessage &message) |
| void | renderDrawAction (const InboxMessage &message) |
| void | renderEntityFilter () |
| InboxView | currentView () const |
| void | applyView (const InboxView &view) |
| void | storeView () |
Private Attributes | |
| std::vector< Thread > | threads |
| std::array< size_t, CATEGORY_COUNT > | unread_by_category {} |
| std::array< size_t, CATEGORY_COUNT > | total_by_category {} |
| int | category_filter = -1 |
| bool | unread_only = false |
| int | tab = -1 |
| bool | followed_only = false |
| std::optional< PlayerID > | filter_player |
| std::optional< TeamID > | filter_team |
| std::string | filter_label |
| InboxView | stored_view |
| std::vector< PlayerID > | followed |
| size_t | followed_unread = 0 |
| size_t | followed_total = 0 |
| bool | show_archived = false |
| size_t | archived_count = 0 |
| std::vector< Decision > | decisions |
| std::vector< bool > | hidden |
| int | selected_thread = -1 |
| int | expanded_thread = -1 |
| size_t | selected_message = SIZE_MAX |
| std::uint32_t | selected_message_id = 0 |
| std::string | selected_title |
| std::string | selected_body |
| PlayerTalkDialog | talk_dialog |
| OfferNegotiationDialog | offer_dialog |
| DrawCeremonyDialog | draw_dialog |
Static Private Attributes | |
| static constexpr size_t | CATEGORY_COUNT |
Friends | |
| class | GameFlowTest_GUIFlowLifecycle_Test |
Additional Inherited Members | |
Protected Attributes inherited from GUIScene | |
| GUIView * | guiView |
Club inbox: pinned decisions with their actions in place, and the information feed with category filters and digest grouping.
Decisions (offers for the club's players, player requests, youth trialists) stay on the Decisions tab until resolved, with negotiate / accept / reject / reply / sign buttons right there; transfer bids open the talks dialog (OfferNegotiationDialog). Read information older than Inbox::ARCHIVE_DAYS moves to the archive.
Routine messages of the same kind that arrive in the same week are folded into one digest row, so a busy matchday reads as a single entry instead of a wall of near-identical notifications.
The filters (tab, category, unread, followed players, one player or club) are kept with the career (InboxView), so they survive a scene change and a reload. Decision moments are answered on the Decisions tab with their effects shown (InboxDilemmaCard).
|
explicit |
|
private |
|
private |
The filters as shown now.
|
inlineoverridevirtual |
|
inlineoverrideprotectedvirtual |
Sidebar entry highlighted for this screen.
Implements ManagementScene.
|
private |
|
private |
|
private |
|
overrideprotectedvirtual |
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 |
Watch the draw: continental draw messages open the ceremony.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Keeps the filters with the career and rebuilds the feed.
|
overridevirtual |
Updates scene logic.
| deltaTime | The time elapsed since the last update. |
Implements GUIScene.
|
friend |
|
private |
|
staticconstexprprivate |
|
private |
-1 = all categories.
|
private |
|
private |
|
private |
|
private |
Name of the filtered player or club.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Messages hidden from the feed (pending decisions, archive).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Last view read from or kept with the career.
|
private |
0 = decisions, 1 = information (-1: pick).
|
private |
|
private |
|
private |
|
private |
|
private |