UI - Popups and Notifications: Difference between revisions
No edit summary |
No edit summary |
||
Line 48: | Line 48: | ||
There are various ways to call a modal, in the example above we are setting the modal up and will later call it with UI.ShowModalMessage(modalName) | There are various ways to call a modal, in the example above we are setting the modal up and will later call it with UI.ShowModalMessage(modalName) | ||
To include an image in a large modal you must place it within the Level folder in your project: /Content/Graphics/img.png |
Revision as of 15:56, 20 November 2023
Overview
A page detailing the different types of Notifications at your disposal, and best practises to ensure they look great in game.
For UI Lua API see: UI_Lua_API
Hint
UI.ShowHint(message, timeout)
Notification
UI.ShowNotification(type, header, message, timeout)
Popup - Generic
UI.ShowPopup(PopupType.generic, header, message, timeout)
Popup - Progress Bar
UI.ShowPopup(PopupType.progress, header, message, timeout)
Use Case: In the Off Grid main campaign, we use these popups to simulate installations and the transmitting of data.
It's a way we like to enrich the lore and world building.
Popup Menu
UI.ShowPopupMenu(table)
Modal - Small
modalName = { messageType = "small", header = "modal header string", message = "modal body string", confirmText = "confirm",
There are various ways to call a modal, in the example above we are setting the modal up and will later call it with UI.ShowModalMessage(modalName)
Modal - Large
modalName = { messageType = "large", header = "modal header string", message = "modal body string", imagePath = "img.png" confirmText = "confirm",
There are various ways to call a modal, in the example above we are setting the modal up and will later call it with UI.ShowModalMessage(modalName) To include an image in a large modal you must place it within the Level folder in your project: /Content/Graphics/img.png