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

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

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

Table.pad介绍

[英]Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value.
[中]将表周围的焊盘顶部、焊盘左侧、焊盘底部和焊盘右侧设置为指定值。

代码示例

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

/** Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value. */
public Table pad (float pad) {
  pad(new Fixed(pad));
  return this;
}

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

/** Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value. */
public Table pad (float pad) {
  pad(new Fixed(pad));
  return this;
}

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

ScrollPane scroll = new ScrollPane(table);
container.add(scroll).expand().fill();
table.pad(10).defaults().expandX().space(4);
Arrays.sort(tests, new Comparator<Instancer>() {
  @Override

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

container.pad(10).defaults().expandX().fillX().space(4);

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

table.pad(10).defaults().expandX().space(4);
for (int i = 0; i < 100; i++) {
  table.row();

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

stage.addActor(root);
root.setFillParent(true);
root.pad(5);
root.defaults().left().space(5);

代码示例来源:origin: kotcrab/vis-ui

/**
 * Allows to set Table's padding with the Padding object, which has be done externally, as it's not part
 * of the standard libGDX API.
 * @param table will have the padding set according to the this object's data.
 * @return the given table for chaining.
 */
public Table applyPadding (final Table table) {
  table.pad(top, left, bottom, right);
  return table;
}

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

Table table = new Table(skin);
table.setFillParent(true);
table.pad(5);
table.add(fpsLabel).expandX().left().row();
table.add(pointCountLabel).expandX().left().row();

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

Table table = new Table(skin);
table.setFillParent(true);
table.pad(5);
table.add(fpsLabel).expandX().left().row();
table.add(pointCountLabel).expandX().left().row();

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

skin));
Table tooltipTable = new Table(skin);
tooltipTable.pad(10).background("default-round");
tooltipTable.add(new TextButton("Fancy tooltip!", skin));
imgButton.addListener(new Tooltip(tooltipTable));

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

/** Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value. */
public Table pad (float pad) {
  pad(new Fixed(pad));
  return this;
}

代码示例来源:origin: kotcrab/vis-ui

/**
 * Allows to set Table's padding with the Padding object, which has be done externally, as it's not part
 * of the standard libGDX API.
 * @param padding contains data of padding sizes.
 * @param table will have the padding set according to the given data.
 * @return the given table for chaining.
 */
public static Table setPadding (final Padding padding, final Table table) {
  table.pad(padding.getTop(), padding.getLeft(), padding.getBottom(), padding.getRight());
  return table;
}

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

@Override
public void doneLoading(AssetManager assetManager) {
  skin = GlobalResources.skin;
  mainTable = new Table(skin);
  time = new OwnLabel("", skin, "ui-13");
  mainTable.add(time);
  mainTable.setFillParent(true);
  mainTable.right().bottom();
  mainTable.pad(5);
  // MESSAGES INTERFACE - LOW CENTER
  messagesInterface = new MessagesInterface(skin, lock);
  messagesInterface.setFillParent(true);
  messagesInterface.left().bottom();
  messagesInterface.pad(0, 300, 150, 0);
  // Add to GUI
  rebuildGui();
  EventManager.instance.subscribe(this, Events.TIME_CHANGE_INFO);
}

代码示例来源:origin: moribitotech/MTX

levelsTable1.setPosition(-999, 0);
levelsTable1.addAction(Actions.moveTo(0, 0, 0.7f));
levelsTable1.top().left().pad(30, 30, 30, 30);

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

@Override
protected void build() {
  float padb = 5 * GlobalConf.SCALE_FACTOR;
  content.clear();
  content.pad(10 * GlobalConf.SCALE_FACTOR);
  content.add(new OwnLabel(txt("gui.newversion.new.current") + ":", skin)).left().padRight(padb).padBottom(padb);
  content.add(new OwnLabel(GlobalConf.version.version, skin)).left().padBottom(padb).row();
  content.add(new OwnLabel(txt("gui.newversion.new.new") + ":", skin)).left().padRight(padb).padBottom(padb * 2);
  content.add(new OwnLabel(tagVersion, skin, "header")).left().padBottom(padb * 2).row();
  Label.LabelStyle linkStyle = skin.get("link", Label.LabelStyle.class);
  content.add(new Link(txt("gui.newversion.getit"), linkStyle, GlobalConf.WEBPAGE_DOWNLOADS)).center().colspan(2);
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

table.top().pad(DPIUtils.getSpacing() / 2);
table.top();
table.add(new Label("View", skin, "big")).center();

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

public DialogUI(UI ui) {
  super(new Table(ui.getSkin()), ui.getSkin());
  this.ui = ui;
  setFadeScrollBars(true);
  setOverscroll(false, false);
  up = new Button(ui.getSkin(), "dialog-up");
  down = new Button(ui.getSkin(), "dialog-down");
  panel = (Table) getActor();
  style = ui.getSkin().get(DialogUIStyle.class);
  this.recorder = ui.getRecorder();
  if (style.background != null)
    panel.setBackground(style.background);
  panel.top().left();
  panel.pad(DPIUtils.getMarginSize());
  setVisible(false);
  panel.defaults().expandX().fillX().top().left().padBottom(DPIUtils.getSpacing());
  up.addListener(new ChangeListener() {
    @Override
    public void changed(ChangeEvent event, Actor actor) {
      setScrollY(getScrollY() - DPIUtils.getPrefButtonSize());
    }
  });
  down.addListener(new ChangeListener() {
    @Override
    public void changed(ChangeEvent event, Actor actor) {
      setScrollY(getScrollY() + DPIUtils.getPrefButtonSize());
    }
  });
}

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

table.pad(pad);
scroll = new OwnScrollPane(table, skin, "minimalist-nobg");
scroll.setFadeScrollBars(false);

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

bottom.setFillParent(true);
bottom.right().bottom();
bottom.pad(pad10);

代码示例来源:origin: rafaskb/typing-label

table.pad(50f);
table.debugCell();
table.add(label).colspan(4).growX();

相关文章

微信公众号

最新文章

更多