Commit 95ee3118 authored by David Milligan's avatar David Milligan
Browse files

lua.mo: API documentation

ldoc specifies 'int' and 'bool' as the types rather than 'integer' and 'boolean'
enable markdown
include examples

--HG--
branch : lua
parent 84d61459b11c
project = 'ML Lua API'
title = 'ML Lua API'
description = 'Magic Lantern Module for running LUA Scripts'
format = 'markdown'
description = 'Magic Lantern Lua API Documentation'
full_description = [[
The scripting engine looks for scripts in ML/SCRIPTS. Scripts should end with .LUA.
Startup
-------
The scripting engine looks for scripts in `ML/SCRIPTS`. Scripts should end with `.LUA`.
Any scripts found get "loaded" at startup by the scripting engine simply running them.
Therefore the main body of the script should simply *define* the script's menu and
behavior, not actually *execute* anything.
The scripting engine will maintain your script's global state from run to run. So any
global variables you declare will persist until the camera is turned off.
]]
\ No newline at end of file
Standard Libraries
------------------
All of the standard Lua libraries are available except @{os} (replaced by @{dryos}):
* @{coroutine}
* @{package}
* @{string}
* @{table}
* @{math}
* @{io}
* @{debug}
]]
--TODO: figure out how to not hardcode these
examples = { '../../scripts' }
examples.exclude = {
examples[1]..'/brack.c',
examples[1]..'/clock.c',
examples[1]..'/hello.c',
examples[1]..'/hello.py',
examples[1]..'/img.c',
examples[1]..'/keys.c',
examples[1]..'/sokoban.c',
examples[1]..'/test.c'
}
\ No newline at end of file
......@@ -259,37 +259,37 @@ static int luaCB_event_newindex(lua_State * L)
/// Called before a picture is taken
// @param arg unused
// @return whether or not to continue executing CBRs for this event
// @treturn bool whether or not to continue executing CBRs for this event
// @function pre_shoot
SCRIPT_CBR_SET(pre_shoot);
/// Called after a picture is taken
// @param arg unused
// @return whether or not to continue executing CBRs for this event
// @treturn bool whether or not to continue executing CBRs for this event
// @function post_shoot
SCRIPT_CBR_SET(post_shoot);
/// Called periodicaly from shoot_task
// @param arg unused
// @return whether or not to continue executing CBRs for this event
// @treturn bool whether or not to continue executing CBRs for this event
// @function shoot_task
SCRIPT_CBR_SET(shoot_task);
/// Called each second
// @param arg unused
// @return whether or not to continue executing CBRs for this event
// @treturn bool whether or not to continue executing CBRs for this event
// @function seconds_clock
SCRIPT_CBR_SET(seconds_clock);
/// Called when a key is pressed
// @param key the key that was pressed, see @{constants.KEY}
// @return whether or not to continue executing CBRs for this event
// @tparam int key the key that was pressed, see @{constants.KEY}
// @treturn bool whether or not to continue executing CBRs for this event
// @function keypress
SCRIPT_CBR_SET(keypress);
/// Special types of picture taking (e.g. silent pics); so intervalometer and other photo taking routines should use that instead of regular pics
// @param arg unused
// @return whether or not to continue executing CBRs for this event
// @treturn bool whether or not to continue executing CBRs for this event
// @function custom_picture_taking
SCRIPT_CBR_SET(custom_picture_taking);
/// Called after a picture is taken with the intervalometer
// @param interval_count the current interval count
// @return whether or not to continue executing CBRs for this event
// @tparam int interval_count the current interval count
// @treturn bool whether or not to continue executing CBRs for this event
// @function intervalometer
SCRIPT_CBR_SET(intervalometer);
#ifdef CONFIG_VSYNC_EVENTS
......
......@@ -24,35 +24,35 @@ static int luaCB_battery_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// Get battery level in percentage (0-100)
// @tfield integer level
// @tfield int level
if(!strcmp(key, "level"))
{
if((void*)&GetBatteryLevel == (void*)&ret_0) return luaL_error(L, NOT_AVAILABLE);
lua_pushinteger(L, GetBatteryLevel());
}
/// Get battery ID, as registered in Canon menu
// @tfield integer id
// @tfield int id
else if(!strcmp(key, "id"))
{
if((void*)&GetBatteryHist == (void*)&ret_0) return luaL_error(L, NOT_AVAILABLE);
lua_pushinteger(L, GetBatteryHist());
}
/// Get how many "green dots" (3 for a new battery, less for a used battery)
// @tfield integer performance
// @tfield int performance
else if(!strcmp(key, "performance"))
{
if((void*)&GetBatteryPerformance == (void*)&ret_0) return luaL_error(L, NOT_AVAILABLE);
lua_pushinteger(L, GetBatteryPerformance());
}
/// Get estimated time remaining
// @tfield integer time
// @tfield int time
else if(!strcmp(key, "time"))
{
if((void*)&GetBatteryTimeRemaining == (void*)&ret_0) return luaL_error(L, NOT_AVAILABLE);
lua_pushinteger(L, GetBatteryTimeRemaining());
}
/// Get estimated battery drain rate
// @tfield integer drain_rate
// @tfield int drain_rate
else if(!strcmp(key, "drain_rate"))
{
if((void*)&GetBatteryDrainRate == (void*)&ret_0) return luaL_error(L, NOT_AVAILABLE);
......
......@@ -18,34 +18,34 @@ static int luaCB_camera_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// Get/Set shutter speed in apex units x10
// @tfield integer shutter
// @tfield int shutter
if(!strcmp(key, "shutter")) lua_pushinteger(L, RAW2TV(lens_info.raw_shutter));
/// Get/Set lens aperture in apex units x10
// @tfield integer aperture
// @tfield int aperture
else if(!strcmp(key, "aperture")) lua_pushinteger(L, RAW2AV(lens_info.raw_aperture));
/// Get/Set ISO in apex units x10
// @tfield integer iso
// @tfield int iso
else if(!strcmp(key, "iso")) lua_pushinteger(L, RAW2SV(lens_info.raw_iso));
/// Get/Set exposure compensation in apex units x10
// @tfield integer ec
// @tfield int ec
else if(!strcmp(key, "ec")) lua_pushinteger(L, RAW2EC(lens_info.ae));
/// Get/Set flash exposure compensation in apex units x10
// @tfield integer flash_ec
// @tfield int flash_ec
else if(!strcmp(key, "flash_ec")) lua_pushinteger(L, RAW2EC(lens_info.flash_ae));
/// Get/Set kelvin white balance
// @tfield integer kelvin
// @tfield int kelvin
else if(!strcmp(key, "kelvin")) lua_pushinteger(L, lens_info.kelvin);
/// Get the current camera mode, possible values defined in @{constants.MODE}
// @tfield integer mode
// @tfield int mode
else if(!strcmp(key, "mode")) lua_pushinteger(L, shooting_mode);
/// Get the current auto focus mode
// @tfield integer af_mode readonly
// @tfield int af_mode readonly
else if(!strcmp(key, "af_mode")) lua_pushinteger(L, af_mode);
/// Get the current metering mode
// @tfield integer metering_mode readonly
// @tfield int metering_mode readonly
else if(!strcmp(key, "metering_mode")) lua_pushinteger(L, metering_mode);
/// Get the current drive mode
// @tfield integer drive_mode readonly
// @tfield int drive_mode readonly
else if(!strcmp(key, "drive_mode")) lua_pushinteger(L, drive_mode);
/// Get the model name of the camera
// @tfield string model readonly
......@@ -57,10 +57,10 @@ static int luaCB_camera_index(lua_State * L)
// @tfield string firmware readonly
else if(!strcmp(key, "firmware")) lua_pushstring(L, firmware_version);
/// Get the temperature from the efic chip in raw units
// @tfield integer temperature readonly
// @tfield int temperature readonly
else if(!strcmp(key, "temperature")) lua_pushinteger(L, efic_temp);
/// Get the current Canon GUI state of the camera (PLAY, QR, LV, etc)
// @tfield integer state readonly
// @tfield int state readonly
else if(!strcmp(key, "state")) lua_pushinteger(L, gui_state);
else lua_rawget(L, 1);
return 1;
......@@ -112,8 +112,8 @@ static int luaCB_camera_newindex(lua_State * L)
/***
Take a picture
@tparam[opt=64] integer wait how long to wait for camera to be ready to take a picture
@tparam[opt=true] boolean should_af whether or not to use auto focus
@tparam[opt=64] int wait how long to wait for camera to be ready to take a picture
@tparam[opt=true] bool should_af whether or not to use auto focus
@function shoot
*/
static int luaCB_camera_shoot(lua_State * L)
......@@ -127,7 +127,7 @@ static int luaCB_camera_shoot(lua_State * L)
/***
Take a picture in bulb mode
@tparam integer duration bulb duration in seconds
@tparam int duration bulb duration in seconds
@function bulb
*/
static int luaCB_camera_bulb(lua_State * L)
......
......@@ -358,7 +358,7 @@ static int luaCB_font_index(lua_State * L)
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
int spec = lua_rawgetp(L, 1, "_spec");
/// The height of this font in pixels
// @tparam integer height
// @tparam int height
if(!strcmp(key,"height")) lua_pushinteger(L, fontspec_height(spec));
if(!strcmp(key,"width")) lua_pushcfunction(L, luaCB_font_width);
else return 0;
......
......@@ -39,7 +39,7 @@ static int luaCB_display_off(lua_State * L)
/***
Take a screenshot
@tparam[opt] string filename
@tparam[opt] integer mode
@tparam[opt] int mode
@function screenshot
*/
static int luaCB_display_screenshot(lua_State * L)
......@@ -63,11 +63,11 @@ static int luaCB_display_clear(lua_State * L)
/***
Print text to the screen.
@tparam string text
@tparam integer x
@tparam integer y
@tparam int x
@tparam int y
@tparam[opt] font font @{constants.FONT}
@tparam[opt] integer fg foreground @{constants.COLOR}
@tparam[opt] integer bg background @{constants.COLOR}
@tparam[opt] int fg foreground @{constants.COLOR}
@tparam[opt] int bg background @{constants.COLOR}
@function print
*/
static int luaCB_display_print(lua_State * L)
......@@ -85,9 +85,9 @@ static int luaCB_display_print(lua_State * L)
/***
Set a pixel to a color
(omit color param to read the current color)
@tparam integer x
@tparam integer y
@tparam[opt] integer color @{constants.COLOR}
@tparam int x
@tparam int y
@tparam[opt] int color @{constants.COLOR}
@return color @{constants.COLOR}
@function pixel
*/
......@@ -110,11 +110,11 @@ static int luaCB_display_pixel(lua_State * L)
/***
Draw a line
@tparam integer x1
@tparam integer y1
@tparam integer x2
@tparam integer y2
@tparam integer color @{constants.COLOR}
@tparam int x1
@tparam int y1
@tparam int x2
@tparam int y2
@tparam int color @{constants.COLOR}
@function line
*/
static int luaCB_display_line(lua_State * L)
......@@ -130,12 +130,12 @@ static int luaCB_display_line(lua_State * L)
/***
Draw a rect
@tparam integer x
@tparam integer y
@tparam integer w
@tparam integer h
@tparam integer stroke outline @{constants.COLOR}
@tparam[opt] integer fill fill @{constants.COLOR}
@tparam int x
@tparam int y
@tparam int w
@tparam int h
@tparam int stroke outline @{constants.COLOR}
@tparam[opt] int fill fill @{constants.COLOR}
@function rect
*/
static int luaCB_display_rect(lua_State * L)
......@@ -153,11 +153,11 @@ static int luaCB_display_rect(lua_State * L)
/***
Draw a circle
@tparam integer x center x
@tparam integer y center y
@tparam integer r radius
@tparam integer stroke outline @{constants.COLOR}
@tparam[opt] integer fill fill @{constants.COLOR}
@tparam int x center x
@tparam int y center y
@tparam int r radius
@tparam int stroke outline @{constants.COLOR}
@tparam[opt] int fill fill @{constants.COLOR}
@function circle
*/
static int luaCB_display_circle(lua_State * L)
......
......@@ -105,10 +105,10 @@ static int luaCB_dryos_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// Get the value of the seconds clock
// @tfield integer clock
// @tfield int clock
if(!strcmp(key, "clock")) lua_pushinteger(L, get_seconds_clock());
/// Get the value of the milliseconds clock
// @tfield integer ms_clock
// @tfield int ms_clock
else if(!strcmp(key, "ms_clock")) lua_pushinteger(L, get_ms_clock_value());
/// Get/Set the image filename prefix
// @tfield string prefix
......@@ -163,31 +163,31 @@ static int luaCB_dryos_index(lua_State * L)
LoadCalendarFromRTC(&tm);
lua_newtable(L);
/// Second
// @tfield integer sec
// @tfield int sec
setfield(L, "sec", tm.tm_sec);
/// Minute
// @tfield integer min
// @tfield int min
setfield(L, "min", tm.tm_min);
/// Hour
// @tfield integer hour
// @tfield int hour
setfield(L, "hour", tm.tm_hour);
/// Day
// @tfield integer day
// @tfield int day
setfield(L, "day", tm.tm_mday);
/// Month
// @tfield integer month
// @tfield int month
setfield(L, "month", tm.tm_mon+1);
/// Year
// @tfield integer year
// @tfield int year
setfield(L, "year", tm.tm_year+1900);
/// Day of week
// @tfield integer wday
// @tfield int wday
setfield(L, "wday", tm.tm_wday+1);
/// Day of year
// @tfield integer yday
// @tfield int yday
setfield(L, "yday", tm.tm_yday+1);
/// Daylight Savings
// @tfield boolean isdst
// @tfield bool isdst
setboolfield(L, "isdst", tm.tm_isdst);
}
else lua_rawget(L, 1);
......@@ -218,7 +218,7 @@ static int luaCB_dryos_newindex(lua_State * L)
/***
Creates a directory
@treturn boolean whether or not the directory was sucessfully created
@treturn bool whether or not the directory was sucessfully created
@function create
*/
static int luaCB_directory_create(lua_State * L)
......@@ -313,7 +313,7 @@ static int luaCB_directory_index(lua_State * L)
// @tfield string path
if(!strcmp(key, "path")) lua_pushstring(L, path);
/// Get whether or not the directory exists
// @tfield boolean exists
// @tfield bool exists
else if(!strcmp(key, "exists")) lua_pushboolean(L, is_dir(path));
else if(!strcmp(key, "create")) lua_pushcfunction(L, luaCB_directory_create);
else if(!strcmp(key, "children")) lua_pushcfunction(L, luaCB_directory_children);
......@@ -339,19 +339,19 @@ static int luaCB_card_index(lua_State * L)
{
struct card_info * card = lua_touserdata(L, -1);
/// Get the cluster size
// @tfield integer cluster_size
// @tfield int cluster_size
if(!strcmp(key, "cluster_size")) lua_pushinteger(L, card->cluster_size);
/// Get the drive letter
// @tfield string drive_letter
else if(!strcmp(key, "drive_letter")) lua_pushstring(L, card->drive_letter);
/// Get the current Canon file number
// @tfield integer file_number
// @tfield int file_number
else if(!strcmp(key, "file_number")) lua_pushinteger(L, card->file_number);
/// Get the current Canon folder number
// @tfield integer folder_number
// @tfield int folder_number
else if(!strcmp(key, "folder_number")) lua_pushinteger(L, card->folder_number);
/// Get the current free space (in MiB)
// @tfield integer free_space
// @tfield int free_space
else if(!strcmp(key, "free_space")) lua_pushinteger(L, get_free_space_32k(card) * 1024 / 32);
/// Get the type of card
// @tfield string type
......
......@@ -16,7 +16,7 @@
/***
Beep
@tparam[opt=1] integer times number of times to beep
@tparam[opt=1] int times number of times to beep
@function beep
*/
static int luaCB_beep(lua_State * L)
......@@ -28,8 +28,8 @@ static int luaCB_beep(lua_State * L)
/***
Take a picture
@tparam[opt=64] integer wait how long to wait for camera to be ready to take a picture
@tparam[opt=true] boolean should_af whether or not to use auto focus
@tparam[opt=64] int wait how long to wait for camera to be ready to take a picture
@tparam[opt=true] bool should_af whether or not to use auto focus
@function shoot
*/
static int luaCB_shoot(lua_State * L)
......@@ -43,7 +43,7 @@ static int luaCB_shoot(lua_State * L)
/***
Pauses for ms miliseconds and allows other tasks to run.
@tparam integer amount number of milliseconds to sleep
@tparam int amount number of milliseconds to sleep
@function msleep
*/
static int luaCB_msleep(lua_State * L)
......@@ -75,9 +75,9 @@ static int luaCB_led_off(lua_State * L)
/***
Blinks the LED
@tparam[opt=1] integer times Number of times to blink.
@tparam[opt=50] integer delay_on How long the LED is on (in ms)
@tparam[opt=50] integer delay_off How long the LED is off (in ms)
@tparam[opt=1] int times Number of times to blink.
@tparam[opt=50] int delay_on How long the LED is on (in ms)
@tparam[opt=50] int delay_off How long the LED is off (in ms)
@function led_blink
*/
static int luaCB_led_blink(lua_State * L)
......
......@@ -17,13 +17,13 @@ static int luaCB_interval_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// Get/Set the interval time (in seconds)
// @tfield integer time
// @tfield int time
if(!strcmp(key, "time")) lua_pushinteger(L, get_interval_time());
/// Get the current number of pictures that have been taken
// @tfield integer count
// @tfield int count
else if(!strcmp(key, "count")) lua_pushinteger(L, get_interval_count());
/// Get whether or not the intervalometer is currently running
// @tfield boolean running
// @tfield bool running
else if(!strcmp(key, "running")) lua_pushinteger(L, is_intervalometer_running());
else lua_rawget(L, 1);
return 1;
......
......@@ -17,7 +17,7 @@ int module_send_keypress(int module_key);
/***
Send a keypress.
@tparam integer key the key to press
@tparam int key the key to press
@function press
*/
static int luaCB_key_press(lua_State * L)
......@@ -29,9 +29,9 @@ static int luaCB_key_press(lua_State * L)
/***
Wait for a key to be pressed.
@tparam[opt] integer key
@tparam[opt] integer timeout
@return the key that was pressed
@tparam[opt] int key
@tparam[opt] int timeout
@treturn int the key that was pressed
@function wait
*/
static int luaCB_key_wait(lua_State * L)
......@@ -59,7 +59,7 @@ static int luaCB_key_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// The last key that was pressed.
// @tfield integer last
// @tfield int last
if(!strcmp(key, "last")) lua_pushinteger(L, last_keypress);
else lua_rawget(L, 1);
return 1;
......
......@@ -21,22 +21,22 @@ static int luaCB_lens_index(lua_State * L)
// @tfield string name readonly
if(!strcmp(key, "name")) lua_pushstring(L, lens_info.name);
/// Get the focal length of the lens (in mm)
// @tfield integer focal_length readonly
// @tfield int focal_length readonly
else if(!strcmp(key, "focal_length")) lua_pushinteger(L, lens_info.focal_len);
/// Get the current focal distance (in cm)
// @tfield integer focal_distance readonly
// @tfield int focal_distance readonly
else if(!strcmp(key, "focal_distance")) lua_pushinteger(L, lens_info.focus_dist);
/// Get the hyperfocal distance of the lens (in mm)
// @tfield integer hyperfocal readonly
// @tfield int hyperfocal readonly
else if(!strcmp(key, "hyperfocal")) lua_pushinteger(L, lens_info.hyperfocal);
/// Get the distance to the DOF near (in mm)
// @tfield integer dof_near readonly
// @tfield int dof_near readonly
else if(!strcmp(key, "dof_near")) lua_pushinteger(L, lens_info.dof_near);
/// Get the distance to the DOF far (in mm)
// @tfield integer dof_far readonly
// @tfield int dof_far readonly
else if(!strcmp(key, "dof_far")) lua_pushinteger(L, lens_info.dof_far);
/// Get whether or not auto focus is enabled
// @tfield boolean af readonly
// @tfield bool af readonly
else if(!strcmp(key, "af")) lua_pushboolean(L, !is_manual_focus());
else lua_rawget(L, 1);
return 1;
......@@ -58,10 +58,10 @@ static int luaCB_lens_newindex(lua_State * L)
/***
Moves the focus motor a specified number of steps. Only works in LV.
@tparam integer num_steps
@tparam[opt=1] integer step_size
@tparam[opt=1] integer wait
@tparam[opt=0] integer extra_delay
@tparam int num_steps
@tparam[opt=1] int step_size
@tparam[opt=1] int wait
@tparam[opt=0] int extra_delay
@function focus
*/
static int luaCB_lens_focus(lua_State * L)
......
......@@ -19,7 +19,7 @@ static int luaCB_lv_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// Whether or not LV is running.
// @tfield boolean enabled
// @tfield bool enabled
if(!strcmp(key, "enabled")) lua_pushboolean(L, lv);
else lua_rawget(L, 1);
return 1;
......
......@@ -326,7 +326,7 @@ static int luaCB_menu_index(lua_State * L)
{
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// Get whether or not the ML menu is visible
//@tfield boolean visible
//@tfield bool visible
if(!strcmp(key, "visible")) lua_pushboolean(L, gui_menu_shown());
else lua_rawget(L, 1);
return 1;
......@@ -351,7 +351,7 @@ static int luaCB_menu_instance_index(lua_State * L)
LUA_PARAM_STRING_OPTIONAL(key, 2, "");
/// current value of the menu item
// @tfield integer value
// @tfield ?int|string value
if(!strcmp(key, "value"))
{
if(script_entry->menu_entry->choices)
......@@ -373,56 +373,56 @@ static int luaCB_menu_instance_index(lua_State * L)
// @tfield string help2
else if(!strcmp(key, "help2")) lua_pushstring(L, script_entry->menu_entry->help2);
/// Advanced setting in submenus
// @tfield boolean advanced
// @tfield bool advanced
else if(!strcmp(key, "advanced")) lua_pushinteger(L, script_entry->menu_entry->advanced);
/// Dependencies for this menu item.
// If the dependecies are not met, the item will be greyed out and a warning will appear at the bottom of the screen.
// @tfield integer depends_on @{constants.DEPENDS_ON}
// @tfield int depends_on @{constants.DEPENDS_ON}
else if(!strcmp(key, "depends_on")) lua_pushinteger(L, script_entry->menu_entry->depends_on);
/// Editing mode for the menu item
// @tfield integer edit_mode
// @tfield int edit_mode
else if(!strcmp(key, "edit_mode")) lua_pushinteger(L, script_entry->menu_entry->edit_mode);
/// Hidden from main menu
// @tfield boolean hidden
// @tfield bool hidden
else if(!strcmp(key, "hidden")) lua_pushboolean(L, script_entry->menu_entry->hidden);
/// The type of icon to use for this menu item
// @tfield integer icon_type @{constants.ICON_TYPE}
// @tfield int icon_type @{constants.ICON_TYPE}
else if(!strcmp(key, "icon_type")) lua_pushinteger(L, script_entry->menu_entry->icon_type);
/// Hidden from junkie menu
// @tfield boolean jhidden
// @tfield bool jhidden
else if(!strcmp(key, "jhidden")) lua_pushboolean(L, script_entry->menu_entry->jhidden);
/// The maximum value the menu item can have
// @tfield integer max
// @tfield int max
else if(!strcmp(key, "max")) lua_pushinteger(L, script_entry->menu_entry->max);
/// The minimum value the menu item can have
// @tfield integer min
// @tfield int min
else if(!strcmp(key, "min")) lua_pushinteger(L, script_entry->menu_entry->min);
/// Whether or not the menu is selected
// @tfield integer selected
// @tfield int selected
else if(!strcmp(key, "selected")) lua_pushboolean(L, script_entry->menu_entry->selected);
/// Special hide, not toggleable by user
// @tfield boolean shidden
// @tfield bool shidden
else if(!strcmp(key, "shidden")) lua_pushboolean(L, script_entry->menu_entry->shidden);
/// Present in "my menu"
// @tfield boolean starred
// @tfield bool starred
else if(!strcmp(key, "starred")) lua_pushboolean(L, script_entry->menu_entry->starred);
/// Submenu Height
// @tfield integer submenu_height
// @tfield int submenu_height
else if(!strcmp(key, "submenu_height")) lua_pushinteger(L, script_entry->menu_entry->submenu_height);
/// Submenu Width
// @tfield integer submenu_width
// @tfield int submenu_width
else if(!strcmp(key, "submenu_width")) lua_pushinteger(L, script_entry->menu_entry->submenu_width);
/// The unit for the menu item's value
// @tfield integer unit @{constants.UNIT}
// @tfield int unit @{constants.UNIT}