Fission FSN
Loading...
Searching...
No Matches
gfCParkCatalogueGui.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCParkCatalogueGui.h
4*
5* Purpose: Minimal catalogue-listing GUI for gfTimeCore - proves
6* gfICatalogueGui wiring (Phase 3 gate: "catalogue GUI
7* lists buildings"). No currency/purchase-confirmation
8* presentation yet - that's Phase 5 (GUI screens).
9*
10* closeButton (Phase 6) is the only addition since - the
11* base gfICatalogueGui/fsIGuiComponent have no generic
12* dismiss mechanism, and this is opened as a modal
13* overlay from gfCParkHudGui's shop button mid-play.
14*
15*********************************************************************/
16
17#ifndef gfCParkCatalogueGuihdr
18#define gfCParkCatalogueGuihdr
19
21
23
25{
26 friend class fsCComponentFactory;
27
28public:
29
30 static const fsCUniqueId mTypeId;
31
32protected:
33
34 void catalogueLoadDo() override;
35
36 // Populates each item button's icon/name/price from the catalogue entry.
37 // Handles categories as well as items: the shop's top level lists the
38 // buildings/staff categories, not items, so a purely item-shaped
39 // implementation would leave that first screen blank.
40 void itemInfoSetDo(fsS32 pEntIndex, fsS32 pChildIndex) const override;
41
42 // Base refresh plus back-button visibility - the catalogue root has no
43 // parent to return to, so the button is hidden there rather than left dead.
44 void buttonsRefresh() override;
45 void onScrollSelection(fsS32 pDirection) override;
46
47 // Arms or changes the placement tool while leaving the catalogue visible.
48 void itemSelect(const gfICatalogueEntry* pShopItem) override;
49
50 void initialiseFromVariableTableDo(const fsCVariableTable& pVars) override;
51 fsBool onButtonClicked(fsCButtonComponent* pButtonComp) override;
52
53 static fsIComponent* const create(fsCEntity* const pParent);
54 gfCParkCatalogueGui(fsCEntity* const pParent);
55 virtual ~gfCParkCatalogueGui();
56
57private:
58
59 // "Back" only means something below the catalogue root, so the button is
60 // hidden at the top level rather than left there doing nothing.
61 void backButtonVisibilityRefresh() const;
62 void pagingButtonVisibilityRefresh() const;
63};
64
65#endif
Definition fsCButtonComponent.h:26
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
Definition fsCVariableTable.h:27
Definition fsIComponent.h:26
static fsIComponent *const create(fsCEntity *const pParent)
Definition gfCParkCatalogueGui.cpp:199
virtual ~gfCParkCatalogueGui()
Definition gfCParkCatalogueGui.cpp:209
void onScrollSelection(fsS32 pDirection) override
Definition gfCParkCatalogueGui.cpp:145
friend class fsCComponentFactory
Definition gfCParkCatalogueGui.h:26
void catalogueLoadDo() override
Definition gfCParkCatalogueGui.cpp:26
void itemSelect(const gfICatalogueEntry *pShopItem) override
Definition gfCParkCatalogueGui.cpp:170
void initialiseFromVariableTableDo(const fsCVariableTable &pVars) override
Definition gfCParkCatalogueGui.cpp:83
fsBool onButtonClicked(fsCButtonComponent *pButtonComp) override
Definition gfCParkCatalogueGui.cpp:180
void buttonsRefresh() override
Definition gfCParkCatalogueGui.cpp:124
gfCParkCatalogueGui(fsCEntity *const pParent)
Definition gfCParkCatalogueGui.cpp:204
void itemInfoSetDo(fsS32 pEntIndex, fsS32 pChildIndex) const override
Definition gfCParkCatalogueGui.cpp:33
static const fsCUniqueId mTypeId
Definition gfCParkCatalogueGui.h:30
Definition gfICatalogueEntry.h:18
gfICatalogueGui(fsCEntity *pParent)
Definition gfICatalogueGui.cpp:266
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20