Skip to content

Commit 14abfef

Browse files
committed
Merge 1.16 into 1.18
2 parents f391e97 + 77760d7 commit 14abfef

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

common/src/main/java/org/embeddedt/modernfix/screen/ModernFixConfigScreen.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public class ModernFixConfigScreen extends Screen {
1313

1414
public boolean madeChanges = false;
1515
private Button doneButton, wikiButton;
16+
private double lastScrollAmount = 0;
17+
1618
public ModernFixConfigScreen(Screen lastScreen) {
1719
super(new TranslatableComponent("modernfix.config"));
1820
this.lastScreen = lastScreen;
@@ -21,6 +23,7 @@ public ModernFixConfigScreen(Screen lastScreen) {
2123
@Override
2224
protected void init() {
2325
this.optionList = new OptionList(this, this.minecraft);
26+
this.optionList.setScrollAmount(lastScrollAmount);
2427
this.addWidget(this.optionList);
2528
this.wikiButton = new Button(this.width / 2 - 155, this.height - 29, 150, 20, new TranslatableComponent("modernfix.config.wiki"), (arg) -> {
2629
Util.getPlatform().openUri("https://github.com/embeddedt/ModernFix/wiki/Summary-of-Patches");
@@ -50,4 +53,8 @@ public void render(PoseStack poseStack, int mouseX, int mouseY, float partialTic
5053
public void renderComponentHoverEffect(PoseStack matrixStack, @Nullable Style style, int mouseX, int mouseY) {
5154
super.renderComponentHoverEffect(matrixStack, style, mouseX, mouseY);
5255
}
56+
57+
public void setLastScrollAmount(double d) {
58+
this.lastScrollAmount = d;
59+
}
5360
}

common/src/main/java/org/embeddedt/modernfix/screen/OptionList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public OptionEntry(String optionName, Option option) {
164164
});
165165
updateStatus();
166166
this.helpButton = new Button(75, 0, 20, 20, new TextComponent("?"), (arg) -> {
167+
mainScreen.setLastScrollAmount(getScrollAmount());
167168
Minecraft.getInstance().setScreen(new ModernFixOptionInfoScreen(mainScreen, optionName));
168169
});
169170
if(!I18n.exists("modernfix.option." + optionName)) {

0 commit comments

Comments
 (0)