#include "scripting/lua_preferences.hpp"
#include "config.hpp"
#include "lua/lua.h"
#include "lua/lauxlib.h"
#include "preferences/general.hpp"
#include "scripting/lua_common.hpp"
Go to the source code of this file.
Namespaces | |
lua_preferences | |
Functions | |
static int | impl_preferences_get (lua_State *L) |
The __index metamethod. More... | |
static int | impl_preferences_set (lua_State *L) |
The __newindex metamethod. More... | |
std::string | lua_preferences::register_table (lua_State *L) |
|
static |
The __index metamethod.
Parameter 1: the preference table. Parameter 2: preference name, must be a string. Returns: preference value. If there isn't such a preference, returns nil.
Definition at line 29 of file lua_preferences.cpp.
References preferences::get_as_attribute(), luaL_checkstring, and luaW_pushscalar().
Referenced by lua_preferences::register_table().
|
static |
The __newindex metamethod.
Parameter 1: the preference table. Parameter 2: preference name, must be a string. Parameter 3: preference value. Returns nothing.
Definition at line 43 of file lua_preferences.cpp.
References luaL_checkstring, luaW_toscalar(), and preferences::set().
Referenced by lua_preferences::register_table().