本文整理了Java中com.badlogic.gdx.scenes.scene2d.ui.Label.getY()
方法的一些代码示例,展示了Label.getY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.getY()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.ui.Label
类名称:Label
方法名:getY
暂无
代码示例来源:origin: libgdx/libgdx
public void draw (Batch batch, float parentAlpha) {
validate();
Color color = tempColor.set(getColor());
color.a *= parentAlpha;
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
if (style.fontColor != null) color.mul(style.fontColor);
cache.tint(color);
cache.setPosition(getX(), getY());
cache.draw(batch);
}
代码示例来源:origin: libgdx/libgdx
public void draw (Batch batch, float parentAlpha) {
validate();
Color color = tempColor.set(getColor());
color.a *= parentAlpha;
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
if (style.fontColor != null) color.mul(style.fontColor);
cache.tint(color);
cache.setPosition(getX(), getY());
cache.draw(batch);
}
代码示例来源:origin: libgdx/libgdx
@Override
public void create () {
if (app == null) {
app = Gdx.app;
tests[testIndex].create();
}
cameraController = new CameraInputController(tests[testIndex].camera);
cameraController.activateKey = Keys.CONTROL_LEFT;
cameraController.autoUpdate = false;
cameraController.forwardTarget = false;
cameraController.translateTarget = false;
Gdx.input.setInputProcessor(new InputMultiplexer(cameraController, this, new GestureDetector(this)));
font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false);
hud = new Stage();
hud.addActor(fpsLabel = new Label(" ", new Label.LabelStyle(font, Color.WHITE)));
fpsLabel.setPosition(0, 0);
hud.addActor(titleLabel = new Label(tests[testIndex].getClass().getSimpleName(), new Label.LabelStyle(font, Color.WHITE)));
titleLabel.setY(hud.getHeight() - titleLabel.getHeight());
hud.addActor(instructLabel = new Label("A\nB\nC\nD\nE\nF", new Label.LabelStyle(font, Color.WHITE)));
instructLabel.setY(titleLabel.getY() - instructLabel.getHeight());
instructLabel.setAlignment(Align.top | Align.left);
instructLabel.setText(tests[testIndex].instructions);
}
代码示例来源:origin: com.badlogicgames.gdx/gdx
public void draw (Batch batch, float parentAlpha) {
validate();
Color color = tempColor.set(getColor());
color.a *= parentAlpha;
if (style.background != null) {
batch.setColor(color.r, color.g, color.b, color.a);
style.background.draw(batch, getX(), getY(), getWidth(), getHeight());
}
if (style.fontColor != null) color.mul(style.fontColor);
cache.tint(color);
cache.setPosition(getX(), getY());
cache.draw(batch);
}
代码示例来源:origin: peakgames/libgdx-stagebuilder
float javaHeapHeight = GdxUtils.getTextHeight(javaHeapLabel);
float fpsHeight = GdxUtils.getTextHeight(fpsLabel);
javaHeapLabel.setPosition(0, nativeHeapLabel.getY() + nativeHeapHeight + emptySpaceHeight);
fpsLabel.setPosition(0, javaHeapLabel.getY() + javaHeapHeight + emptySpaceHeight);
float height = fpsLabel.getY();
if (spriteBatch != null) {
batchLabel.setPosition(0, height + fpsHeight + emptySpaceHeight);
height = batchLabel.getY();
height = openGlLabel.getY();
intervalLabel.setPosition(0, - graphicHeight - intervalLabelHeight * NORMALIZATION_COEFFICIENT);
this.setPosition(resolutionHelper.getGameAreaPosition().x, intervalLabel.getY() * -1);
代码示例来源:origin: peakgames/libgdx-stagebuilder
shapeRenderer.rect(
getX(),
nativeHeapLabel.getY() + getY() - 10 * resolutionHelper.getSizeMultiplier(),
getWidth(),
getHeight());
代码示例来源:origin: xietansheng/Game2048ForGDX
setHeight(msgLabel.getY() + msgLabel.getHeight() + 50);
代码示例来源:origin: dsaltares/libgdx-cookbook
image.setPosition(middlepointX-image.getWidth()*0.5f, label.getY()-image.getHeight() - 10); // 10 for margin
内容来源于网络,如有侵权,请联系作者删除!