mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-18 11:29:30 +00:00
Move overlays to bottom right corner, fix probe overlay rendering
This commit is contained in:
1 parent
2c55c8a512
commit
4cf30def99
3 files changed
+15
-10
No files matched your search
@@ -42,9 +42,11 @@ public final class IconEIO {
|
||||
public static final IconEIO WRENCH_OVERLAY_ME = new IconEIO(32, 128);
|
||||
public static final IconEIO WRENCH_OVERLAY_ME_OFF = new IconEIO(32 + 48, 128);
|
||||
|
||||
public static final IconEIO PROBE_OVERLAY_PROBE = new IconEIO(112, 192, 32, 16);
|
||||
public static final IconEIO PROBE_OVERLAY_COPY = new IconEIO(144, 192, 32, 16);
|
||||
|
||||
public static final IconEIO PROBE_OVERLAY_PROBE = new IconEIO(112, 192, 16, 16);
|
||||
public static final IconEIO PROBE_OVERLAY_COPY = new IconEIO(128, 192, 16, 16);
|
||||
public static final IconEIO PROBE_OVERLAY_PROBE_OFF = new IconEIO(144, 192, 16, 16);
|
||||
public static final IconEIO PROBE_OVERLAY_COPY_OFF = new IconEIO(160, 192, 16, 16);
|
||||
|
||||
public static final IconEIO ACTIVE_TAB = new IconEIO(205, 0, 19, 24);
|
||||
public static final IconEIO INACTIVE_TAB = new IconEIO(237, 0, 19, 24);
|
||||
|
||||
|
||||
@@ -37,19 +37,22 @@ public class ConduitProbeOverlayRenderer {
|
||||
return null;
|
||||
}
|
||||
|
||||
private void doRenderOverlay(RenderGameOverlayEvent event, ItemStack equippedProbe) {
|
||||
IconEIO icon;
|
||||
private void doRenderOverlay(RenderGameOverlayEvent event, ItemStack equippedProbe) {
|
||||
IconEIO icon1, icon2;
|
||||
if(equippedProbe.getItemDamage() == 0) {
|
||||
icon = IconEIO.PROBE_OVERLAY_PROBE;
|
||||
icon1 = IconEIO.PROBE_OVERLAY_PROBE;
|
||||
icon2 = IconEIO.PROBE_OVERLAY_COPY_OFF;
|
||||
} else {
|
||||
icon = IconEIO.PROBE_OVERLAY_COPY;
|
||||
icon1 = IconEIO.PROBE_OVERLAY_PROBE_OFF;
|
||||
icon2 = IconEIO.PROBE_OVERLAY_COPY;
|
||||
}
|
||||
ScaledResolution res = event.resolution;
|
||||
|
||||
double offsetX = 16;
|
||||
double offsetX = res.getScaledWidth() - 48;
|
||||
double offsetY = res.getScaledHeight() - 16;
|
||||
GL11.glColor4f(1, 1, 1, 0.75f);
|
||||
icon.renderIcon(offsetX, offsetY - 32, 64, 32, 0, true);
|
||||
icon1.renderIcon(offsetX - 32, offsetY - 32, 32, 32, 0, true);
|
||||
icon2.renderIcon(offsetX, offsetY - 32, 32, 32, 0, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class YetaWrenchOverlayRenderer {
|
||||
ConduitDisplayMode mode = ConduitDisplayMode.getDisplayMode(equippedWrench);
|
||||
ScaledResolution res = event.resolution;
|
||||
|
||||
double offsetX = 16;
|
||||
double offsetX = res.getScaledWidth() - (16 + ((onIcons.length / 2 + (onIcons.length % 2)) * 16));
|
||||
double offsetY = res.getScaledHeight() - 16;
|
||||
if(mode == ConduitDisplayMode.ALL) {
|
||||
GL11.glColor4f(1, 1, 1, 0.75f);
|
||||
|
||||
Reference in new issue
Block a user