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

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

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

Table.debug介绍

[英]Turns debug lines on or off.
[中]打开或关闭调试行。

代码示例

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

public void setDebug (boolean enabled) {
  debug(enabled ? Debug.all : Debug.none);
}

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

public void setDebug (boolean enabled) {
  debug(enabled ? Debug.all : Debug.none);
}

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

Table label (String text) {
  Table table = new Table().debug();
  table.add(new Label(text, skin)).fill().expand();
  return table;
}

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

/** Removes all actors and cells from the table (same as {@link #clearChildren()}) and additionally resets all table properties
 * and cell, column, and row defaults. */
public void reset () {
  clearChildren();
  padTop = backgroundTop;
  padLeft = backgroundLeft;
  padBottom = backgroundBottom;
  padRight = backgroundRight;
  align = Align.center;
  debug(Debug.none);
  cellDefaults.reset();
  for (int i = 0, n = columnDefaults.size; i < n; i++) {
    Cell columnCell = columnDefaults.get(i);
    if (columnCell != null) cellPool.free(columnCell);
  }
  columnDefaults.clear();
}

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

/** Removes all actors and cells from the table (same as {@link #clearChildren()}) and additionally resets all table properties
 * and cell, column, and row defaults. */
public void reset () {
  clearChildren();
  padTop = backgroundTop;
  padLeft = backgroundLeft;
  padBottom = backgroundBottom;
  padRight = backgroundRight;
  align = Align.center;
  debug(Debug.none);
  cellDefaults.reset();
  for (int i = 0, n = columnDefaults.size; i < n; i++) {
    Cell columnCell = columnDefaults.get(i);
    if (columnCell != null) cellPool.free(columnCell);
  }
  columnDefaults.clear();
}

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

@Override
public void create () {
  skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  image2 = new TextureRegion(new Texture(Gdx.files.internal("data/badlogic.jpg")));
  ui = new Stage();
  Gdx.input.setInputProcessor(ui);
  root = new Table();
  root.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  ui.addActor(root);
  root.debug();
  Image image = new Image(image2);
  image.setScaling(Scaling.fill);
  root.add(image).width(image2.getRegionWidth()).height(image2.getRegionHeight());
}

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

container = new Table();
ui.addActor(container);
container.debug();
Table table = new Table();
ScrollPane scroll = new ScrollPane(table);

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

@Override
public void create () {
  batch = new SpriteBatch();
  skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  stage = new Stage();
  Gdx.input.setInputProcessor(stage);
  Table table = new Table();
  stage.addActor(table);
  table.setPosition(200, 65);
  Label label1 = new Label("This text is scaled 2x.", skin);
  label1.setFontScale(2);
  Label label2 = new Label(
    "This text is scaled. This text is scaled. This text is scaled. This text is scaled. This text is scaled. ", skin);
  label2.setWrap(true);
  label2.setFontScale(0.75f, 0.75f);
  table.debug();
  table.add(label1);
  table.row();
  table.add(label2).fill();
  table.pack();
}

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

((Table)actor).debug(debugTableUnderMouse);

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

((Table)actor).debug(debugTableUnderMouse);

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

table.debug();

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

public void create () {
  stage = new Stage();
  Skin skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  label = new Label("", skin);
  Table root = new Table(skin);
  root.setFillParent(true);
  root.setBackground(skin.getDrawable("default-pane"));
  root.debug().defaults().space(6);
  root.add(new TextButton("Button 1", skin));
  root.add(new TextButton("Button 2", skin)).row();
  root.add("Press spacebar to change the viewport:").colspan(2).row();
  root.add(label).colspan(2);
  stage.addActor(root);
  viewports = getViewports(stage.getCamera());
  names = getViewportNames();
  stage.setViewport(viewports.first());
  label.setText(names.first());
  Gdx.input.setInputProcessor(new InputMultiplexer(new InputAdapter() {
    public boolean keyDown (int keycode) {
      if (keycode == Input.Keys.SPACE) {
        int index = (viewports.indexOf(stage.getViewport(), true) + 1) % viewports.size;
        label.setText(names.get(index));
        Viewport viewport = viewports.get(index);
        stage.setViewport(viewport);
        resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
      }
      return false;
    }
  }, stage));
}

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

mytable.debug();
mytable.add(new Image(new Texture("data/group-debug.png")));
mytable.row();

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

root.rotateBy(10);
root.setScale(1.3f, 1);
root.debug();
stage2.addActor(root);

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

Table table = new Table().debug();
table = new Table().debug();
stage.addActor(table);

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

root.debug();
root.setFillParent(true);
root.add(new Label("meow meow meow meow meow meow meow meow meow meow meow meow", skin)).colspan(3).expandX();

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

g.addActor(new TextButton("button " + i, skin));
g.addActor(new TextButton("longer button", skin));
Table table = new Table().debug();
table.add(g);
table.pack();
  h.addActor(new TextButton("button " + i, skin));
h.addActor(new TextButton("some taller\nbutton", skin));
table = new Table().debug();
table.add(h);
table.pack();

代码示例来源:origin: langurmonkey/gaiasky

@Override
public Table debug() {
  tabTitleTable.debug();
  return super.debug();
}

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

public void setDebug (boolean enabled) {
  debug(enabled ? Debug.all : Debug.none);
}

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

root.debug().defaults().space(6).size(110);
stage.addActor(root);

相关文章

微信公众号

最新文章

更多