예제 #1
0
파일: Table.java 프로젝트: ngdelamo/libgdx
 /**
  * Sets the background drawable and sets the table's padding to {@link Drawable#getBottomHeight()}
  * , {@link Drawable#getTopHeight()}, {@link Drawable#getLeftWidth()}, and {@link
  * Drawable#getRightWidth()}.
  *
  * @param background If null, the background will be cleared and all padding is removed.
  */
 public void setBackground(Drawable background) {
   if (this.background == background) return;
   this.background = background;
   if (background == null) pad(null);
   else {
     padBottom(background.getBottomHeight());
     padTop(background.getTopHeight());
     padLeft(background.getLeftWidth());
     padRight(background.getRightWidth());
     invalidate();
   }
 }
예제 #2
0
 public void resize(int width, int height) {
   stage.getViewport().update(width, height, true);
   root.invalidate();
 }
예제 #3
0
파일: Table.java 프로젝트: ngdelamo/libgdx
 /** Removes all actors and cells from the table. */
 public void clearChildren() {
   super.clearChildren();
   layout.clear();
   invalidate();
 }
예제 #4
0
파일: Table.java 프로젝트: ngdelamo/libgdx
 /**
  * Causes the contents to be clipped if they exceed the table widget bounds. Enabling clipping
  * will set {@link #setTransform(boolean)} to true.
  */
 public void setClip(boolean enabled) {
   clip = enabled;
   setTransform(enabled);
   invalidate();
 }