Sporepedia::ShopperRequest struct

A class used to show the Sporepedia to the user, asking him to select a creation.

A shopper request uses a configuration file in the AssetBrowserConfig folder to know what text it will show to the player, what are the available creation types, etc.

To know when the user selects a creature, you must create a class that inherits from IShopperListener

Example usage:

// `this` can also be whatever object that inherits from IShopperListener
Sporepedia::ShopperRequest request(this);
request.shopperID = id("MilitaryAirShopper");

Public static functions

static void Show(ShopperRequest& request)
Executes this request, showing the Sporepedia to the user.

Constructors, destructors, conversion operators

ShopperRequest(IShopperListener* listener = nullptr)

Public variables

uint32_t shopperID
The ID of the file in the AssetBrowserConfig folder that decides what the user can choose.
uint32_t gameModeID
The current game mode ID, it's set automatically.
int field_8
int field_C
bool field_10
bool field_11
bool field_12
bool field_13
bool field_14
ResourceKey currentSelection
Key to the creation that is currently selected. If not specified, nothing is selected.
bool field_24
int field_28
bool field_2C
uint32_t field_30
int maxSelections
IShopperListener* pListener
Pointer to an object that will be called when the user accepts the selection.
IMultiShopperListener* pMultiListener
intrusive_ptr<Editors::EditorRequest> pEditorRequest
intrusive_ptr<Editors::EditorRequest> field_44

Function documentation

static void Sporepedia::ShopperRequest::Show(ShopperRequest& request)

Executes this request, showing the Sporepedia to the user.

This method returns immediately; when the user clicks the Accept button, the function specified at the constructor or at pListener (if any) will be executed.