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

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

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

Table.row介绍

[英]Indicates that subsequent cells should be added to a new row and returns the cell values that will be used as the defaults for all cells in the new row.
[中]指示后续单元格应添加到新行,并返回将用作新行中所有单元格默认值的单元格值。

代码示例

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

public void row () {
  table.row();
}

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

public void row () {
  table.row();
}

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

public void create () {
  stage = new Stage();
  Gdx.input.setInputProcessor(stage);
  root = new Table();
  root.setFillParent(true);
  stage.addActor(root);
  skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  Table labels = new Table();
  root.add(new ScrollPane(labels, skin)).expand().fill();
  root.row();
  root.add(drawnLabel = new Label("", skin));
  for (int i = 0; i < count; i++) {
    labels.add(new Label("Label: " + i, skin) {
      public void draw (Batch batch, float parentAlpha) {
        super.draw(batch, parentAlpha);
        drawn++;
      }
    });
    labels.row();
  }
}

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

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

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

table.row();
  TextButton button = new TextButton(instancer.instance().getClass().getName(), skin);
  button.addListener(new ClickListener() {
  table.add(button).expandX().fillX();
container.row();
container.add(new Label("Click on a test to start it, press ESC to close it.", new LabelStyle(font, Color.WHITE))).pad(5, 5,
  5, 5);

代码示例来源: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

private void setupUi () {
  // setup a tiny ui with a console and a clear button.
  skin = new Skin(Gdx.files.internal("data/uiskin.json"));
  stage = new Stage();
  ui = new Table();
  ui.setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  console = new List(skin);
  scrollPane = new ScrollPane(console);
  scrollPane.setScrollbarsOnTop(true);
  TextButton clear = new TextButton("Clear", skin);
  ui.add(scrollPane).expand(true, true).fill();
  ui.row();
  ui.add(clear).expand(true, false).fill();
  stage.addActor(ui);
  clear.addListener(new ClickListener() {
    @Override
    public void clicked (InputEvent event, float x, float y) {
      clear();
    }
  });
  Gdx.input.setInputProcessor(stage);
}

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

table.add(play);
table.add(stop).left();
table.row();
table.add(new Label("Pitch", skin));
table.add(pitch);
table.add(pitchValue);
table.row();
table.add(new Label("Volume", skin));
table.add(volume);
table.add(volumeValue);
table.row();
table.add(new Label("Pan", skin));
table.add(pan);

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

scrollPane.setFlickScroll(false);
container.row().height(350);
container.add(scrollPane);

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

table.row();
  table.add(new Label(i + "uno", skin)).expandX().fillX();
container.row().space(10).padBottom(10);
container.add(flickButton).right().expandX();
container.add(onTopButton);

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

root.add(new Container(label("bottom")).bottom());
root.add(new Container(label("left")).left());
root.row();
root.add(new Container(label("fill")).fill());
root.add(new Container(label("fillX")).fillX());
root.add(new Container(label("fill 75%")).fill(0.75f, 0.75f));
root.add(new Container(label("fill 75% br")).fill(0.75f, 0.75f).bottom().right());
root.row();
root.add(new Container(label("padTop 5\ntop")).padTop(5).top());
root.add(new Container(label("padBottom 5\nbottom")).padBottom(5).bottom());
root.add(new Container(label("pad 10 fill")).pad(10).fill());
root.add(new Container(label("pad 10 tl")).pad(10).top().left());
root.row();
root.add(new Container(label("bg")).background(logo));
root.add(new Container(label("bg height 50")).background(logo).height(50));

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

root.add(new Label("meow meow meow meow meow meow meow meow meow meow meow meow", skin)).colspan(3).expandX();
root.add(new TextButton("Text Button", skin));
root.row();
root.add(new TextButton("Text Button", skin));
root.add(new TextButton("Toggle Button", skin.get("toggle", TextButtonStyle.class)));

代码示例来源:origin: dingjibang/GDX-RPG

public TypedGdxQuery<T> row(){
  if(t instanceof Table)
    ((Table) t).row();
  return this;
}

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

t.row();
t.add(myLabel);

代码示例来源:origin: narfman0/GDXWorld

private void populateVertexTable(){
  for(Vector2 vertex : nodes){
    vertexTables.add(new VertexTable(vertex, skin, this));
    vertexTables.row();
  }
}

代码示例来源:origin: narfman0/GDXWorld

@Override public void clicked(InputEvent event, float x, float y) {
    deleteButton.remove();
    table.remove();
    lightTables.remove(table).remove();
    lightTable.reset();
    for(Entry<AbstractLightTable, Button> entry : lightTables.entrySet()){
      lightTable.add(entry.getKey());
      lightTable.add(entry.getValue());
      lightTable.row();
    }
  }
});

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

@Override
  protected void fillTable (final Table table) {
    int widgetsCounter = 0;
    for (final CellWidget<? extends Actor> widget : getWidgets()) {
      widget.buildCell(table, getDefaultWidgetPadding());
      if (++widgetsCounter == rowSize) {
        widgetsCounter -= rowSize;
        table.row();
      }
    }
  }
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

@LmlAfter void initView() {
  moduleViewHolders.clear();
  Array<ExtensionModuleController> moduleControllers = moduleManager.getModuleControllers();
  for (ExtensionModuleController moduleController : moduleControllers) {
    ModuleViewHolder viewHolder = new ModuleViewHolder(moduleController);
    moduleViewHolders.put(moduleController.getModuleId(), viewHolder);
    tableModules.row();
    tableModules.add(viewHolder.root);
  }
}

代码示例来源:origin: crashinvaders/gdx-texture-packer-gui

public void setupButtons (ButtonBar buttonBar) {
  buttonBar.setIgnoreSpacing(true);
  getContentTable().row().spaceTop(8);
  getContentTable().add(buttonBar.createTable());
  pack();
  centerWindow();
}

代码示例来源:origin: lycying/c2d-engine

void addNewHandle(Table table, String region, String txt, ClickListener l) {
    TextureAtlas atlas = Engine.resource("TA");
    DefaultLabel label = DefaultLabel.getDefaultLabel(txt + "   ");
    label.addListener(l);
    table.add(new Image(new TextureRegionDrawable(atlas.findRegion(region)), Scaling.none)).height(30).spaceRight(10);
    table.add(label).right().spaceRight(10);
    table.row();
  }
}

相关文章

微信公众号

最新文章

更多