Fixed GUI rendering in all versions

This commit is contained in:
FlorianMichael 2023-11-01 05:10:55 +01:00
parent 703ead17dc
commit c31b19c2ce
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
4 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ public class GuiProtocolSelector extends Screen {
addButton(new Button(width - 105, height - 25, 100, 20, new StringTextComponent("Reload configs"), b -> Via.getManager().getConfigurationProvider().reloadConfigs()));
}
list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2);
addWidget(list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2));
}
public void setStatus(final String status) {
@ -103,7 +103,7 @@ public class GuiProtocolSelector extends Screen {
}
renderBackground(matrices);
this.list.render(matrices, p_230430_2_, p_230430_3_, p_230430_4_);
list.render(matrices, p_230430_2_, p_230430_3_, p_230430_4_);
super.render(matrices, p_230430_2_, p_230430_3_, p_230430_4_);

View File

@ -80,7 +80,7 @@ public class GuiProtocolSelector extends Screen {
addRenderableWidget(new Button(width - 105, height - 25, 100, 20, new TextComponent("Reload configs"), b -> Via.getManager().getConfigurationProvider().reloadConfigs()));
}
list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2);
addWidget(list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2));
}
public void setStatus(final String status) {

View File

@ -80,7 +80,7 @@ public class GuiProtocolSelector extends Screen {
addRenderableWidget(new Button(width - 105, height - 25, 100, 20, new TextComponent("Reload configs"), b -> Via.getManager().getConfigurationProvider().reloadConfigs()));
}
list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2);
addWidget(list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2));
}
public void setStatus(final String status) {

View File

@ -79,7 +79,7 @@ public class GuiProtocolSelector extends Screen {
addRenderableWidget(Button.builder(Component.literal("Reload configs"), b -> Via.getManager().getConfigurationProvider().reloadConfigs()).bounds(width - 105, height - 25, 100, 20).build());
}
list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2);
addWidget(list = new SlotList(minecraft, width, height, 3 + 3 /* start offset */ + (font.lineHeight + 2) * 3 /* title is 2 */, height - 30, font.lineHeight + 2));
}
public void setStatus(final String status) {