![]() |
naev 0.12.5
|
Bindings for modifying the space background. More...
#include "nlua_bkg.h"#include "background.h"#include "nlua_colour.h"#include "nlua_tex.h"
Go to the source code of this file.
Functions | |
| static int | bkgL_clear (lua_State *L) |
| Lua bindings to interact with the background. | |
| static int | bkgL_image (lua_State *L) |
| Adds a background image. | |
| int | nlua_loadBackground (nlua_env env) |
| Loads the graphics library. | |
Variables | |
| static const luaL_Reg | bkgL_methods [] |
Bindings for modifying the space background.
Definition in file nlua_bkg.c.
|
static |
Lua bindings to interact with the background.
An example would be:
` Lua module: bkg
Clears any backgrounds that may currently be displaying.
| L | Lua State |
Lua function: clear
Definition at line 53 of file nlua_bkg.c.
|
static |
Adds a background image.
If the colour parameter is a boolean it's treated as the foreground parameter instead.
Lua usage parameter: bkg.image( img, 0, 0, 0.1, 1. ) – Adds the image without scaling that moves at 0.1 the player speed Lua usage parameter: bkg.image( img, 0, 0, 0.1, 1., true ) – Now on the foreground Lua usage parameter: bkg.image( img, 0, 0, 0.1, 1., col.new(1,0,0) ) – Now with colour Lua usage parameter: bkg.image( img, 0, 0, 0.1, 1., col.new(1,0,0), true ) – Now with colour and on the foreground
Lua function parameter: Tex image Image to use. Lua function parameter: number x X position. Lua function parameter: number y Y position. Lua function parameter:[opt=0] number move Fraction of a pixel to move when the player moves one pixel. A value of 0 indicates static and centered. Lua function parameter:[opt=1] number scale How much to scale the image. Lua function parameter:[opt=0] Rotation angle, in radians. Lua function parameter:[opt=nil] Colour col Colour to tint image. Lua function parameter:[opt=false] boolean foreground Whether or not it should be rendered above the space dust. Lua return parameter: number ID of the background.
| L | Lua State |
Lua function: image
Definition at line 86 of file nlua_bkg.c.
| int nlua_loadBackground | ( | nlua_env | env | ) |
Loads the graphics library.
| env | Environment to load graphics library into. |
Definition at line 33 of file nlua_bkg.c.
|
static |
Background methods.
Definition at line 23 of file nlua_bkg.c.