Skip to content

APP Structure

The Fern edited this page Oct 28, 2018 · 20 revisions

The APP structure is a table containing essential information about a given App. Below is the only variable that needs to be defined, otherwise the apploader will not add it.

APP.Name                                 -- The name of the App which will be displayed in the AppStore

Below are the non-essential keys, that you are still encouraged to add, but aren't necessary.

APP.Icon                                 -- The icon. Can point to a local file or an online file. If the icon appears as a 'generating' icon then the path might be wrong
APP.Description                          -- The description of the app, shown in the AppStore (WIP)
APP.Author                               -- The name of the author
APP.Negative                             -- Whether the App should use negative top-bar colors or not

An app wouldn't really be worth it without some functions to be called, right? Down below are some functions you can override in your app to make it do something.

function APP.Run( frame, w, h, ratio )   -- Called when the App is first opened (root-panel, width, height, dp-ratio)
function APP.Think( frame, w, h, ratio ) -- Called every tick while the app is focused (Prediction is disabled)
function APP.Focus( frame )              -- Called when the app gets focused
function APP.UnFocus( frame )            -- Called when the app gets unfocused
function APP.Stop( frame )               -- Called when the app is closed entirely
function APP.Rotate( old, new )          -- Called when the phone rotates while this app is focused (old root-frame, new root-frame)

Continue to GPnl Library