コード例 #1
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Creates a table with a skin, which enables the {@link #add(String)} and {@link #add(String,
  * String)} methods to be used.
  */
 public Table(Skin skin) {
   this.skin = skin;
   layout = new TableLayout();
   layout.setTable(this);
   setTransform(false);
   setTouchable(Touchable.childrenOnly);
 }
コード例 #2
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public void draw(Batch batch, float parentAlpha) {
   validate();
   drawBackground(batch, parentAlpha);
   if (isTransform()) {
     applyTransform(batch, computeTransform());
     if (clip) {
       boolean draw =
           background == null
               ? clipBegin(0, 0, getWidth(), getHeight())
               : clipBegin(
                   layout.getPadLeft(),
                   layout.getPadBottom(),
                   getWidth() - layout.getPadLeft() - layout.getPadRight(),
                   getHeight() - layout.getPadBottom() - layout.getPadTop());
       if (draw) {
         drawChildren(batch, parentAlpha);
         clipEnd();
       }
     } else drawChildren(batch, parentAlpha);
     resetTransform(batch);
   } else super.draw(batch, parentAlpha);
 }
コード例 #3
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Padding at the left edge of the table. */
 public Table padLeft(float padLeft) {
   layout.padLeft(padLeft);
   return this;
 }
コード例 #4
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** If true (the default), positions and sizes are rounded to integers. */
 public void setRound(boolean round) {
   layout.round = round;
 }
コード例 #5
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Returns {@link #getPadTop()} plus {@link #getPadBottom()}. */
 public float getPadY() {
   return layout.getPadTop() + layout.getPadBottom();
 }
コード例 #6
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public float getPadRight() {
   return layout.getPadRight();
 }
コード例 #7
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public float getPadBottom() {
   return layout.getPadBottom();
 }
コード例 #8
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public float getPadLeft() {
   return layout.getPadLeft();
 }
コード例 #9
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Adds {@link Align#bottom} and clears {@link Align#top} for the alignment of the logical table
  * within the table widget.
  */
 public Table bottom() {
   layout.bottom();
   return this;
 }
コード例 #10
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Adds {@link Align#left} and clears {@link Align#right} for the alignment of the logical table
  * within the table widget.
  */
 public Table left() {
   layout.left();
   return this;
 }
コード例 #11
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Adds {@link Align#top} and clears {@link Align#bottom} for the alignment of the logical table
  * within the table widget.
  */
 public Table top() {
   layout.top();
   return this;
 }
コード例 #12
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Sets the alignment of the logical table within the table widget to {@link Align#center}. This
  * clears any other alignment.
  */
 public Table center() {
   layout.center();
   return this;
 }
コード例 #13
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Sets the alignment of the logical table within the table widget. Set to {@link Align#center},
  * {@link Align#top}, {@link Align#bottom} , {@link Align#left} , {@link Align#right}, or any
  * combination of those.
  */
 public Table align(int align) {
   layout.align(align);
   return this;
 }
コード例 #14
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Padding at the right edge of the table. */
 public Table padRight(float padRight) {
   layout.padRight(padRight);
   return this;
 }
コード例 #15
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Padding at the bottom edge of the table. */
 public Table padBottom(float padBottom) {
   layout.padBottom(padBottom);
   return this;
 }
コード例 #16
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public float getPadTop() {
   return layout.getPadTop();
 }
コード例 #17
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public Value getPadLeftValue() {
   return layout.getPadLeftValue();
 }
コード例 #18
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /**
  * Adds {@link Align#right} and clears {@link Align#left} for the alignment of the logical table
  * within the table widget.
  */
 public Table right() {
   layout.right();
   return this;
 }
コード例 #19
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public Value getPadBottomValue() {
   return layout.getPadBottomValue();
 }
コード例 #20
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Turns on table debug lines. */
 public Table debugTable() {
   layout.debugTable();
   return this;
 }
コード例 #21
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public Value getPadRightValue() {
   return layout.getPadRightValue();
 }
コード例 #22
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Turns on cell debug lines. */
 public Table debugCell() {
   layout.debugCell();
   return this;
 }
コード例 #23
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Returns {@link #getPadLeft()} plus {@link #getPadRight()}. */
 public float getPadX() {
   return layout.getPadLeft() + layout.getPadRight();
 }
コード例 #24
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Turns on widget debug lines. */
 public Table debugWidget() {
   layout.debugWidget();
   return this;
 }
コード例 #25
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public int getAlign() {
   return layout.getAlign();
 }
コード例 #26
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Turns on debug lines. */
 public Table debug(Debug debug) {
   layout.debug(debug);
   return this;
 }
コード例 #27
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public Debug getDebug() {
   return layout.getDebug();
 }
コード例 #28
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 public Value getPadTopValue() {
   return layout.getPadTopValue();
 }
コード例 #29
0
ファイル: TableToolkit.java プロジェクト: nwrishi69/libgdx
 public void addDebugRectangle(
     TableLayout layout, Debug type, float x, float y, float w, float h) {
   drawDebug = true;
   if (layout.debugRects == null) layout.debugRects = new Array();
   layout.debugRects.add(new DebugRect(type, x, layout.getTable().getHeight() - y, w, h));
 }
コード例 #30
0
ファイル: Table.java プロジェクト: ngdelamo/libgdx
 /** Padding at the top edge of the table. */
 public Table padTop(float padTop) {
   layout.padTop(padTop);
   return this;
 }