Simulator::cUIEventLog class

This class manages event logs in Simulator game modes.

Event logs are small alerts shown on the left side of the screen, such as "There's a ecodisaster in this planet!". An example of usage of this class: UIEventLog.ShowEvent(id("PirateAmbush"), GroupIDs::SpacePopups); The ShowEvent() method returns an ID that identifies that event log. Sometimes it's useful to save that ID to use it in other methods. For example, you can use it to change the text of the event log:

uint32_t eventID = UIEventLog.ShowEvent(id("GenericMissionProgress"), GroupIDs::SpacePopups);
UIEventLog.SetDescription(eventID, u"The mission is almost complete!");

Base classes

class UTFWin::IWinProc
This class is a window procedure, also known as an event/message listener.
class cStrategy

Public static functions

static auto Get() -> cUIEventLog*

Public functions

auto ShowEvent(uint32_t instanceID, uint32_t groupID, int = 0, Math::Vector3* = nullptr, bool dontAllowDuplicates = true, int = 0) -> uint32_t
Shows an event log item, with the given instance and group ID.
auto HideEvent(uint32_t eventID, bool partially) -> void
Hides an event log, either totally or partially.
auto SetDescription(uint32_t eventID, const char16_t* pText) -> void
Changes the description text of the event log.
auto SetVisible(bool visible) -> void
Changes the visibility of all the event log items.

Public variables

int field_20
bool field_24
eastl::map<uint32_t, eastl::intrusive_ptr<cFeedbackEvent>> mEvents
int field_44
float field_48
char padding_4C
float field_5C
float field_60
int field_64
int field_68
PropertyListPtr mpPropList

Function documentation

uint32_t Simulator::cUIEventLog::ShowEvent(uint32_t instanceID, uint32_t groupID, int = 0, Math::Vector3* = nullptr, bool dontAllowDuplicates = true, int = 0)

Shows an event log item, with the given instance and group ID.

Parameters
instanceID The ID of the prop file used for this event.
groupID The ID of the folder of the prop file, usually GroupIDs::SpacePopups or GroupIDs::CivPopups.
dontAllowDuplicates If the prop file doesn't define eventAllowDuplicates, this parameter will be used to know if you can't have more than one event of that same prop.

This method returns an ID that uniquely identifies the event log item created by this method; that id can be used in other methods.

void Simulator::cUIEventLog::HideEvent(uint32_t eventID, bool partially)

Hides an event log, either totally or partially.

Parameters
eventID The ID of the event, as returned by ShowEvent()
partially If true, only the text is hidden; if false, the entire event item is destroyed

Hiding it partially (second parameter set to true) means the icon still shows; if oyu hide it totally, you delete the event completely.

void Simulator::cUIEventLog::SetDescription(uint32_t eventID, const char16_t* pText)

Changes the description text of the event log.

Parameters
eventID The ID of the event, as returned by ShowEvent()
pText The new text of the event.

void Simulator::cUIEventLog::SetVisible(bool visible)

Changes the visibility of all the event log items.

Parameters
visible