本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Table.center()
方法的一些代码示例,展示了Table.center()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.center()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Table
类名称:Table
方法名:center
[英]Sets the alignment of the logical table within the table actor to Align#center. This clears any other alignment.
[中]将table actor中逻辑表的对齐方式设置为对齐#中心。这将清除任何其他对齐。
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
@Override
public void setUI(UI ui) {
this.ui = ui;
menuButtonTable.setFillParent(true);
menuButtonTable.center();
}
代码示例来源:origin: moribitotech/MTX
/**
* Set benchmark table position
* */
public void setUpPosition(BenchmarkPosition benchmarkPosition) {
switch (benchmarkPosition) {
case CENTER:
table.center();
break;
case TOP_LEFT:
table.top().left();
break;
case TOP_RIGHT:
table.top().right();
break;
case BOTTOM_LEFT:
table.bottom().left();
break;
case BOTTOM_RIGHT:
table.bottom().right();
break;
default:
table.top().left();
break;
}
}
}
代码示例来源:origin: BrentAureli/SuperMario
public GameOverScreen(Game game){
this.game = game;
viewport = new FitViewport(MarioBros.V_WIDTH, MarioBros.V_HEIGHT, new OrthographicCamera());
stage = new Stage(viewport, ((MarioBros) game).batch);
Label.LabelStyle font = new Label.LabelStyle(new BitmapFont(), Color.WHITE);
Table table = new Table();
table.center();
table.setFillParent(true);
Label gameOverLabel = new Label("GAME OVER", font);
Label playAgainLabel = new Label("Click to Play Again", font);
table.add(gameOverLabel).expandX();
table.row();
table.add(playAgainLabel).expandX().padTop(10f);
stage.addActor(table);
}
代码示例来源:origin: bladecoder/bladecoder-adventure-engine
table.center();
table.pad(pad);
代码示例来源:origin: langurmonkey/gaiasky
center.center();
内容来源于网络,如有侵权,请联系作者删除!