class
cUIEventLogThis 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
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:: |
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 |