Difference between revisions of "Powder Toy Lua API"
Line 9: | Line 9: | ||
: Methods and constants for modifying and creating elements | : Methods and constants for modifying and creating elements | ||
; [[Lua_API:Graphics|Graphics]] | ; [[Lua_API:Graphics|Graphics]] | ||
− | : Methods | + | : Methods for drawing simple shapes and text on screen. |
; [[Lua_API:File_System|File System]] | ; [[Lua_API:File_System|File System]] | ||
: Functions for creating, deleting, modifying and enumerating files and folders. | : Functions for creating, deleting, modifying and enumerating files and folders. |
Revision as of 15:22, 29 September 2012
The Powder Toy Lua API is a set of objects and functions that was introduced in version 83 (The TPT++ Release). They allow control over some aspects of the game, including graphics, element interactions and interfaces.
The API is split into several categories
- Interface
- Includes UI components such as buttons, labels and checkboxes, access to the very primitive window manager and input events
- Renderer
- Methods and constants for interacting with the display mode
- Elements
- Methods and constants for modifying and creating elements
- Graphics
- Methods for drawing simple shapes and text on screen.
- File System
- Functions for creating, deleting, modifying and enumerating files and folders.
- Bit
- Doesn't actually provide any interaction with the game, but provides some functions for performing bitwise operations on integer numbers.
- Legacy
- Old Lua API with the tpt.* prefix