SETUP key added for lua

This commit is contained in:
Frankenstone
2021-03-09 15:58:16 +01:00
committed by Thilo Graf
parent 30a5ca4b33
commit 77de69f57f

View File

@@ -95,6 +95,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
std::string btnPlay = ""; std::string btnPlay = "";
std::string btnPlayPause = ""; std::string btnPlayPause = "";
std::string btnOk = ""; std::string btnOk = "";
std::string btnSetup = "";
lua_Integer x = 100, y = 100, dx = 450, dy = 250; lua_Integer x = 100, y = 100, dx = 450, dy = 250;
tableLookup(L, "x", x); tableLookup(L, "x", x);
tableLookup(L, "y", y); tableLookup(L, "y", y);
@@ -132,6 +133,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
tableLookup(L, "btnPlay", btnPlay); tableLookup(L, "btnPlay", btnPlay);
tableLookup(L, "btnPlayPause", btnPlayPause); tableLookup(L, "btnPlayPause", btnPlayPause);
tableLookup(L, "btnOk", btnOk); tableLookup(L, "btnOk", btnOk);
tableLookup(L, "btnSetup", btnSetup);
color_frame = checkMagicMask(color_frame); color_frame = checkMagicMask(color_frame);
color_body = checkMagicMask(color_body); color_body = checkMagicMask(color_body);
color_shadow = checkMagicMask(color_shadow); color_shadow = checkMagicMask(color_shadow);
@@ -269,6 +271,12 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
btnSOk.text = btnOk; btnSOk.text = btnOk;
buttons.push_back(btnSOk); buttons.push_back(btnSOk);
} }
if (!btnSetup.empty()) {
button_label_cc btnSSetup;
btnSSetup.button = NEUTRINO_ICON_BUTTON_MENU;
btnSSetup.text = btnSetup;
buttons.push_back(btnSSetup);
}
if (!buttons.empty()) if (!buttons.empty())
footer->setButtonLabels(buttons, footer->getWidth(), footer->getWidth() / buttons.size()); footer->setButtonLabels(buttons, footer->getWidth(), footer->getWidth() / buttons.size());
} }