diff options
author | Matej Dipčár <492666@mail.muni.cz> | 2022-09-21 18:11:46 +0200 |
---|---|---|
committer | Matej Dipčár <492666@mail.muni.cz> | 2022-09-23 02:15:51 +0200 |
commit | 92a876d08317c0f378a2b082140e0738ad7ae517 (patch) | |
tree | c908ba23d71ea29ca7bd982697df39ca61dd1b6d /src/main | |
parent | b93edb188a4521ca1b15fc398952d68fc26ce0e7 (diff) | |
download | GT5-Unofficial-92a876d08317c0f378a2b082140e0738ad7ae517.tar.gz GT5-Unofficial-92a876d08317c0f378a2b082140e0738ad7ae517.tar.bz2 GT5-Unofficial-92a876d08317c0f378a2b082140e0738ad7ae517.zip |
Make private text configurable
Diffstat (limited to 'src/main')
2 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java index e5880373c0..2a6a6d0916 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedRedstoneTransmitterBase.java @@ -115,7 +115,7 @@ public abstract class GT_Cover_AdvancedRedstoneTransmitterBase<T extends GT_Cove private final String NORMAL = GT_Utility.trans("NORMAL", "Normal"); public TransmitterGUI(byte aSide, int aCoverID, X aCoverVariable, ICoverable aTileEntity, int frequencyRow, int buttonRow) { - super(aSide, aCoverID, aCoverVariable, aTileEntity, frequencyRow, buttonRow); + super(aSide, aCoverID, aCoverVariable, aTileEntity, frequencyRow, buttonRow, true); invertButton = new GT_GuiIconCheckButton(this, 1, startX + spaceX * 9, startY + spaceY * buttonRow, GT_GuiIcon.REDSTONE_ON, GT_GuiIcon.REDSTONE_OFF, INVERTED, NORMAL); } diff --git a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java index c0bae10b8e..4ee53002e3 100644 --- a/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java +++ b/src/main/java/gregtech/common/covers/redstone/GT_Cover_AdvancedWirelessRedstoneBase.java @@ -206,12 +206,13 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A protected final int frequencyRow; protected final int buttonRow; + private final int privateExtraColumn; protected final int textColor = this.getTextColorOrDefault("text", 0xFF555555); private static final String guiTexturePath = "gregtech:textures/gui/GuiCoverLong.png"; - public WirelessGUI(byte aSide, int aCoverID, X aCoverVariable, ICoverable aTileEntity, int frequencyRow, int buttonRow) { + public WirelessGUI(byte aSide, int aCoverID, X aCoverVariable, ICoverable aTileEntity, int frequencyRow, int buttonRow, boolean shiftPrivateLeft) { super(aTileEntity, 250, 107, GT_Utility.intToStack(aCoverID)); this.mGUIbackgroundLocation = new ResourceLocation(guiTexturePath); this.side = aSide; @@ -219,13 +220,14 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A this.coverVariable = aCoverVariable; this.frequencyRow = frequencyRow; this.buttonRow = buttonRow; + this.privateExtraColumn = shiftPrivateLeft ? 1 : 5; frequencyBox = new GT_GuiShortTextBox(this, 0, 1 + startX, 2 + startY + spaceY * frequencyRow, spaceX * 5 - 4, 12); privateButton = new GT_GuiIconCheckButton(this, 0, startX, startY + spaceY * buttonRow, GT_GuiIcon.CHECKMARK, null); } public WirelessGUI(byte aSide, int aCoverID, X aCoverVariable, ICoverable aTileEntity) { - this(aSide, aCoverID, aCoverVariable, aTileEntity, 0, 1); + this(aSide, aCoverID, aCoverVariable, aTileEntity, 0, 1, false); } @Override @@ -238,7 +240,7 @@ public abstract class GT_Cover_AdvancedWirelessRedstoneBase<T extends GT_Cover_A textColor); this.getFontRenderer().drawString( GT_Utility.trans("601", "Use Private Frequency"), - startX + spaceX, + startX + spaceX * privateExtraColumn, 4 + startY + spaceY * buttonRow, textColor); } |