UI - Popups and Notifications: Difference between revisions
No edit summary |
|||
Line 88: | Line 88: | ||
== Modal - Large == | == Modal - Large == | ||
PLEASE NOTE: Images added to modals Should be a maximum of '''634 x 356'''. | |||
[[File:Modal Example Large.png|thumb|Modal Example Large]] | [[File:Modal Example Large.png|thumb|Modal Example Large]] | ||
<syntaxhighlight source lang="lua">modalName = { | <syntaxhighlight source lang="lua">modalName = { |
Latest revision as of 14:21, 10 September 2024
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)
Location: Small text bottom right of screen.
Notification - Generic
UI.ShowNotification(NotificationType.generic, header, message, timeout)
Location: stacks right of screen from top.
Notification - Download
UI.ShowNotification(NotificationType.download, header, message, timeout)
Location: stacks right of screen from top.
Popup - Generic
UI.ShowPopup(PopupType.generic, header, message, timeout)
Location: Centre of screen
Popup - With Progress Bar
UI.ShowPopup(PopupType.progress, header, message, timeout)
Contains an animating progress bar. Location: Centre of screen
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
PLEASE NOTE: Images added to modals Should be a maximum of 634 x 356.
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 of your project: /Content/Graphics/img.png