From b010c70501240d9abc3b6d845c75e6ffbb44c5ea Mon Sep 17 00:00:00 2001 From: BianXiao <137746769+mcbianxiao@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:46:14 +0800 Subject: [PATCH] Delete src/main/java/me/jellysquid/mods/sodium/client/gui/pojavlauncherWarnScreen.java --- .../client/gui/pojavlauncherWarnScreen.java | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 src/main/java/me/jellysquid/mods/sodium/client/gui/pojavlauncherWarnScreen.java diff --git a/src/main/java/me/jellysquid/mods/sodium/client/gui/pojavlauncherWarnScreen.java b/src/main/java/me/jellysquid/mods/sodium/client/gui/pojavlauncherWarnScreen.java deleted file mode 100644 index b8364b9aa7..0000000000 --- a/src/main/java/me/jellysquid/mods/sodium/client/gui/pojavlauncherWarnScreen.java +++ /dev/null @@ -1,61 +0,0 @@ -package me.jellysquid.mods.sodium.client.gui; - -import me.jellysquid.mods.sodium.client.SodiumClientMod; -import net.minecraft.client.font.MultilineText; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.ScreenTexts; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.gui.widget.CheckboxWidget; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.text.LiteralText; -import net.minecraft.text.Text; -import net.minecraft.text.TranslatableText; -import net.minecraft.util.Formatting; -import net.minecraft.util.Util; -import net.minecraft.client.gui.DrawContext; -import net.minecraft.client.gui.widget.ButtonWidget; -import net.minecraft.client.gui.widget.CheckboxWidget; -import net.minecraft.text.Text; -import net.minecraft.util.Formatting; - -public class pojavlauncherWarnScreen extends Screen { - - private static final Text HEADER = new TranslatableText("sodium.console.pojav_launcher").formatted(Formatting.BOLD); - private static final Text MESSAGE = new TranslatableText("sodium.console.pojav_launcher"); - private static final Text CHECK_MESSAGE = new TranslatableText("multiplayerWarning.check"); - private final Screen prevScreen; - private CheckboxWidget checkbox; - private MultilineText lines = MultilineText.EMPTY; - - public pojavlauncherWarnScreen(Screen prevScreen) { - super(new LiteralText("BianXiao Edit Sodium Warning")); - this.prevScreen = prevScreen; - } - - @Override - protected void init() { - super.init(); - this.lines = MultilineText.create(this.textRenderer, MESSAGE, this.width - 50); - int i = (this.lines.count() + 1) * this.textRenderer.fontHeight * 2; - this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, 130 + i, 150, 20, new LiteralText("CurseForge"), buttonWidget -> Util.getOperatingSystem().open("https://curseforge.com/minecraft/mc-mods/reeses-sodium-options"))); - this.addDrawableChild(new ButtonWidget(this.width / 2 - 155 + 160, 130 + i, 150, 20, new LiteralText("Modrinth"), buttonWidget -> Util.getOperatingSystem().open("https://modrinth.com/mod/reeses-sodium-options"))); - this.addDrawableChild(new ButtonWidget(this.width / 2 - 155, 100 + i, 150, 20, ScreenTexts.PROCEED, buttonWidget -> { - if (this.checkbox.isChecked()) { - SodiumClientMod.options().notificationSettings.hideRSORecommendation = true; - SodiumClientMod.options().writeChanges(); - } - this.client.setScreen(this.prevScreen); - })); - this.addDrawableChild(new ButtonWidget(this.width / 2 - 155 + 160, 100 + i, 150, 20, new TranslatableText("menu.quit"), buttonWidget -> this.client.scheduleStop())); - this.checkbox = new CheckboxWidget(this.width / 2 - 155 + 80, 76 + i, 150, 20, CHECK_MESSAGE, false); - this.addDrawableChild(this.checkbox); - } - - @Override - public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { - this.renderBackgroundTexture(0); - drawTextWithShadow(matrices, this.textRenderer, HEADER, 25, 30, 0xFFFFFF); - this.lines.drawWithShadow(matrices, 25, 70, this.textRenderer.fontHeight * 2, 0xFFFFFF); - super.render(matrices, mouseX, mouseY, delta); - } -}