]> git.sesse.net Git - nageru/blobdiff - theme.cpp
Hook up the channel click events.
[nageru] / theme.cpp
index d75ac86e2c9a266a7231959b7db83b26a783fc70..5a42dff65e585e51e57d9083a8b3d52775d8a5d3 100644 (file)
--- a/theme.cpp
+++ b/theme.cpp
@@ -414,3 +414,15 @@ void Theme::transition_clicked(int transition_num, float t)
                exit(1);
        }
 }
+
+void Theme::channel_clicked(int preview_num)
+{
+       unique_lock<mutex> lock(m);
+       lua_getglobal(L, "channel_clicked");
+       lua_pushnumber(L, preview_num);
+
+       if (lua_pcall(L, 1, 0, 0) != 0) {
+               fprintf(stderr, "error running function `channel_clicked': %s\n", lua_tostring(L, -1));
+               exit(1);
+       }
+}