com.badlogic.gdx.scenes.scene2d.ui.Table.invalidate()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(258)

本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Table.invalidate()方法的一些代码示例,展示了Table.invalidate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.invalidate()方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Table
类名称:Table
方法名:invalidate

Table.invalidate介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

  1. /** Turns on cell debug lines. */
  2. public Table debugCell () {
  3. super.setDebug(true);
  4. if (debug != Debug.cell) {
  5. this.debug = Debug.cell;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: libgdx/libgdx

  1. /** @param background May be null to clear the background. */
  2. public void setBackground (Drawable background) {
  3. if (this.background == background) return;
  4. float padTopOld = getPadTop(), padLeftOld = getPadLeft(), padBottomOld = getPadBottom(), padRightOld = getPadRight();
  5. this.background = background; // The default pad values use the background's padding.
  6. float padTopNew = getPadTop(), padLeftNew = getPadLeft(), padBottomNew = getPadBottom(), padRightNew = getPadRight();
  7. if (padTopOld + padBottomOld != padTopNew + padBottomNew || padLeftOld + padRightOld != padLeftNew + padRightNew)
  8. invalidateHierarchy();
  9. else if (padTopOld != padTopNew || padLeftOld != padLeftNew || padBottomOld != padBottomNew || padRightOld != padRightNew)
  10. invalidate();
  11. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns on table debug lines. */
  2. public Table debugTable () {
  3. super.setDebug(true);
  4. if (debug != Debug.table) {
  5. this.debug = Debug.table;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: libgdx/libgdx

  1. /** @param background May be null to clear the background. */
  2. public void setBackground (Drawable background) {
  3. if (this.background == background) return;
  4. float padTopOld = getPadTop(), padLeftOld = getPadLeft(), padBottomOld = getPadBottom(), padRightOld = getPadRight();
  5. this.background = background; // The default pad values use the background's padding.
  6. float padTopNew = getPadTop(), padLeftNew = getPadLeft(), padBottomNew = getPadBottom(), padRightNew = getPadRight();
  7. if (padTopOld + padBottomOld != padTopNew + padBottomNew || padLeftOld + padRightOld != padLeftNew + padRightNew)
  8. invalidateHierarchy();
  9. else if (padTopOld != padTopNew || padLeftOld != padLeftNew || padBottomOld != padBottomNew || padRightOld != padRightNew)
  10. invalidate();
  11. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns on cell debug lines. */
  2. public Table debugCell () {
  3. super.setDebug(true);
  4. if (debug != Debug.cell) {
  5. this.debug = Debug.cell;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: com.badlogicgames.gdx/gdx

  1. /** @param background May be null to clear the background. */
  2. public void setBackground (Drawable background) {
  3. if (this.background == background) return;
  4. float padTopOld = getPadTop(), padLeftOld = getPadLeft(), padBottomOld = getPadBottom(), padRightOld = getPadRight();
  5. this.background = background; // The default pad values use the background's padding.
  6. float padTopNew = getPadTop(), padLeftNew = getPadLeft(), padBottomNew = getPadBottom(), padRightNew = getPadRight();
  7. if (padTopOld + padBottomOld != padTopNew + padBottomNew || padLeftOld + padRightOld != padLeftNew + padRightNew)
  8. invalidateHierarchy();
  9. else if (padTopOld != padTopNew || padLeftOld != padLeftNew || padBottomOld != padBottomNew || padRightOld != padRightNew)
  10. invalidate();
  11. }

代码示例来源:origin: libgdx/libgdx

  1. /** Causes the contents to be clipped if they exceed the table actor's bounds. Enabling clipping will set
  2. * {@link #setTransform(boolean)} to true. */
  3. public void setClip (boolean enabled) {
  4. clip = enabled;
  5. setTransform(enabled);
  6. invalidate();
  7. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns on table debug lines. */
  2. public Table debugTable () {
  3. super.setDebug(true);
  4. if (debug != Debug.table) {
  5. this.debug = Debug.table;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns on actor debug lines. */
  2. public Table debugActor () {
  3. super.setDebug(true);
  4. if (debug != Debug.actor) {
  5. this.debug = Debug.actor;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: libgdx/libgdx

  1. /** Causes the contents to be clipped if they exceed the table actor's bounds. Enabling clipping will set
  2. * {@link #setTransform(boolean)} to true. */
  3. public void setClip (boolean enabled) {
  4. clip = enabled;
  5. setTransform(enabled);
  6. invalidate();
  7. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns on actor debug lines. */
  2. public Table debugActor () {
  3. super.setDebug(true);
  4. if (debug != Debug.actor) {
  5. this.debug = Debug.actor;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns debug lines on or off. */
  2. public Table debug (Debug debug) {
  3. super.setDebug(debug != Debug.none);
  4. if (this.debug != debug) {
  5. this.debug = debug;
  6. if (debug == Debug.none)
  7. clearDebugRects();
  8. else
  9. invalidate();
  10. }
  11. return this;
  12. }

代码示例来源:origin: libgdx/libgdx

  1. /** Turns debug lines on or off. */
  2. public Table debug (Debug debug) {
  3. super.setDebug(debug != Debug.none);
  4. if (this.debug != debug) {
  5. this.debug = debug;
  6. if (debug == Debug.none)
  7. clearDebugRects();
  8. else
  9. invalidate();
  10. }
  11. return this;
  12. }

代码示例来源:origin: libgdx/libgdx

  1. public void resize (int width, int height) {
  2. stage.getViewport().update(width, height, true);
  3. root.invalidate();
  4. }

代码示例来源:origin: libgdx/libgdx

  1. @Override
  2. public void resize (int width, int height) {
  3. ui.setSize(width, height);
  4. ui.invalidate();
  5. stage.getViewport().update(width, height, true);
  6. }

代码示例来源:origin: libgdx/libgdx

  1. /** Indicates that subsequent cells should be added to a new row and returns the cell values that will be used as the defaults
  2. * for all cells in the new row. */
  3. public Cell row () {
  4. if (cells.size > 0) {
  5. if (!implicitEndRow) {
  6. if (cells.peek().endRow) return rowDefaults; // Row was already ended.
  7. endRow();
  8. }
  9. invalidate();
  10. }
  11. implicitEndRow = false;
  12. if (rowDefaults != null) cellPool.free(rowDefaults);
  13. rowDefaults = obtainCell();
  14. rowDefaults.clear();
  15. return rowDefaults;
  16. }

代码示例来源:origin: libgdx/libgdx

  1. /** Indicates that subsequent cells should be added to a new row and returns the cell values that will be used as the defaults
  2. * for all cells in the new row. */
  3. public Cell row () {
  4. if (cells.size > 0) {
  5. if (!implicitEndRow) {
  6. if (cells.peek().endRow) return rowDefaults; // Row was already ended.
  7. endRow();
  8. }
  9. invalidate();
  10. }
  11. implicitEndRow = false;
  12. if (rowDefaults != null) cellPool.free(rowDefaults);
  13. rowDefaults = obtainCell();
  14. rowDefaults.clear();
  15. return rowDefaults;
  16. }

代码示例来源:origin: com.badlogicgames.gdx/gdx

  1. /** Turns on cell debug lines. */
  2. public Table debugCell () {
  3. super.setDebug(true);
  4. if (debug != Debug.cell) {
  5. this.debug = Debug.cell;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: com.badlogicgames.gdx/gdx

  1. /** Turns on actor debug lines. */
  2. public Table debugActor () {
  3. super.setDebug(true);
  4. if (debug != Debug.actor) {
  5. this.debug = Debug.actor;
  6. invalidate();
  7. }
  8. return this;
  9. }

代码示例来源:origin: com.badlogicgames.gdx/gdx

  1. /** Turns on table debug lines. */
  2. public Table debugTable () {
  3. super.setDebug(true);
  4. if (debug != Debug.table) {
  5. this.debug = Debug.table;
  6. invalidate();
  7. }
  8. return this;
  9. }

相关文章