mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
keys play and playpause added for lua
This commit is contained in:
@@ -92,6 +92,8 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
|
||||
std::string btn7 = "";
|
||||
std::string btn8 = "";
|
||||
std::string btn9 = "";
|
||||
std::string btnPlay = "";
|
||||
std::string btnPlayPause = "";
|
||||
lua_Integer x = 100, y = 100, dx = 450, dy = 250;
|
||||
tableLookup(L, "x", x);
|
||||
tableLookup(L, "y", y);
|
||||
@@ -126,6 +128,8 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
|
||||
tableLookup(L, "btn7", btn7);
|
||||
tableLookup(L, "btn8", btn8);
|
||||
tableLookup(L, "btn9", btn9);
|
||||
tableLookup(L, "btnPlay", btnPlay);
|
||||
tableLookup(L, "btnPlayPause", btnPlayPause);
|
||||
color_frame = checkMagicMask(color_frame);
|
||||
color_body = checkMagicMask(color_body);
|
||||
color_shadow = checkMagicMask(color_shadow);
|
||||
@@ -245,6 +249,18 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L)
|
||||
btnS9.text = btn9;
|
||||
buttons.push_back(btnS9);
|
||||
}
|
||||
if (!btnPlay.empty()) {
|
||||
button_label_cc btnSPlay;
|
||||
btnSPlay.button = NEUTRINO_ICON_BUTTON_PLAY;
|
||||
btnSPlay.text = btnPlay;
|
||||
buttons.push_back(btnSPlay);
|
||||
}
|
||||
if (!btnPlayPause.empty()) {
|
||||
button_label_cc btnSPlayPause;
|
||||
btnSPlayPause.button = NEUTRINO_ICON_BUTTON_PLAY;
|
||||
btnSPlayPause.text = btnPlayPause;
|
||||
buttons.push_back(btnSPlayPause);
|
||||
}
|
||||
if (!buttons.empty())
|
||||
footer->setButtonLabels(buttons, footer->getWidth(), footer->getWidth() / buttons.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user