UI Lua API: Difference between revisions

From Off Grid Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 22: Line 22:
'''Returns''': Nothing
'''Returns''': Nothing


=== TurnOffDataView ===
=== SetDataViewState ===
<syntaxhighlight source lang="lua">UI.TurnOffDataView()</syntaxhighlight>
<syntaxhighlight source lang="lua">UI.SetDataViewState(state)</syntaxhighlight>
'''Description''': Turns off the data view overlay
'''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
'''Notes''': This can be used for dramatic effect when certain story elements trigger
=== ToggleDataView ===
<syntaxhighlight source lang="lua">UI.ToggleDataView()</syntaxhighlight>
'''Description''': Toggles the data view overlay
'''Returns''': Nothing
=== ToggleDebugUI ===
=== ToggleDebugUI ===
<syntaxhighlight source lang="lua">UI.ToggleDebugUI()</syntaxhighlight>
<syntaxhighlight source lang="lua">UI.ToggleDebugUI()</syntaxhighlight>
Line 42: Line 43:


<span style="color:#009000">'''Tip'''</span>: This can be helpful for debugging your mods!
<span style="color:#009000">'''Tip'''</span>: This can be helpful for debugging your mods!
=== ToggleRemoteConnection ===
<syntaxhighlight source lang="lua">UI.ToggleRemoteConnection()</syntaxhighlight>
'''Description''': Toggles the SSH remote connection app
'''Returns''': Nothing
=== OpenRemoteConnection ===
=== OpenRemoteConnection ===
<syntaxhighlight source lang="lua">UI.OpenRemoteConnection()</syntaxhighlight>
<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
'''Description''': Opens SSH connection to currently targeted device


'''Returns''': Nothing
'''Returns''': Nothing


=== ToggleRadialApp ===
=== SetRadialScanState ===
<syntaxhighlight source lang="lua">UI.ToggleRadialApp()</syntaxhighlight>
<syntaxhighlight source lang="lua">UI.SetRadialScanState(shouldScan)</syntaxhighlight>
'''Description''': Use Radial menu from 3rd person mode
'''Expected parameter types'''
{| class="wikitable"
|-
! Name !! Type
|-
| shouldScan || bool
|}
'''Description''': Control if the radial menu should be scanning for targets


'''Returns''': Nothing
'''Returns''': Nothing
Line 70: Line 79:
'''Expected parameter types'''
'''Expected parameter types'''
{| class="wikitable"
{| class="wikitable"
|-
! Name !! Type
|-
|-
| luaMessage || Lua Table
| luaMessage || Lua Table
Line 82: Line 93:
'''Expected parameter types'''
'''Expected parameter types'''
{| class="wikitable"
{| class="wikitable"
|-
! Name !! Type
|-
|-
| type || OffGridPopup+popupTypes
| type || OffGridPopup+popupTypes
Line 99: Line 112:
This file is auto generated, please don't edit manually!
This file is auto generated, please don't edit manually!


'''Docs last hacked together on''': 13/09/2017 14:00
'''Docs last hacked together on''': 10/11/2017 11:58
 
[[Category:Modding]][[Category:LuaAPI]]
[[Category:Modding]]
[[Category:LuaAPI]]

Revision as of 12:18, 10 November 2017

UI

Description

The UI API allows modders to control UI elements of the game

Functions

ToggleClock

UI.ToggleClock()

Description: Toggles the clock hud element

Returns: Nothing

ToggleWeather

UI.ToggleWeather()

Description: Toggles the weather hud element

Returns: Nothing

ToggleLightMonitor

UI.ToggleLightMonitor()

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

ToggleDebugUI

UI.ToggleDebugUI()

Description: Toggles the developer debug UI

Returns: Nothing

Tip: This can be helpful for debugging your mods!

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()

Description: Show/Hide UI markers for hackable and interactable objects near the player.

Returns: Nothing

ShowModalMessage

UI.ShowModalMessage(luaMessage)

Expected parameter types

Name Type
luaMessage Lua Table

Description: Displays a modal, multiple calls to this will cause a stack of modals the user can click through

Returns: Nothing

Tip: These can be helpful to display story context and tutorialise hacking puzzles

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 pop up in the centre of the screen

Returns: Nothing


This file is auto generated, please don't edit manually!

Docs last hacked together on: 10/11/2017 11:58