aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui/iguiimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/lua_api/gui/iguiimage.cpp')
-rw-r--r--src/client/lua_api/gui/iguiimage.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/client/lua_api/gui/iguiimage.cpp b/src/client/lua_api/gui/iguiimage.cpp
index 267cbd2..81f6568 100644
--- a/src/client/lua_api/gui/iguiimage.cpp
+++ b/src/client/lua_api/gui/iguiimage.cpp
@@ -17,9 +17,6 @@ extern "C" {
#include "../../callbackhandeler.hpp"
#include <shared/lua_api/common.hpp>
-/***
-@module gui
-*/
using namespace irr;
using namespace video;
using namespace gui;
@@ -28,14 +25,14 @@ extern IrrlichtDevice* device;
extern IGUIEnvironment* env;
/***
-@function newiguiimage()
+@function gui.newiguiimage()
Creates a new guielement with an image.
The size of the iguielement is the same as the itexture used for it's creation.
@tparam vector2d position The upper-left hand corner of the element.
it is offset from the upper-left of the parent element.
@tparam number alpha The transparency of the element.
@tparam itexture texture The texture to display on this element.
-@tparam ?iguielement parent The parent element of the button.
+@tparam? iguielement parent The parent element of the button.
@treturn iguifileopendialog The button element
*/
//newiguiimage({startx,starty},alpha,{itexture}[,parent]) -> {guielement}
@@ -70,6 +67,12 @@ static int newiguiimage(lua_State* L){
return 1;
}
+/***
+Set the color of the image
+Sets the color offset (additive color) for the image.
+@function iguiimage:setcolor(color c)
+@tparam color color The color to set the image as
+*/
//setcolor(self,{r,g,b,a})
int setcolor(lua_State* L){
long r,g,b,a;
@@ -81,6 +84,12 @@ int setcolor(lua_State* L){
return 0;
}
+/***
+Set the image of the element
+Sets the image for the element. TODO: Memory leak of old images?
+@function iguiimage:setimage(itexture texture)
+@tparam itexture texture The texture to set this image element to
+*/
//setimage(self,itexture)
int setimage(lua_State *L){
lua_getfield(L,-1,"texture");//{iguiimg},{itex}