Guest User

Untitled

a guest
Jul 1st, 2016
149
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // my custom function declaration.
  2. public Table addTitleBar(Label label, TextButton close) {
  3.         Table titleBar_Table = new Table(mySkin);
  4.         close.setText("-");
  5.         titleBar_Table.setBackground("titleBar");
  6.         titleBar_Table.add(label).padLeft(30).expandX();
  7.         titleBar_Table.add(close).size(PlayScreen.VIEWPORT_WIDTH / 7.11f).row();
  8.         return titleBar_Table;
  9. }
  10.  
  11. // using this function
  12. mainTable.add(abc).row();
  13. mainTable.add(mno).row();
  14. mainTable.add(addTitleBar(myLabel,myButton)).row();// <---------- USED HERE
  15. mainTable.add(xyz).row();
RAW Paste Data