main menu title

- Added new logo to the Create menu screen
This commit is contained in:
simibubi 2021-06-10 20:32:17 +02:00
parent 1f48c698e8
commit 1b5ede1a5d
4 changed files with 60 additions and 9 deletions

View file

@ -54,7 +54,7 @@ public class Create {
public static final String ID = "create";
public static final String NAME = "Create";
public static final String VERSION = "0.3.1c";
public static final String VERSION = "0.3.2";
public static final Logger LOGGER = LogManager.getLogger();

View file

@ -20,6 +20,8 @@ public enum AllGuiTextures implements IScreenRenderable {
TERRAINZAPPER("curiosities.png", 234, 103),
TERRAINZAPPER_INACTIVE_PARAM("curiosities.png", 238, 0, 18, 18),
LOGO("logo.png", 256, 256),
SCHEMATIC("schematics.png", 192, 121),
SCHEMATIC_SLOT("widgets.png", 54, 0, 16, 16),
SCHEMATIC_PROMPT("schematics_2.png", 213, 77),

View file

@ -1,13 +1,21 @@
package com.simibubi.create.foundation.gui.mainMenu;
import java.awt.Color;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.Create;
import com.simibubi.create.foundation.config.ui.BaseConfigScreen;
import com.simibubi.create.foundation.gui.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.gui.BoxElement;
import com.simibubi.create.foundation.gui.GuiGameElement;
import com.simibubi.create.foundation.gui.ScreenOpener;
import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.Lang;
import com.simibubi.create.foundation.utility.MatrixStacker;
import net.minecraft.client.gui.screen.ConfirmOpenLinkScreen;
import net.minecraft.client.gui.screen.MainMenuScreen;
@ -19,6 +27,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Util;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
public class CreateMainMenuScreen extends AbstractSimiScreen {
@ -51,9 +60,10 @@ public class CreateMainMenuScreen extends AbstractSimiScreen {
@Override
protected void renderWindow(MatrixStack ms, int mouseX, int mouseY, float partialTicks) {
if (parent instanceof MainMenuScreen) {
float f = (float) (Util.milliTime() - this.firstRenderTime) / 1000.0F;
float alpha = MathHelper.clamp(f, 0.0F, 1.0F);
if (parent instanceof MainMenuScreen) {
if (alpha < 1)
vanillaPanorama.render(partialTicks, 1);
panorama.render(partialTicks, alpha);
@ -63,10 +73,49 @@ public class CreateMainMenuScreen extends AbstractSimiScreen {
RenderSystem.enableBlend();
RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA,
GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
drawTexture(ms, 0, 0, this.width, this.height, 0.0F, 0.0F, 16, 128, 16, 128);
}
drawCenteredText(ms, textRenderer, new StringTextComponent("Create is Installed!"), width / 2, 40, 16777215);
RenderSystem.enableDepthTest();
for (int side : Iterate.positiveAndNegative) {
ms.push();
ms.translate(width / 2, 60, -800);
ms.scale(24 * side, 24 * side, 32);
ms.translate(-1.75 * ((alpha * alpha) / 2f + .5f), .25f, 0);
MatrixStacker.of(ms)
.rotateX(45);
GuiGameElement.of(AllBlocks.LARGE_COGWHEEL.getDefaultState())
.rotateBlock(0, Util.milliTime() / 32f * side, 0)
.render(ms);
ms.translate(-1, 0, -1);
GuiGameElement.of(AllBlocks.COGWHEEL.getDefaultState())
.rotateBlock(0, Util.milliTime() / -16f * side + 22.5f, 0)
.render(ms);
ms.pop();
}
ms.push();
ms.translate(width / 2 - 32, 32, -10);
ms.push();
ms.scale(0.25f, 0.25f, 0.25f);
AllGuiTextures.LOGO.draw(ms, 0, 0);
ms.pop();
new BoxElement().withBackground(0x88_000000)
.flatBorder(new Color(0x01_000000, true))
.at(-32, 56, 100)
.withBounds(128, 11)
.render(ms);
ms.pop();
ms.push();
ms.translate(0, 0, 200);
drawCenteredText(ms, textRenderer, new StringTextComponent(Create.NAME).formatted(TextFormatting.BOLD)
.append(new StringTextComponent(" v" + Create.VERSION).formatted(TextFormatting.BOLD, TextFormatting.WHITE)),
width / 2, 89, 0xff_E4BB67);
ms.pop();
RenderSystem.disableDepthTest();
}
protected void init() {
@ -78,7 +127,7 @@ public class CreateMainMenuScreen extends AbstractSimiScreen {
private void addButtons() {
buttons.clear();
int yStart = height / 4 + (parent instanceof MainMenuScreen ? 40 : 16);
int yStart = height / 4 + (parent instanceof MainMenuScreen ? 40 : 40);
int center = width / 2;
int bHeight = 20;
int bShortWidth = 98;
@ -99,8 +148,8 @@ public class CreateMainMenuScreen extends AbstractSimiScreen {
String issueTrackerLink = "https://github.com/Creators-of-Create/Create/issues";
String supportLink = "https://github.com/Creators-of-Create/Create/wiki/Supporting-the-Project";
addButton(new Button(center - 100, yStart + 68, bShortWidth, bHeight,
Lang.translate("menu.project_page"), $ -> linkTo(projectLink)));
addButton(new Button(center - 100, yStart + 68, bShortWidth, bHeight, Lang.translate("menu.project_page"),
$ -> linkTo(projectLink)));
addButton(new Button(center + 2, yStart + 68, bShortWidth, bHeight, Lang.translate("menu.report_bugs"),
$ -> linkTo(issueTrackerLink)));
addButton(new Button(center - 100, yStart + 92, bLongWidth, bHeight, Lang.translate("menu.support"),

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB