UI Lua API: Difference between revisions
(adding DocStart) |
|||
(11 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<!-- This file is auto generated, please don't edit manually! --> | |||
= UI = | = UI = | ||
== Description == | == Description == | ||
Line 5: | Line 5: | ||
== Functions == | == Functions == | ||
=== ToggleClock === | === ToggleClock === | ||
<syntaxhighlight source lang="lua">UI.ToggleClock()</syntaxhighlight> | <syntaxhighlight source lang="lua">UI.ToggleClock(state)</syntaxhighlight> | ||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| state || bool | |||
|} | |||
'''Description''': Toggles the clock hud element | '''Description''': Toggles the clock hud element | ||
Line 11: | Line 18: | ||
=== ToggleWeather === | === ToggleWeather === | ||
<syntaxhighlight source lang="lua">UI.ToggleWeather()</syntaxhighlight> | <syntaxhighlight source lang="lua">UI.ToggleWeather(state)</syntaxhighlight> | ||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| state || bool | |||
|} | |||
'''Description''': Toggles the weather hud element | '''Description''': Toggles the weather hud element | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | === SetDataViewState === | ||
<syntaxhighlight source lang="lua">UI. | <syntaxhighlight source lang="lua">UI.SetDataViewState(state)</syntaxhighlight> | ||
'''Description''': | '''Expected parameter types''' | ||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| state || bool | |||
|} | |||
'''Description''': Sets the state of the data view | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | '''Notes''': This can be used for dramatic effect when certain story elements trigger | ||
<syntaxhighlight source lang="lua">UI. | === OpenRemoteConnection === | ||
'''Description''': | <syntaxhighlight source lang="lua">UI.OpenRemoteConnection(missionObject)</syntaxhighlight> | ||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| missionObject || MissionObject | |||
|} | |||
'''Description''': Opens SSH connection to currently targeted device | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== SetRadialScanState === | |||
=== | <syntaxhighlight source lang="lua">UI.SetRadialScanState(shouldScan)</syntaxhighlight> | ||
<syntaxhighlight source lang="lua">UI. | '''Expected parameter types''' | ||
'''Description''': | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |||
| shouldScan || bool | |||
|} | |||
'''Description''': Control if the radial menu should be scanning for targets | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | === ToggleUIMarkers === | ||
<syntaxhighlight source lang="lua">UI. | <syntaxhighlight source lang="lua">UI.ToggleUIMarkers(state)</syntaxhighlight> | ||
'''Description''': | '''Expected parameter types''' | ||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| state || bool | |||
|} | |||
'''Description''': Show/Hide UI markers for hackable and interactable objects near the player. | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | === ShowHint === | ||
<syntaxhighlight source lang="lua">UI. | <syntaxhighlight source lang="lua">UI.ShowHint(message, timeout)</syntaxhighlight> | ||
'''Description''': | '''Expected parameter types''' | ||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| message || string | |||
|- | |||
| timeout || number (optional) | |||
|} | |||
'''Description''': Displays a hint message. Multiple messages will stack on screen but don't go too crazy... | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | <span style="color:#009000">'''Tip'''</span>: These should mainly be used as additional help to the player, outside of the context of the game world. | ||
<syntaxhighlight source lang="lua">UI. | === ShowModalMessage === | ||
'''Description''': | <syntaxhighlight source lang="lua">UI.ShowModalMessage(luaMessage)</syntaxhighlight> | ||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| luaMessage || Lua Table | |||
|} | |||
'''Description''': Displays a modal window with text filed, an optional picture, confirm button & optional cancel button. | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== ShowPopup === | |||
== | <syntaxhighlight source lang="lua">UI.ShowPopup(type, header, message, timeout)</syntaxhighlight> | ||
<syntaxhighlight source lang="lua">UI. | '''Expected parameter types''' | ||
'''Description''': | {| class="wikitable" | ||
|- | |||
! Name !! Type | |||
|- | |||
| type || OffGridPopup+PopupTypes | |||
|- | |||
| header || string | |||
|- | |||
| message || string | |||
|- | |||
| timeout || number (optional) | |||
|} | |||
'''Description''': Displays a small popup window in the centre of the screen | |||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | === ShowNotification === | ||
<syntaxhighlight source lang="lua">UI. | <syntaxhighlight source lang="lua">UI.ShowNotification(type, header, message, timeout)</syntaxhighlight> | ||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |||
| type || OffGridNotification+NotificationTypes | |||
|- | |||
| header || string | |||
|- | |||
| message || string | |||
|- | |||
| timeout || number (optional) | |||
|} | |||
'''Description''': Displays a notification popup in the top right corner of the screen | |||
'''Returns''': Nothing | |||
=== ShowPopupMenu === | |||
<syntaxhighlight source lang="lua">UI.ShowPopupMenu(table)</syntaxhighlight> | |||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| | ! Name !! Type | ||
|- | |||
| table || Lua Table | |||
|} | |} | ||
'''Description''': | '''Description''': Opens a popup menu with multiple options | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
'''Docs last hacked together on''': | This file is auto generated, please don't edit manually! | ||
'''Docs last hacked together on''': 29/08/2023 16:24 | |||
[[Category:Modding]][[Category:LuaAPI]] |
Latest revision as of 14:47, 20 November 2023
UI
Description
The UI API allows modders to control UI elements of the game
Functions
ToggleClock
UI.ToggleClock(state)
Expected parameter types
Name | Type |
---|---|
state | bool |
Description: Toggles the clock hud element
Returns: Nothing
ToggleWeather
UI.ToggleWeather(state)
Expected parameter types
Name | Type |
---|---|
state | bool |
Description: Toggles the weather hud element
Returns: Nothing
SetDataViewState
UI.SetDataViewState(state)
Expected parameter types
Name | Type |
---|---|
state | bool |
Description: Sets the state of the data view
Returns: Nothing
Notes: This can be used for dramatic effect when certain story elements trigger
OpenRemoteConnection
UI.OpenRemoteConnection(missionObject)
Expected parameter types
Name | Type |
---|---|
missionObject | MissionObject |
Description: Opens SSH connection to currently targeted device
Returns: Nothing
SetRadialScanState
UI.SetRadialScanState(shouldScan)
Expected parameter types
Name | Type |
---|---|
shouldScan | bool |
Description: Control if the radial menu should be scanning for targets
Returns: Nothing
ToggleUIMarkers
UI.ToggleUIMarkers(state)
Expected parameter types
Name | Type |
---|---|
state | bool |
Description: Show/Hide UI markers for hackable and interactable objects near the player.
Returns: Nothing
ShowHint
UI.ShowHint(message, timeout)
Expected parameter types
Name | Type |
---|---|
message | string |
timeout | number (optional) |
Description: Displays a hint message. Multiple messages will stack on screen but don't go too crazy...
Returns: Nothing
Tip: These should mainly be used as additional help to the player, outside of the context of the game world.
ShowModalMessage
UI.ShowModalMessage(luaMessage)
Expected parameter types
Name | Type |
---|---|
luaMessage | Lua Table |
Description: Displays a modal window with text filed, an optional picture, confirm button & optional cancel button.
Returns: Nothing
ShowPopup
UI.ShowPopup(type, header, message, timeout)
Expected parameter types
Name | Type |
---|---|
type | OffGridPopup+PopupTypes |
header | string |
message | string |
timeout | number (optional) |
Description: Displays a small popup window in the centre of the screen
Returns: Nothing
ShowNotification
UI.ShowNotification(type, header, message, timeout)
Expected parameter types
Name | Type |
---|---|
type | OffGridNotification+NotificationTypes |
header | string |
message | string |
timeout | number (optional) |
Description: Displays a notification popup in the top right corner of the screen
Returns: Nothing
ShowPopupMenu
UI.ShowPopupMenu(table)
Expected parameter types
Name | Type |
---|---|
table | Lua Table |
Description: Opens a popup menu with multiple options
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 29/08/2023 16:24