UI - Popups and Notifications

From Off Grid Wiki
Jump to navigation Jump to search

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

Hint Example
UI.ShowHint(message, timeout)

Location: Small text bottom right of screen.





Notification - Generic

Generic and Download Notifications, right of screen.
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

Pop Up with Progress Bar
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

Modal Example 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

Modal Example 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 of your project: /Content/Graphics/img.png