use of io.xol.chunkstories.gui.layer.config.LogPolicyAsk in project chunkstories by Hugobros3.
the class MainMenu method render.
@Override
public void render(RenderingInterface renderingContext) {
parentLayer.render(renderingContext);
if (gameWindow.getLayer() == this && gameWindow.getClient().getConfiguration().getStringOption("client.game.log-policy").equals("undefined"))
gameWindow.setLayer(new LogPolicyAsk(gameWindow, this));
float spacing = 4;
float buttonsAreaSize = largeSingleplayer.getWidth() * 2 + spacing * this.getGuiScale();
float leftButtonX = this.getWidth() / 2 - buttonsAreaSize / 2 + 0.0f;
float ySmall = (12) * this.getGuiScale();
float yBig = ySmall + largeSingleplayer.getHeight() + (spacing) * this.getGuiScale();
largeOnline.setPosition(leftButtonX, yBig);
largeOnline.render(renderingContext);
largeSingleplayer.setPosition(leftButtonX, ySmall);
largeSingleplayer.render(renderingContext);
float rightButtonX = leftButtonX + largeSingleplayer.getWidth() + (spacing) * this.getGuiScale();
largeMods.setPosition(rightButtonX, yBig);
largeMods.render(renderingContext);
largeOptions.setPosition(rightButtonX, ySmall);
largeOptions.render(renderingContext);
// Notices
Vector4f noticeColor = new Vector4f(0.5f);
String version = "Chunk Stories Client " + VersionInfo.version;
renderingContext.getFontRenderer().defaultFont().getWidth(version);
renderingContext.getFontRenderer().drawString(renderingContext.getFontRenderer().defaultFont(), 4, 0, version, this.getGuiScale(), noticeColor);
String copyrightNotice = "2015-2018 Hugo 'Gobrosse' Devillers";
float noticeDekal = renderingContext.getFontRenderer().defaultFont().getWidth(copyrightNotice) * (this.getGuiScale());
renderingContext.getFontRenderer().drawString(renderingContext.getFontRenderer().defaultFont(), renderingContext.getWindow().getWidth() - noticeDekal - 4, 0, copyrightNotice, this.getGuiScale(), noticeColor);
}
Aggregations