コード例 #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
ファイル: GroupCullingTest.java プロジェクト: Sasun/libgdx
 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();
 }