Popups
Scriptable popups
The game has various built-in popup widgets that can be spawned easily.
SimpleScreenMessage
```
let warningMsg: SimpleScreenMessage;
warningMsg.isShown = true;
warningMsg.duration = 5.00;
warningMsg.message = "Hello, this is a simple message";
warningMsg.type = SimpleMessageType.Relic;
/*
enum SimpleMessageType {
Undefined = 0,
Negative = 1,
Neutral = 2,
Vehicle = 3,
Apartment = 4,
Relic = 5,
Money = 6,
Reveal = 7,
Boss = 8,
Twintone = 9,
Police = 10,
}
*/
GameInstance.GetBlackboardSystem(this.GetGame()).Get(GetAllBlackboardDefs().UI_Notifications).SetVariant(GetAllBlackboardDefs().UI_Notifications.WarningMessage, ToVariant(warningMsg), true);
```GenericMessageNotification
Use this if you want a quick popup with a button
Example usage: https://github.com/psiberx/cp2077-equipment-ex/blob/master/scripts/UI/ConflictsPopup.reds'
Using Codeware
Codeware provides primitives for a lot of common UI components including pop ups.
Here's a simple pop up implemented using Codeware's InGamePopupwith custom text
Which can then be used like this:
See Codeware Wiki and InkPlayground for more examples and details.
Last updated
Was this helpful?