Textbox added.
[offtopic]
When I was writing the lua drawings I tried to provide such lua commands like draw_get_width() and draw_get_height() but I had no idea how to do so. It would be very nice.
AFAIR I tried to just return the values of camera_screen.width and camera_screen.height (as in gui_draw.c) but they gave strange values. Now I can't recall what it was.
The idea was:
static int luaCB_draw_get_width( lua_State* L )
{
lua_pushnumber( L, camera_screen.width );
return 1;
}
static int luaCB_draw_get_height( lua_State* L )
{
lua_pushnumber( L, camera_screen.height );
return 1;
}
With such functions there could be constant values defined in drawings.lua modules for convenient usage:
WIDTH=draw_get_width()
HEIGHT=draw_get_height()
[/offtopic]