Apps Lua API: Difference between revisions
(Created page with "<!-- This file is auto generated, please don't edit manually! --> = Animator = == Description == Allows the user to set properties of a mission objects Unity animator The...") |
No edit summary |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<!-- This file is auto generated, please don't edit manually! --> | <!-- This file is auto generated, please don't edit manually! --> | ||
= | = Apps = | ||
== Description == | == Description == | ||
The Apps API allows modders to control Apps | |||
== Functions == | == Functions == | ||
=== | === RequestAppState === | ||
<syntaxhighlight source lang="lua"> | <syntaxhighlight source lang="lua">Apps.RequestAppState(appName, newState)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 13: | Line 11: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | appName || string | ||
|- | |- | ||
| | | newState || OffGridApp+AppStates | ||
|} | |||
'''Description''': Ask an App to change it's state | |||
'''Returns''': Nothing | |||
=== Console_OutputLine === | |||
<syntaxhighlight source lang="lua">Apps.Console_OutputLine(appName, outputString)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |- | ||
| | | appName || string | ||
|- | |||
| outputString || string | |||
|} | |} | ||
'''Description''': | '''Description''': Output a line to the terminal UI | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | == Global Functions == | ||
<syntaxhighlight source lang="lua"> | === SetState === | ||
<syntaxhighlight source lang="lua">SetState(newState)</syntaxhighlight> | |||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 30: | Line 42: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | newState || OffGridApp+AppStates | ||
|} | |||
'''Description''': Sets the App's state. | |||
'''Returns''': Nothing | |||
=== CreateStatusWindow === | |||
<syntaxhighlight source lang="lua">CreateStatusWindow()</syntaxhighlight> | |||
'''Description''': Create the status window | |||
'''Returns''': Nothing | |||
=== RemoveStatusWindow === | |||
<syntaxhighlight source lang="lua">RemoveStatusWindow()</syntaxhighlight> | |||
'''Description''': Remove this app's status window | |||
'''Returns''': Nothing | |||
=== DisplayStatusWindow === | |||
<syntaxhighlight source lang="lua">DisplayStatusWindow(enabled)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |- | ||
! Name !! Type | |||
|- | |- | ||
| | | enabled || bool | ||
|} | |} | ||
'''Description''': | '''Description''': Show or hide the app's status window. | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | '''Notes''': Make sure to to create the window first ;) | ||
<syntaxhighlight source lang="lua"> | === UpdateStatusWindow === | ||
<syntaxhighlight source lang="lua">UpdateStatusWindow(text)</syntaxhighlight> | |||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 47: | Line 81: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | text || string | ||
|} | |||
'''Description''': Update the text content of the app's status window | |||
'''Returns''': Nothing | |||
=== SetStatusIcon === | |||
<syntaxhighlight source lang="lua">SetStatusIcon(id)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |- | ||
! Name !! Type | |||
|- | |- | ||
| | | id || number | ||
|} | |} | ||
'''Description''': | '''Description''': Set the icon used for the app's status window | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | '''Notes''': ID should match with an image in your app definition's 'statusIcons' table. | ||
<syntaxhighlight source lang="lua"> | === SetStatusIconColor === | ||
<syntaxhighlight source lang="lua">SetStatusIconColor(color)</syntaxhighlight> | |||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 64: | Line 108: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | color || Lua Type | ||
|} | |} | ||
'''Description''': | '''Description''': Set the color of the status window icon | ||
'''Returns''': Nothing | '''Returns''': Nothing | ||
=== | === CreateAppWindow === | ||
<syntaxhighlight source lang="lua"> | <syntaxhighlight source lang="lua">CreateAppWindow(title, backgroundImagePath)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 79: | Line 121: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | title || string | ||
|- | |- | ||
| | | backgroundImagePath || string | ||
|} | |} | ||
'''Description''': | '''Description''': Initialize the AppWindow for this App | ||
'''Returns''': Nothing | |||
=== RemoveAppWindow === | |||
<syntaxhighlight source lang="lua">RemoveAppWindow()</syntaxhighlight> | |||
'''Description''': Reset the AppWindow | |||
'''Returns''': Nothing | |||
=== ShowAppWindow === | |||
<syntaxhighlight source lang="lua">ShowAppWindow()</syntaxhighlight> | |||
'''Description''': Make the AppWindow visible (rember to create the window first!) | |||
'''Returns''': | '''Returns''': Nothing | ||
=== | === HideAppWindow === | ||
<syntaxhighlight source lang="lua"> | <syntaxhighlight source lang="lua">HideAppWindow()</syntaxhighlight> | ||
'''Description''': Hide the app window. | |||
'''Returns''': Nothing | |||
=== SetAppWindowContent === | |||
<syntaxhighlight source lang="lua">SetAppWindowContent(content)</syntaxhighlight> | |||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 94: | Line 154: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | content || string | ||
|} | |||
'''Description''': Set the content text of the AppWindow | |||
'''Returns''': Nothing | |||
=== ShowAppWindowProgress === | |||
<syntaxhighlight source lang="lua">ShowAppWindowProgress(display)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |- | ||
| | | display || bool | ||
|} | |} | ||
'''Description''': | '''Description''': Show (or hide) a progress bar on the AppWindow | ||
'''Returns''': | '''Returns''': Nothing | ||
=== | === SetAppWindowProgress === | ||
<syntaxhighlight source lang="lua"> | <syntaxhighlight source lang="lua">SetAppWindowProgress(progress)</syntaxhighlight> | ||
'''Expected parameter types''' | '''Expected parameter types''' | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 109: | Line 180: | ||
! Name !! Type | ! Name !! Type | ||
|- | |- | ||
| | | progress || number | ||
|} | |||
'''Description''': Set the progres on the AppWindow progress bar (remember to use 'ShowAppWindowProgress(true)' first to enable it!) | |||
'''Returns''': Nothing | |||
=== StartLuaCoroutine === | |||
<syntaxhighlight source lang="lua">StartLuaCoroutine(dynValue)</syntaxhighlight> | |||
'''Expected parameter types''' | |||
{| class="wikitable" | |||
|- | |||
! Name !! Type | |||
|- | |- | ||
| | | dynValue || Lua Type | ||
|} | |} | ||
'''Description''': | '''Description''': ... | ||
'''Returns''': | '''Returns''': Nothing | ||
Line 121: | Line 203: | ||
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''': | '''Docs last hacked together on''': 29/08/2023 16:24 | ||
[[Category:Modding]][[Category:LuaAPI]] | [[Category:Modding]][[Category:LuaAPI]] |
Latest revision as of 13:55, 29 August 2023
Apps
Description
The Apps API allows modders to control Apps
Functions
RequestAppState
Apps.RequestAppState(appName, newState)
Expected parameter types
Name | Type |
---|---|
appName | string |
newState | OffGridApp+AppStates |
Description: Ask an App to change it's state
Returns: Nothing
Console_OutputLine
Apps.Console_OutputLine(appName, outputString)
Expected parameter types
Name | Type |
---|---|
appName | string |
outputString | string |
Description: Output a line to the terminal UI
Returns: Nothing
Global Functions
SetState
SetState(newState)
Expected parameter types
Name | Type |
---|---|
newState | OffGridApp+AppStates |
Description: Sets the App's state.
Returns: Nothing
CreateStatusWindow
CreateStatusWindow()
Description: Create the status window
Returns: Nothing
RemoveStatusWindow
RemoveStatusWindow()
Description: Remove this app's status window
Returns: Nothing
DisplayStatusWindow
DisplayStatusWindow(enabled)
Expected parameter types
Name | Type |
---|---|
enabled | bool |
Description: Show or hide the app's status window.
Returns: Nothing
Notes: Make sure to to create the window first ;)
UpdateStatusWindow
UpdateStatusWindow(text)
Expected parameter types
Name | Type |
---|---|
text | string |
Description: Update the text content of the app's status window
Returns: Nothing
SetStatusIcon
SetStatusIcon(id)
Expected parameter types
Name | Type |
---|---|
id | number |
Description: Set the icon used for the app's status window
Returns: Nothing
Notes: ID should match with an image in your app definition's 'statusIcons' table.
SetStatusIconColor
SetStatusIconColor(color)
Expected parameter types
Name | Type |
---|---|
color | Lua Type |
Description: Set the color of the status window icon
Returns: Nothing
CreateAppWindow
CreateAppWindow(title, backgroundImagePath)
Expected parameter types
Name | Type |
---|---|
title | string |
backgroundImagePath | string |
Description: Initialize the AppWindow for this App
Returns: Nothing
RemoveAppWindow
RemoveAppWindow()
Description: Reset the AppWindow
Returns: Nothing
ShowAppWindow
ShowAppWindow()
Description: Make the AppWindow visible (rember to create the window first!)
Returns: Nothing
HideAppWindow
HideAppWindow()
Description: Hide the app window.
Returns: Nothing
SetAppWindowContent
SetAppWindowContent(content)
Expected parameter types
Name | Type |
---|---|
content | string |
Description: Set the content text of the AppWindow
Returns: Nothing
ShowAppWindowProgress
ShowAppWindowProgress(display)
Expected parameter types
Name | Type |
---|---|
display | bool |
Description: Show (or hide) a progress bar on the AppWindow
Returns: Nothing
SetAppWindowProgress
SetAppWindowProgress(progress)
Expected parameter types
Name | Type |
---|---|
progress | number |
Description: Set the progres on the AppWindow progress bar (remember to use 'ShowAppWindowProgress(true)' first to enable it!)
Returns: Nothing
StartLuaCoroutine
StartLuaCoroutine(dynValue)
Expected parameter types
Name | Type |
---|---|
dynValue | Lua Type |
Description: ...
Returns: Nothing
This file is auto generated, please don't edit manually!
Docs last hacked together on: 29/08/2023 16:24