diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index c56adb654..ce81a3534 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -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()); } diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index 87c5895b3..da1ad7280 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -120,6 +120,7 @@ static void set_lua_variables(lua_State *L) { "sat2", CRCInput::RC_sat2 }, { "record", CRCInput::RC_record }, { "play", CRCInput::RC_play }, + { "playpause", CRCInput::RC_playpause }, { "pause", CRCInput::RC_pause }, { "forward", CRCInput::RC_forward }, { "rewind", CRCInput::RC_rewind },