OK Key added for lua

This commit is contained in:
Frankenstone
2021-02-07 21:37:22 +01:00
committed by Thilo Graf
parent 18b2c81295
commit 46b0d73099

View File

@@ -94,6 +94,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
std::string btn9 = "";
std::string btnPlay = "";
std::string btnPlayPause = "";
std::string btnOk = "";
lua_Integer x = 100, y = 100, dx = 450, dy = 250;
tableLookup(L, "x", x);
tableLookup(L, "y", y);
@@ -130,6 +131,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
tableLookup(L, "btn9", btn9);
tableLookup(L, "btnPlay", btnPlay);
tableLookup(L, "btnPlayPause", btnPlayPause);
tableLookup(L, "btnOk", btnOk);
color_frame = checkMagicMask(color_frame);
color_body = checkMagicMask(color_body);
color_shadow = checkMagicMask(color_shadow);
@@ -261,6 +263,12 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
btnSPlayPause.text = btnPlayPause;
buttons.push_back(btnSPlayPause);
}
if (!btnOk.empty()) {
button_label_cc btnSOk;
btnSOk.button = NEUTRINO_ICON_BUTTON_OKAY;
btnSOk.text = btnOk;
buttons.push_back(btnSOk);
}
if (!buttons.empty())
footer->setButtonLabels(buttons, footer->getWidth(), footer->getWidth() / buttons.size());
}