mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
- luainstance: switch to lua_Integer/lua_Unsigned
This commit is contained in:
@@ -1198,7 +1198,7 @@ int CLuaInstance::MenuNew(lua_State *L)
|
||||
std::string name, icon;
|
||||
tableLookup(L, "name", name) || tableLookup(L, "title", name);
|
||||
tableLookup(L, "icon", icon);
|
||||
int mwidth;
|
||||
lua_Integer mwidth;
|
||||
if(tableLookup(L, "mwidth", mwidth))
|
||||
m = new CMenuWidget(name.c_str(), icon.c_str(), mwidth);
|
||||
else
|
||||
@@ -1242,8 +1242,8 @@ int CLuaInstance::MenuAddKey(lua_State *L)
|
||||
|
||||
std::string action; tableLookup(L, "action", action);
|
||||
std::string id; tableLookup(L, "id", id);
|
||||
int directkey = CRCInput::RC_nokey; tableLookup(L, "directkey", directkey);
|
||||
if (action != "" && directkey != (int) CRCInput::RC_nokey) {
|
||||
lua_Unsigned directkey = CRCInput::RC_nokey; tableLookup(L, "directkey", directkey);
|
||||
if ((action != "") && (directkey != CRCInput::RC_nokey)) {
|
||||
CLuaMenuForwarder *forwarder = new CLuaMenuForwarder(L, action, id);
|
||||
m->m->addKey(directkey, forwarder, action);
|
||||
m->targets.push_back(forwarder);
|
||||
@@ -1303,8 +1303,8 @@ int CLuaInstance::MenuAddItem(lua_State *L)
|
||||
m->tofree.push_back(icon);
|
||||
}
|
||||
|
||||
int directkey = CRCInput::RC_nokey; tableLookup(L, "directkey", directkey);
|
||||
int pulldown = false; tableLookup(L, "pulldown", pulldown);
|
||||
lua_Unsigned directkey = CRCInput::RC_nokey; tableLookup(L, "directkey", directkey);
|
||||
lua_Integer pulldown = false; tableLookup(L, "pulldown", pulldown);
|
||||
|
||||
bool enabled = true;
|
||||
if (!(tableLookup(L, "enabled", enabled) || tableLookup(L, "active", enabled)))
|
||||
@@ -1375,14 +1375,14 @@ int CLuaInstance::MenuAddItem(lua_State *L)
|
||||
b->str_val = value;
|
||||
std::string valid_chars = "abcdefghijklmnopqrstuvwxyz0123456789!\"§$%&/()=?-. ";
|
||||
tableLookup(L, "valid_chars", valid_chars);
|
||||
int sms = 0; tableLookup(L, "sms", sms);
|
||||
int size = 30; tableLookup(L, "size", size);
|
||||
lua_Integer sms = 0; tableLookup(L, "sms", sms);
|
||||
lua_Integer size = 30; tableLookup(L, "size", size);
|
||||
CLuaMenuStringinput *stringinput = new CLuaMenuStringinput(L, action, id, b->name.c_str(), &b->str_val, size, valid_chars, m->observ, icon, sms);
|
||||
mi = new CMenuForwarder(b->name, enabled, b->str_val, stringinput, NULL/*ActionKey*/, directkey, icon, right_icon);
|
||||
m->targets.push_back(stringinput);
|
||||
} else if (type == "keyboardinput") {
|
||||
b->str_val = value;
|
||||
int size = 0; tableLookup(L, "size", size);
|
||||
lua_Integer size = 0; tableLookup(L, "size", size);
|
||||
std::string help = ""; tableLookup(L, "help", help);
|
||||
std::string help2 = ""; tableLookup(L, "help2", help2);
|
||||
CLuaMenuKeyboardinput *keyboardinput = new CLuaMenuKeyboardinput(L, action, id, b->name.c_str(), &b->str_val, size, m->observ, icon, help, help2);
|
||||
@@ -1390,7 +1390,7 @@ int CLuaInstance::MenuAddItem(lua_State *L)
|
||||
m->targets.push_back(keyboardinput);
|
||||
} else if (type == "filebrowser") {
|
||||
b->str_val = value;
|
||||
int dirMode = 0; tableLookup(L, "dir_mode", dirMode);
|
||||
lua_Integer dirMode = 0; tableLookup(L, "dir_mode", dirMode);
|
||||
CLuaMenuFilebrowser *filebrowser = new CLuaMenuFilebrowser(L, action, id, &b->str_val, dirMode);
|
||||
lua_pushstring(L, "filter");
|
||||
lua_gettable(L, -2);
|
||||
@@ -1478,7 +1478,7 @@ int CLuaInstance::HintboxNew(lua_State *L)
|
||||
tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name);
|
||||
tableLookup(L, "text", text);
|
||||
tableLookup(L, "icon", icon);
|
||||
int width = 450;
|
||||
lua_Integer width = 450;
|
||||
tableLookup(L, "width", width);
|
||||
|
||||
CLuaHintbox **udata = (CLuaHintbox **) lua_newuserdata(L, sizeof(CLuaHintbox *));
|
||||
@@ -1600,7 +1600,7 @@ int CLuaInstance::MessageboxExec(lua_State *L)
|
||||
tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name);
|
||||
tableLookup(L, "text", text);
|
||||
tableLookup(L, "icon", icon);
|
||||
int timeout = -1, width = 450, return_default_on_timeout = 0, show_buttons = 0, default_button = 0;
|
||||
lua_Integer timeout = -1, width = 450, return_default_on_timeout = 0, show_buttons = 0, default_button = 0;
|
||||
tableLookup(L, "timeout", timeout);
|
||||
tableLookup(L, "width", width);
|
||||
tableLookup(L, "return_default_on_timeout", return_default_on_timeout);
|
||||
@@ -1714,7 +1714,7 @@ int CLuaInstance::CWindowNew(lua_State *L)
|
||||
std::string btnGreen = "";
|
||||
std::string btnYellow = "";
|
||||
std::string btnBlue = "";
|
||||
int x = 100, y = 100, dx = 450, dy = 250;
|
||||
lua_Integer x = 100, y = 100, dx = 450, dy = 250;
|
||||
tableLookup(L, "x", x);
|
||||
tableLookup(L, "y", y);
|
||||
tableLookup(L, "dx", dx);
|
||||
@@ -1969,8 +1969,8 @@ int CLuaInstance::SignalBoxNew(lua_State *L)
|
||||
lua_assert(lua_istable(L,1));
|
||||
|
||||
std::string name, icon = std::string(NEUTRINO_ICON_INFO);
|
||||
int x = 110, y = 150, dx = 430, dy = 150;
|
||||
int vertical = true;
|
||||
lua_Integer x = 110, y = 150, dx = 430, dy = 150;
|
||||
lua_Integer vertical = true;
|
||||
CLuaCWindow* parent = NULL;
|
||||
tableLookup(L, "x", x);
|
||||
tableLookup(L, "y", y);
|
||||
@@ -2048,11 +2048,11 @@ int CLuaInstance::ComponentsTextNew(lua_State *L)
|
||||
lua_assert(lua_istable(L,1));
|
||||
|
||||
CLuaCWindow* parent = NULL;
|
||||
int x=10, y=10, dx=100, dy=100;
|
||||
lua_Integer x=10, y=10, dx=100, dy=100;
|
||||
std::string text = "";
|
||||
std::string tmpMode = "";
|
||||
int mode = CTextBox::AUTO_WIDTH;
|
||||
int font_text = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||
lua_Integer mode = CTextBox::AUTO_WIDTH;
|
||||
lua_Integer font_text = SNeutrinoSettings::FONT_TYPE_MENU;
|
||||
lua_Unsigned color_text = (lua_Unsigned)COL_MENUCONTENT_TEXT;
|
||||
lua_Unsigned color_frame = (lua_Unsigned)COL_MENUCONTENT_PLUS_6;
|
||||
lua_Unsigned color_body = (lua_Unsigned)COL_MENUCONTENT_PLUS_0;
|
||||
|
Reference in New Issue
Block a user