Creating Apps: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<syntaxhighlight lang="lua"> app = { name = "DataDelete", description = "Delete a data point.", targets = {"data"}, default = true, state = "off", icon = "Common/Apps/Ic...") |
No edit summary |
||
Line 1: | Line 1: | ||
<syntaxhighlight lang="lua"> | == Example Lua script == | ||
<syntaxhighlight lang="lua" lines> | |||
app = { | app = { | ||
name = "DataDelete", | name = "DataDelete", | ||
Line 19: | Line 21: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== App configuration == | |||
{| class="wikitable" | |||
!colspan="3" | App Table | |||
|- | |||
! Name !! Required/Optional !! Description | |||
|- | |||
| name || required || Name of the app | |||
|- | |||
| description || required || Short description of what the app does | |||
|- | |||
| targets || optional || List of what [[#Target types|target types]] the app can have | |||
|- | |||
| default || optional || Should the app be always displayed for it's target types | |||
|- | |||
| state || required || Current [[#States|state of the app]]. | |||
|- | |||
| icon || required || Path to icon image | |||
|- | |||
| iconColor || optional || background color for the app icon | |||
|- | |||
| OnClickAppWheel || optional || The function to run when the app is launched from the AppWheel | |||
|- | |||
| OnClickRadial || optional || The function to run when the app is launched from the radial menu | |||
|} | |||
=== Target types === | |||
<syntaxhighlight lang="lua"> | |||
targets = {"data", "devices"}, | |||
</syntaxhighlight> | |||
{| class="wikitable" | |||
|- | |||
! Name !! Description | |||
|- | |||
| none || The app doesn't require any kind of target | |||
|- | |||
| data || Any data points currently visible to the player | |||
|- | |||
| devices || Hackable devices in player's current networks | |||
|- | |||
| characters || People | |||
|- | |||
| interactions || Physical interactions in the levels | |||
|} | |||
=== States === | |||
{| class="wikitable" | |||
|- | |||
! Name !! Description | |||
|- | |||
| on || App is currently switched on | |||
|- | |||
| off || App is switched off | |||
|- | |||
| disabled || App is not available to use at the moment | |||
|- | |||
| alert || Blinking app icon to notify the player about something | |||
|} |
Revision as of 20:35, 8 May 2017
Example Lua script
app = { name = "DataDelete", description = "Delete a data point.", targets = {"data"}, default = true, state = "off", icon = "Common/Apps/Icons/DataDelete.png", iconColor = { 0, 0.4, 0.9843, 1 }, OnClickAppWheel = function() UI.ToggleDataDelete() end, OnClickRadial = function() UI.ToggleDataDelete() end, }
App configuration
App Table | ||
---|---|---|
Name | Required/Optional | Description |
name | required | Name of the app |
description | required | Short description of what the app does |
targets | optional | List of what target types the app can have |
default | optional | Should the app be always displayed for it's target types |
state | required | Current state of the app. |
icon | required | Path to icon image |
iconColor | optional | background color for the app icon |
OnClickAppWheel | optional | The function to run when the app is launched from the AppWheel |
OnClickRadial | optional | The function to run when the app is launched from the radial menu |
Target types
targets = {"data", "devices"},
Name | Description |
---|---|
none | The app doesn't require any kind of target |
data | Any data points currently visible to the player |
devices | Hackable devices in player's current networks |
characters | People |
interactions | Physical interactions in the levels |
States
Name | Description |
---|---|
on | App is currently switched on |
off | App is switched off |
disabled | App is not available to use at the moment |
alert | Blinking app icon to notify the player about something |