UI - Popups and Notifications

From Off Grid Wiki
Revision as of 15:56, 20 November 2023 by Stef (talk | contribs)
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

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

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