fix gmod logo option

This commit is contained in:
Jill 2023-08-29 13:46:54 +03:00
parent f6f8d096c1
commit ee2bb2d769
Signed by: oat
GPG Key ID: 33489AA58A955108
1 changed files with 5 additions and 21 deletions

View File

@ -1,5 +1,6 @@
package zone.oat.gmodtitlescreen.screen;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.terraformersmc.modmenu.gui.ModsScreen;
import net.fabricmc.api.EnvType;
@ -325,41 +326,24 @@ public class CustomTitleScreen extends Screen {
ctx.fill(0, this.height - 24, this.width, this.height, 0x70111111);
if (Mod.config.showGModLogo) {
/*RenderSystem.setShader(GameRenderer::getPositionTexProgram);
RenderSystem.setShader(GameRenderer::getPositionTexProgram);
//RenderSystem.defaultBlendFunc();
RenderSystem.enableBlend();
RenderSystem.blendFunc(GlStateManager.SrcFactor.ONE, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA);
RenderSystem.setShaderTexture(0, GMOD_TITLE_TEXTURE);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
this.drawTexture(ctx, logoX, logoY, 0, 0, 256, 256);
ctx.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
ctx.drawTexture(GMOD_TITLE_TEXTURE, logoX, logoY, 0.0F, 0.0F, 256, 256, 256, 256);
RenderSystem.disableBlend();
RenderSystem.defaultBlendFunc();*/
RenderSystem.defaultBlendFunc();
} else {
logoDrawer.draw(ctx, logoXMiddle, 1.0f, logoY);
}
/*
RenderSystem.setShaderTexture(0, EDITION_TITLE_TEXTURE);
drawTexture(matrices, logoX + 88, logoY + 37, 0.0F, 0.0F, 98, 14, 128, 16);
*/
if (this.splashText != null && Mod.config.showSplashText) {
this.splashText.render(ctx, logoXMiddle, this.textRenderer, 0xFF000000);
}
/*if (this.splashText != null && Mod.config.showSplashText) {
matrices.push();
matrices.translate(getSplashTextX(), logoY + getLogoHeight() - 10, 0.0);
matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(-20.0F));
float h = 1.8F - MathHelper.abs(MathHelper.sin((float)(Util.getMeasuringTimeMs() % 1000L) / 1000.0F * (float) (Math.PI * 2)) * 0.1F);
h = h * 100.0F / (float)(this.textRenderer.getWidth(this.splashText) + 32);
matrices.scale(h, h, h);
drawCenteredTextWithShadow(matrices, this.textRenderer, this.splashText, 0, -8, 16776960);
matrices.pop();
}*/
super.render(ctx, mouseX, mouseY, delta);
}
}