Advertisement
BugFix

Untitled

Jan 20th, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. int window_add_buttons(lua_State* L)
  2. {
  3.     ContainerWindow* lw = dynamic_cast<ContainerWindow*>(window_arg(L));
  4.     lw->add_buttons(L);
  5.     return 0;
  6. }
  7.  
  8. void add_buttons(lua_State* L)
  9. {
  10.     int nargs = lua_gettop(L);
  11.     int i = 2;
  12.     TEW* panel = new TEW(NULL,this,0,true);
  13.     panel->align(alBottom,50);
  14.     Layout layout(panel,this);
  15.     while (i < nargs) {
  16.         layout << Button(luaL_checkstring(L,i),(EH)&ContainerWindow::on_button,(void*)luaL_checkstring(L,i+1));
  17.         i += 2;
  18.     }
  19.     layout.release();
  20.     add(panel);
  21.     size();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement