mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 04:42:17 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
208373deaa | ||
|
|
f22a3f612b |
No files matched your search
@@ -537,7 +537,7 @@ public class Iris {
|
||||
if (level != null) {
|
||||
if (level.provider == null) return DimensionId.OVERWORLD;
|
||||
|
||||
if ((level.provider.isHellWorld || level.provider.hasNoSky) || level.provider.dimensionId == -1) {
|
||||
if (level.provider.isHellWorld || level.provider.dimensionId == -1) {
|
||||
return DimensionId.NETHER;
|
||||
} else if (level.provider.dimensionId == 1) {
|
||||
return DimensionId.END;
|
||||
|
||||
@@ -91,6 +91,17 @@ public class ShaderPackOptionList extends IrisGuiSlot {
|
||||
final BaseEntry entry = this.entries.get(index);
|
||||
return entry.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
}
|
||||
@Override
|
||||
public boolean mouseReleased( int mouseX, int mouseY, int button) {
|
||||
final int relativeY = mouseY - this.top - this.headerPadding + (int) this.amountScrolled - 4;
|
||||
final int index = relativeY / this.slotHeight;
|
||||
|
||||
if (index < 0 || index >= this.entries.size())
|
||||
return false;
|
||||
|
||||
final BaseEntry entry = this.entries.get(index);
|
||||
return entry.mouseReleased(mouseX, mouseY, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isSelected(int idx) {
|
||||
|
||||
@@ -12,6 +12,7 @@ public abstract class BaseEntry {
|
||||
}
|
||||
|
||||
public abstract boolean mouseClicked(int mouseX, int mouseY, int button);
|
||||
public abstract boolean mouseReleased(int mouseX, int mouseY, int button);
|
||||
|
||||
|
||||
public abstract void drawEntry(ShaderPackScreen screen, int index, int x, int y, int slotWidth, int slotHeight, Tessellator tessellator, int mouseX, int mouseY, boolean isMouseOver);
|
||||
|
||||
@@ -108,6 +108,11 @@ public class HeaderEntry extends BaseEntry {
|
||||
return backButtonResult || utilButtonResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mouseReleased(int mouseX, int mouseY, int button) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean backButtonClicked(IrisElementRow.TextButtonElement button) {
|
||||
this.navigation.back();
|
||||
GuiUtil.playButtonClickSound();
|
||||
|
||||
Reference in new issue
Block a user