100 static string[]
getScripts(
string folder=
"",
string filter=
"");
110 static string getScript(
string filePath);
120 static game setScript(
string filePath,
string code,
bool remove=
false);
179 static game drawRectangle(
int x,
int y,
int width=100,
int height=50,
bool border=
false,
int r=0,
int g=0,
int b=0,
int a=255,
int clipX=0,
int clipY=0,
int clipWidth=
game:
getWindowWidth(),
int clipHeight=
game:
getWindowHeight());
206 static string getOS();
296 static vector<vector<vector<int>>>
getImagePixels(
string imagePath,
int x=0,
int y=0,
int w=-1,
int h=-1);
327 static multiReturn<int, int>
getDPI();
341 static game draw2dline(
int startX,
int startY,
int endX,
int endY,
int r=255,
int g=255,
int b=255,
int a=255);
static game reload()
reload all scripts.
used to control specific scripts.
Definition: script.h:6
the game program/application.
Definition: game.h:5
static game pushState(function func,...)
pushes a new state onto the state stack.
static bool isKeyDown(string key)
checks if the given key is currently down or not.
static game setBackgroundColor(int r, int g, int b, int a)
set the window's background color.
static int getWindowY(bool dpiAware=true)
get the window's y.
static int getWindowHeight(bool dpiAware=true)
get the window's height.
static mesh * getMeshFromID(string ID)
get a mesh from an ID.
static game setKeyDown(string key)
set a key down.
static bool scriptLoaded(string filePath)
checks whether or not the script has loaded.
static game getSaveFileName(function func,...)
choose a file location to save using the operating system's file browser.
static int getTime()
get the time in milliseconds.
static string getOS()
get the operating system.
static string[] getScripts(string folder="", string filter="")
get a table of all running script names.
static bool isMobile()
get whether or not the OS is mobile.
static game drawRectangle(int x, int y, int width=100, int height=50, bool border=false, int r=0, int g=0, int b=0, int a=255, int clipX=0, int clipY=0, int clipWidth=game:getWindowWidth(), int clipHeight=game:getWindowHeight())
draw a rectangle onto the screen.
static multiReturn< int, int > getDPI()
gets the number of dots per inch on the screen.
static game setScript(string filePath, string code, bool remove=false)
set the code of the script with the given file path.
static game removeTimeouts(string func="*", string script=script:thisName())
removes one or more timers started by the matching script with the matching function name.
static element * getElementFromPosition(int x, int y)
gets an element from an absolute position.
static int getWindowX(bool dpiAware=true)
get the window's x.
static element * getElementFromID(string ID)
get a GUI element from an ID.
a 2D GUI element.
Definition: element.h:10
static game setTitle(string title="")
sets the window title.
static vector< vector< vector< int > > > getImagePixels(string imagePath, int x=0, int y=0, int w=-1, int h=-1)
gets a list of all pixel colors from an image.
static game addError(string err)
adds an error to be displayed.
static bool isStatic()
gets whether or not the client is able to change worlds.
static game getOpenFileName(function func,...)
get a selected file from the operating system's file browser.
static element getFocusedElement()
gets the focused element.
static game openLink(string URL, bool newTab=true)
opens a link by URL.
static string getScript(string filePath)
get the code to the script with the given file path.
static game draw2dline(int startX, int startY, int endX, int endY, int r=255, int g=255, int b=255, int a=255)
draws a 2d line.
static game loadScripts(string filePath)
load a script or scripts in a directory.
a 3D object.
Definition: mesh.h:7
static int getWindowWidth(bool dpiAware=true)
get the window's width.
static game setTimeout(int milliseconds, string func="",...)
sets a timer (in milliseconds) that is triggered when the time is up.