diff options
| author | nea <nea@nea.moe> | 2023-08-24 02:34:10 +0200 |
|---|---|---|
| committer | nea <nea@nea.moe> | 2023-08-24 02:34:10 +0200 |
| commit | 8186643dfc0d5cab0369c736d0765e5e3f864c12 (patch) | |
| tree | 607c56f3bce98bfa625440998ff1c95affe7e526 /src/main/java | |
| parent | afd676b9377b336ab3d0eafc6b37190001b69414 (diff) | |
| download | NotEnoughUpdates-8186643dfc0d5cab0369c736d0765e5e3f864c12.tar.gz NotEnoughUpdates-8186643dfc0d5cab0369c736d0765e5e3f864c12.tar.bz2 NotEnoughUpdates-8186643dfc0d5cab0369c736d0765e5e3f864c12.zip | |
Moul Config
Diffstat (limited to 'src/main/java')
74 files changed, 521 insertions, 3690 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index f7f0049f..31170dae 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -23,6 +23,7 @@ import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import io.github.moulberry.notenoughupdates.commands.help.SettingsCommand; import io.github.moulberry.notenoughupdates.core.BackgroundBlur; import io.github.moulberry.notenoughupdates.core.GuiScreenElementWrapper; import io.github.moulberry.notenoughupdates.core.util.lerp.LerpingInteger; @@ -38,7 +39,6 @@ import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers; import io.github.moulberry.notenoughupdates.miscfeatures.SunTzu; import io.github.moulberry.notenoughupdates.miscgui.NeuSearchCalculator; import io.github.moulberry.notenoughupdates.miscgui.pricegraph.GuiPriceGraph; -import io.github.moulberry.notenoughupdates.options.NEUConfigEditor; import io.github.moulberry.notenoughupdates.util.Constants; import io.github.moulberry.notenoughupdates.util.GuiTextures; import io.github.moulberry.notenoughupdates.util.LerpingFloat; @@ -396,7 +396,7 @@ public class NEUOverlay extends Gui { return; } if (Mouse.getEventButtonState()) { - NotEnoughUpdates.INSTANCE.openGui = new GuiScreenElementWrapper(NEUConfigEditor.editor); + NotEnoughUpdates.INSTANCE.openGui = SettingsCommand.INSTANCE.createConfigScreen(""); } } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java deleted file mode 100644 index 6bafb1fd..00000000 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/Config.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2022 NotEnoughUpdates contributors - * - * This file is part of NotEnoughUpdates. - * - * NotEnoughUpdates is free software: you can redistribute it - * and/or modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation, either - * version 3 of the License, or (at your option) any later version. - * - * NotEnoughUpdates is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>. - */ - -package io.github.moulberry.notenoughupdates.core.config; - -public class Config { - public void executeRunnable(int runnableId) {} -} diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/GuiOptionEditorBlocked.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiOptionEditorBlocked.java index 11112782..5b1caed8 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/struct/GuiOptionEditorBlocked.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiOptionEditorBlocked.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 NotEnoughUpdates contributors + * Copyright (C) 2022-2023 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * @@ -17,9 +17,9 @@ * along with NotEnoughUpdates. If not, see <https://www.gnu.org/licenses/>. */ -package io.github.moulberry.notenoughupdates.core.config.struct; +package io.github.moulberry.notenoughupdates.core.config; -import io.github.moulberry.notenoughupdates.core.config.gui.GuiOptionEditor; +import io.github.moulberry.moulconfig.gui.GuiOptionEditor; import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils; import io.github.moulberry.notenoughupdates.core.util.render.TextRenderUtils; import lombok.var; @@ -34,7 +34,7 @@ public class GuiOptionEditorBlocked extends GuiOptionEditor { private final GuiOptionEditor base; public GuiOptionEditorBlocked(GuiOptionEditor base) { - super(base.option); + super(base.getOption()); this.base = base; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java b/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java index eac1e5cd..78cefdfb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/core/config/GuiPositionEditor.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 NotEnoughUpdates contributors + * Copyright (C) 2022-2023 NotEnoughUpdates contributors * * This file is part of NotEnoughUpdates. * @@ -19,121 +19,213 @@ package io.github.moulberry.notenoughupdates.core.config; +import io.github.moulberry.notenoughupdates.NotEnoughUpdates; +import io.github.moulberry.notenoughupdates.core.config.Position; +import io.github.moulberry.notenoughupdates.overlays.OverlayManager; +import io.github.moulberry.notenoughupdates.overlays.TextOverlay; +import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.renderer.GlStateManager; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.function.Supplier; public class GuiPositionEditor extends GuiScreen { - public PositionNew position = new PositionNew(); + private final ArrayList<Position> positions; + private final ArrayList<Position> originalPositions; + private final ArrayList<Integer> elementWidths; + private final ArrayList<Integer> elementHeights; + private final ArrayList<Supplier<Boolean>> shouldRenderSupplier; + private final Runnable positionChangedCallback; + private final Runnable closedCallback; + private int grabbedX = 0; + private int grabbedY = 0; + private int clickedPos = -1; + private int oldGuiScale = -1; + public static boolean renderDrill = false; + + + public GuiPositionEditor( + LinkedHashMap<TextOverlay, Position> overlayPositions, + Runnable positionChangedCallback, + Runnable c |
