Skip to content

Commit

Permalink
Fix shader pack screen
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Nov 22, 2023
1 parent e8af88f commit 131d754
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ShaderPackOptionList extends IrisContainerObjectSelectionList<Shade
private OptionMenuContainer container;

public ShaderPackOptionList(ShaderPackScreen screen, NavigationController navigation, ShaderPack pack, Minecraft client, int width, int height, int top, int bottom, int left, int right) {
super(client, width, height, top, bottom, left, right, 24);
super(client, width, bottom, top, bottom, left, right, 24);
this.navigation = navigation;
this.screen = screen;
this.setRenderBackground(false);
Expand All @@ -61,7 +61,7 @@ protected void renderDecorations(GuiGraphics pAbstractSelectionList0, int pInt1,
int lvInt9 = 32;
pAbstractSelectionList0.setColor(0.25F, 0.25F, 0.25F, 1.0F);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), 0, 0.0F, 0.0F, this.width, this.getY(), 32, 32);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), this.getBottom(), 0.0F, (float)this.getBottom(), this.width, this.height - this.getBottom(), 32, 32);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), this.getBottom(), 0.0F, 0.0F, this.width, this.height, 32, 32);
pAbstractSelectionList0.setColor(1.0F, 1.0F, 1.0F, 1.0F);
int lvInt10 = 4;
pAbstractSelectionList0.fillGradient(RenderType.guiOverlay(), this.getX(), this.getY(), this.getRight(), this.getY() + 4, -16777216, 0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class ShaderPackSelectionList extends IrisObjectSelectionList<ShaderPackS
private ShaderPackEntry applied = null;

public ShaderPackSelectionList(ShaderPackScreen screen, Minecraft client, int width, int height, int top, int bottom, int left, int right) {
super(client, width, height, top, bottom, left, right, 20);
super(client, width, bottom, top, bottom, left, right, 20);
WatchKey key1;
WatchService watcher1;
this.setRenderBackground(false);
Expand Down Expand Up @@ -184,13 +184,13 @@ protected void renderDecorations(GuiGraphics pAbstractSelectionList0, int pInt1,
// Renders top/bottom dirt
int lvInt9 = 32;
pAbstractSelectionList0.setColor(0.25F, 0.25F, 0.25F, 1.0F);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), 0, 0.0F, 0.0F, this.width, this.getHeight(), 32, 32);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), this.getBottom(), 0.0F, (float)this.getBottom(), this.width, this.height - this.getBottom(), 32, 32);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), 0, 0.0F, 0.0F, this.width, this.getY(), 32, 32);
pAbstractSelectionList0.blit(Screen.BACKGROUND_LOCATION, this.getX(), this.getBottom(), 0.0F, 0.0F, this.width, this.height, 32, 32);
pAbstractSelectionList0.setColor(1.0F, 1.0F, 1.0F, 1.0F);
int lvInt10 = 4;
pAbstractSelectionList0.fillGradient(RenderType.guiOverlay(), this.getX(), this.getHeight(), this.getRight(), this.getHeight() + 4, -16777216, 0, 0);
pAbstractSelectionList0.fillGradient(RenderType.guiOverlay(), this.getX(), this.getY(), this.getRight(), this.getY() + 4, -16777216, 0, 0);
pAbstractSelectionList0.fillGradient(RenderType.guiOverlay(), this.getX(), this.getBottom() - 4, this.getRight(), this.getBottom(), 0, -16777216, 0);
super.renderDecorations(pAbstractSelectionList0, pInt1, pInt2);

}

public void addLabelEntries(Component ... lines) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ protected void init() {
this.removeWidget(this.shaderPackList);
this.removeWidget(this.shaderOptionList);

this.shaderPackList = new ShaderPackSelectionList(this, this.minecraft, this.width, this.height, 32, this.height - 58, 0, this.width);
this.shaderPackList = new ShaderPackSelectionList(this, this.minecraft, this.width, this.height, 32, this.height - 58 - 32, 0, this.width);

if (Iris.getCurrentPack().isPresent() && this.navigation != null) {
ShaderPack currentPack = Iris.getCurrentPack().get();

this.shaderOptionList = new ShaderPackOptionList(this, this.navigation, currentPack, this.minecraft, this.width, this.height, 32, this.height - 58, 0, this.width);
this.shaderOptionList = new ShaderPackOptionList(this, this.navigation, currentPack, this.minecraft, this.width, this.height, 32, this.height - 58-32, 0, this.width);
this.navigation.setActiveOptionList(this.shaderOptionList);

this.shaderOptionList.rebuild();
Expand Down

0 comments on commit 131d754

Please sign in to comment.