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

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

本文整理了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

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

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

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

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

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

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

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

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

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

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

  1. stage.addActor(root);
  2. root.setFillParent(true);
  3. root.pad(5);
  4. root.defaults().left().space(5);

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. @Override
  2. public void doneLoading(AssetManager assetManager) {
  3. skin = GlobalResources.skin;
  4. mainTable = new Table(skin);
  5. time = new OwnLabel("", skin, "ui-13");
  6. mainTable.add(time);
  7. mainTable.setFillParent(true);
  8. mainTable.right().bottom();
  9. mainTable.pad(5);
  10. // MESSAGES INTERFACE - LOW CENTER
  11. messagesInterface = new MessagesInterface(skin, lock);
  12. messagesInterface.setFillParent(true);
  13. messagesInterface.left().bottom();
  14. messagesInterface.pad(0, 300, 150, 0);
  15. // Add to GUI
  16. rebuildGui();
  17. EventManager.instance.subscribe(this, Events.TIME_CHANGE_INFO);
  18. }

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

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

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

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

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

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

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

  1. public DialogUI(UI ui) {
  2. super(new Table(ui.getSkin()), ui.getSkin());
  3. this.ui = ui;
  4. setFadeScrollBars(true);
  5. setOverscroll(false, false);
  6. up = new Button(ui.getSkin(), "dialog-up");
  7. down = new Button(ui.getSkin(), "dialog-down");
  8. panel = (Table) getActor();
  9. style = ui.getSkin().get(DialogUIStyle.class);
  10. this.recorder = ui.getRecorder();
  11. if (style.background != null)
  12. panel.setBackground(style.background);
  13. panel.top().left();
  14. panel.pad(DPIUtils.getMarginSize());
  15. setVisible(false);
  16. panel.defaults().expandX().fillX().top().left().padBottom(DPIUtils.getSpacing());
  17. up.addListener(new ChangeListener() {
  18. @Override
  19. public void changed(ChangeEvent event, Actor actor) {
  20. setScrollY(getScrollY() - DPIUtils.getPrefButtonSize());
  21. }
  22. });
  23. down.addListener(new ChangeListener() {
  24. @Override
  25. public void changed(ChangeEvent event, Actor actor) {
  26. setScrollY(getScrollY() + DPIUtils.getPrefButtonSize());
  27. }
  28. });
  29. }

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

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

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

  1. bottom.setFillParent(true);
  2. bottom.right().bottom();
  3. bottom.pad(pad10);

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

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

相关文章