App functions

There are the most useful functions you will use in the apps.

APP:Open(PANEL main, int main_x, int main_y)

Parameters

Purposes

main

This is the panel you need to parent everything on. You can paint it.

main_x

Wide of the main

main_h

Height of the main

This function will be called when someone opens your app

APP:OnClose()

This function will be called when someone closes your app or switch weapon

APP:ShowCondition()

Return false to hide the app

// From weather app
function APP:ShowCondition()
	return tobool(StormFox or StormFox2)
end

APP:Open2D(PANEL main, int main_x, int main_y)

This function will be called when someone puts the phone horizontally. Parameters are the same as Open

If this function is available, the player will be able to put his phone horizontal in your app. Else, he can't.

Last updated