aboutsummaryrefslogtreecommitdiff
path: root/src/client/lua_api/gui/iguiimage.cpp
diff options
context:
space:
mode:
authorAlexander <alex@cogarr.net>2020-06-29 15:29:03 -0400
committerAlexander <alex@cogarr.net>2020-06-29 15:29:03 -0400
commit80789508b9655d25629223b9dcc84b4cfb77ce45 (patch)
tree37e140e532af61c1ca4699c8b6254cf2cb07ed02 /src/client/lua_api/gui/iguiimage.cpp
parent44a1421c393632978d59c0698a93ae22243b97e9 (diff)
downloadbrokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.tar.gz
brokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.tar.bz2
brokengine-80789508b9655d25629223b9dcc84b4cfb77ce45.zip
Updates for mdoc
Also more tests
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}