From dbf3cab144d9c40c02fa5ee210cf5f43d1f00738 Mon Sep 17 00:00:00 2001 From: Firenoo <49818773+firenoo@users.noreply.github.com> Date: Sun, 2 Apr 2023 19:10:20 -0700 Subject: [PATCH] Move mode change button to the side. - Mode change now on the side w/ resize button - Some code cleanup - New description (en only for now), texture. --- .../client/gui/GuiAdvancedMemoryCard.kt | 137 +++++++++++------- .../betterp2p/client/gui/InfoWrapper.kt | 23 +-- .../client/gui/widget/WidgetButton.kt | 10 +- .../client/gui/widget/WidgetP2PDevice.kt | 6 +- .../betterp2p/item/BetterMemoryCardModes.kt | 24 ++- .../betterp2p/util/CableBusUtil.kt | 12 ++ .../betterp2p/util/p2p/P2PStatus.kt | 9 +- .../assets/betterp2p/lang/en_US.lang | 27 ++-- .../textures/gui/advanced_memory_card.png | Bin 5979 -> 7225 bytes 9 files changed, 162 insertions(+), 86 deletions(-) diff --git a/src/main/java/com/projecturanus/betterp2p/client/gui/GuiAdvancedMemoryCard.kt b/src/main/java/com/projecturanus/betterp2p/client/gui/GuiAdvancedMemoryCard.kt index cade60f..30dc39c 100644 --- a/src/main/java/com/projecturanus/betterp2p/client/gui/GuiAdvancedMemoryCard.kt +++ b/src/main/java/com/projecturanus/betterp2p/client/gui/GuiAdvancedMemoryCard.kt @@ -6,9 +6,10 @@ import com.projecturanus.betterp2p.capability.MemoryInfo import com.projecturanus.betterp2p.client.ClientCache import com.projecturanus.betterp2p.client.TextureBound import com.projecturanus.betterp2p.client.gui.widget.* +import com.projecturanus.betterp2p.item.BetterMemoryCardModes +import com.projecturanus.betterp2p.item.MAX_TOOLTIP_LENGTH import com.projecturanus.betterp2p.network.* import net.minecraft.client.gui.FontRenderer -import net.minecraft.client.gui.GuiButton import net.minecraft.client.gui.GuiScreen import net.minecraft.client.renderer.Tessellator import net.minecraft.client.resources.I18n @@ -16,7 +17,6 @@ import net.minecraft.util.ResourceLocation import org.lwjgl.input.Keyboard import org.lwjgl.input.Mouse import org.lwjgl.opengl.GL11 -import java.util.* const val GUI_WIDTH = 288 const val GUI_TEX_HEIGHT = 264 @@ -39,9 +39,6 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { private val tableX = 9 private val tableY = 19 - private var scale = msg.memoryInfo.gui - private val resizeButton: WidgetButton - private var _ySize: Lazy = lazy { 242 } private var ySize: Int get() = _ySize.value @@ -49,6 +46,12 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { _ySize = lazy { value } } + private var scale = msg.memoryInfo.gui + private val resizeButton: WidgetButton + + private var mode = msg.memoryInfo.mode + private val modeButton: WidgetButton + private val scrollBar: WidgetScrollBar private val searchBar: MEGuiTextField @@ -59,10 +62,6 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { private var col: WidgetP2PColumn - private val descriptionLines: MutableList = mutableListOf() - private var mode = msg.memoryInfo.mode - private var modeString = getModeString() - private val modeButton by lazy { GuiButton(0, 0, 0, 256, 20, modeString) } private val sortRules: List by lazy { listOf( "§b§n" + I18n.format("gui.advanced_memory_card.sortinfo1"), @@ -84,7 +83,7 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { col = WidgetP2PColumn(this, infos,0, 0, ::selectedInfo, ::mode, scrollBar) searchBar = MEGuiTextField(100, 10) - resizeButton = object: WidgetButton(this, 0, 0, 32, 32, { scale.unlocalizedName }) { + resizeButton = object: WidgetButton(this, 0, 0, 32, 32) { override fun mousePressed(mouseX: Int, mouseY: Int) { if (super.mousePressed(mc, mouseX, mouseY)) { scale = when(scale) { @@ -98,6 +97,39 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { } } } + modeButton = object: WidgetButton(this, 0, 0, 32, 32) { + val modeDescriptions: List> = listOf( + fmtTooltips( + title = BetterMemoryCardModes.OUTPUT.unlocalizedName, + keys = BetterMemoryCardModes.OUTPUT.unlocalizedDesc, + maxChars = MAX_TOOLTIP_LENGTH, + ), + fmtTooltips( + title = BetterMemoryCardModes.INPUT.unlocalizedName, + keys = BetterMemoryCardModes.INPUT.unlocalizedDesc, + maxChars = MAX_TOOLTIP_LENGTH, + ), + fmtTooltips( + title = BetterMemoryCardModes.COPY.unlocalizedName, + keys = BetterMemoryCardModes.COPY.unlocalizedDesc, + maxChars = MAX_TOOLTIP_LENGTH, + ) + ) + + init { + hoverText = modeDescriptions[mode.ordinal] + } + + override fun mousePressed(mouseX: Int, mouseY: Int) { + if (super.mousePressed(mc, mouseX, mouseY)) { + mode = mode.next() + hoverText = modeDescriptions[mode.ordinal] + setTexCoords((mode.ordinal + 3) * 32.0, 232.0) + syncMemoryInfo() + super.func_146113_a(mc.soundHandler) + } + } + } } // Note this is called on resize too. @@ -108,6 +140,7 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { if (scale.minHeight > h) { scale = GuiScale.DYNAMIC } + resizeButton.hoverText = listOf(I18n.format(scale.unlocalizedName)) val numEntries = scale.size(height - 75) ySize = (numEntries * P2PEntryConstants.HEIGHT) + 75 + (numEntries - 1) guiTop = (h - ySize) / 2 @@ -126,8 +159,8 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { col.resize(scale, h - 75) col.setPosition(guiLeft + tableX, guiTop + tableY) - modeButton.xPosition = guiLeft + 8 - modeButton.yPosition = guiTop + ySize - 52 + modeButton.setPosition(guiLeft - 32, guiTop + 34) + modeButton.setTexCoords((mode.ordinal + 3) * 32.0, 232.0) resizeButton.setPosition(guiLeft - 32, guiTop + 2) resizeButton.setTexCoords(scale.ordinal * 32.0, 200.0) @@ -140,8 +173,10 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { private fun checkInfo() { infos.filtered.forEach { it.error = false } // A P2P entry is considered "errored" if it is an output, and has no inputs. - infos.filtered.groupBy { it.frequency }.filter { it.value.none { x -> !x.output } }.forEach { it.value.forEach { info -> - info.error = true + infos.filtered.groupBy { it.frequency } + .filter { it.value.none { x -> !x.output } } + .forEach { it.value.forEach { + info -> info.error = true } } } @@ -155,14 +190,6 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { ModNetwork.channel.sendToServer(C2SUpdateInfo(MemoryInfo(infos.selectedEntry, selectedInfo?.frequency ?: 0, mode, scale))) } - private fun drawInformation() { - var y = 214 - for (line in descriptionLines) { - fontRendererObj.drawString(line, guiLeft + 8, modeButton.yPosition + 20 + 3, 0) - y += fontRendererObj.FONT_HEIGHT - } - } - override fun onGuiClosed() { ClientCache.searchText = searchBar.text col.onGuiClosed() @@ -175,16 +202,9 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { drawBackground() // Draw the stuff that resets GL state first fontRendererObj.drawString(I18n.format("item.advanced_memory_card.name"), guiLeft + tableX, guiTop + 6, 0) - if (modeButton.func_146115_a()) { - descriptionLines.clear() - descriptionLines += I18n.format("gui.advanced_memory_card.desc.mode", I18n.format("gui.advanced_memory_card.mode.${mode.next().name.lowercase(Locale.getDefault())}")) - } else { - descriptionLines.clear() - } - drawInformation() searchBar.drawTextBox() resizeButton.draw(mc, mouseX, mouseY, partialTicks) - modeButton.drawButton(mc, mouseX, mouseY) + modeButton.draw(mc, mouseX, mouseY, partialTicks) // Now do our drawing GL11.glPushAttrib(GL11.GL_BLEND or GL11.GL_TEXTURE_2D or GL11.GL_COLOR) @@ -199,25 +219,15 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { if (searchBar.isMouseIn(mouseX, mouseY)) { drawHoveringText(sortRules, guiLeft, guiTop + ySize - 40, fontRendererObj) } else if (resizeButton.isHovering(mouseX, mouseY)) { - drawHoveringText(listOf(I18n.format(resizeButton.hoverText())), mouseX, mouseY, fontRendererObj) + drawHoveringText(resizeButton.hoverText, mouseX, mouseY, fontRendererObj) + } else if (modeButton.isHovering(mouseX, mouseY)) { + drawHoveringText(modeButton.hoverText, mouseX, mouseY, fontRendererObj) } else { col.mouseHovered(mouseX, mouseY) } super.drawScreen(mouseX, mouseY, partialTicks) } - private fun switchMode() { - // Switch mode - mode = mode.next() - modeString = getModeString() - modeButton.displayString = modeString - syncMemoryInfo() - } - - private fun getModeString(): String { - return I18n.format("gui.advanced_memory_card.mode.${mode.name.lowercase(Locale.getDefault())}") - } - /** * Selects the info with the hashCode, if it exists. Otherwise, * deselect the entry. @@ -247,11 +257,8 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { override fun mouseClicked(mouseX: Int, mouseY: Int, mouseButton: Int) { col.mouseClicked(mouseX, mouseY, mouseButton) - if (modeButton.mousePressed(mc, mouseX, mouseY)) { - switchMode() - modeButton.func_146113_a(mc.soundHandler) - } scrollBar.click(mouseX, mouseY) + modeButton.mousePressed(mouseX, mouseY) resizeButton.mousePressed(mouseX, mouseY) searchBar.mouseClicked(mouseX, mouseY, mouseButton) if (mouseButton == 1 && searchBar.isMouseIn(mouseX, mouseY)) { @@ -273,11 +280,7 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { override fun handleMouseInput() { super.handleMouseInput() val i = Mouse.getEventDWheel() - if (i != 0 && isShiftKeyDown()) { -// val x = Mouse.getEventX() * width / mc.displayWidth -// val y = height - Mouse.getEventY() * height / mc.displayHeight - 1 -// this.mouseWheelEvent(x, y, i / Math.abs(i)) - } else if (i != 0) { + if (i != 0) { scrollBar.wheel(i) col.finishRename() } @@ -335,3 +338,33 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound { super.drawHoveringText(textLines, x, y, font) } } + +/** + * Format multiple lines of tooltips by the given max chars. + */ +fun fmtTooltips(title: String, vararg keys: String, maxChars: Int): List { + val result: MutableList = mutableListOf() + result.add(I18n.format(title)) + for (key in keys) { + val words = I18n.format(key).split(' ') + var i = 0 + if (key.length < maxChars) { + result.add(key) + } + while (i < words.size) { + val s = StringBuilder() + perWord@ + while (s.length < maxChars) { + s.append(words[i]) + i += 1 + if (i >= words.size) break@perWord + s.append(" ") + } + if (!s.startsWith('§')) { + s.insert(0, "§7") + } + result.add(s.toString()) + } + } + return result +} diff --git a/src/main/java/com/projecturanus/betterp2p/client/gui/InfoWrapper.kt b/src/main/java/com/projecturanus/betterp2p/client/gui/InfoWrapper.kt index ef853e8..ed71941 100644 --- a/src/main/java/com/projecturanus/betterp2p/client/gui/InfoWrapper.kt +++ b/src/main/java/com/projecturanus/betterp2p/client/gui/InfoWrapper.kt @@ -2,19 +2,13 @@ package com.projecturanus.betterp2p.client.gui import appeng.api.parts.IPart import appeng.api.parts.IPartItem -import appeng.api.parts.PartItemStack -import appeng.me.GridNode import appeng.parts.p2p.PartP2PTunnel -import appeng.parts.p2p.PartP2PTunnelME -import appeng.tile.networking.TileCableBus import com.projecturanus.betterp2p.network.P2PInfo import com.projecturanus.betterp2p.network.hashP2P import net.minecraft.client.gui.GuiButton import net.minecraft.client.resources.I18n import net.minecraft.init.Blocks -import net.minecraft.item.ItemStack import net.minecraft.util.IIcon -import net.minecraftforge.common.DimensionManager import net.minecraftforge.common.util.ForgeDirection class InfoWrapper(info: P2PInfo) { @@ -53,7 +47,7 @@ class InfoWrapper(info: P2PInfo) { } } - val hoverInfo: List + val hoverInfo: MutableList val channels: String? by lazy { if (info.channels >= 0) { @@ -65,6 +59,14 @@ class InfoWrapper(info: P2PInfo) { var name: String = info.name var error: Boolean = false + set(value) { + if (value) { + hoverInfo[4] = "§c" + I18n.format("gui.advanced_memory_card.p2p_status.unbound") + } else { + hoverInfo[4] = "§a" + I18n.format("gui.advanced_memory_card.p2p_status.bound") + } + field = value + } // Widgets val bindButton = GuiButton(0, 0, 0, 34, 20, I18n.format("gui.advanced_memory_card.bind")) @@ -83,9 +85,9 @@ class InfoWrapper(info: P2PInfo) { append(typeName) append(" - ") if (output) - append(I18n.format("gui.advanced_memory_card.desc.mode.output")) + append(I18n.format("gui.advanced_memory_card.p2p_status.output")) else - append(I18n.format("gui.advanced_memory_card.desc.mode.input")) + append(I18n.format("gui.advanced_memory_card.p2p_status.input")) } val online = info.hasChannel hoverInfo = mutableListOf( @@ -112,9 +114,8 @@ class InfoWrapper(info: P2PInfo) { "§e" + I18n.format("gui.advanced_memory_card.dim", info.world) ) } - - } + override fun hashCode(): Int { return code.hashCode() } diff --git a/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetButton.kt b/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetButton.kt index 1fe425e..0e089c3 100644 --- a/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetButton.kt +++ b/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetButton.kt @@ -1,6 +1,5 @@ package com.projecturanus.betterp2p.client.gui.widget -import com.projecturanus.betterp2p.MODID import com.projecturanus.betterp2p.client.gui.GUI_TEX_HEIGHT import com.projecturanus.betterp2p.client.gui.GUI_WIDTH import com.projecturanus.betterp2p.client.gui.GuiAdvancedMemoryCard @@ -19,11 +18,12 @@ import org.lwjgl.opengl.GL11 * @param height * @param hoverText - unlocalized text to display when mouse hovering */ -abstract class WidgetButton(val gui: GuiAdvancedMemoryCard, x: Int, y: Int, width: Int, height: Int, - val hoverText: () -> String): GuiButton(0, x, y, width, height, "") { +abstract class WidgetButton(val gui: GuiAdvancedMemoryCard, x: Int, y: Int, width: Int, height: Int): + GuiButton(0, x, y, width, height, "") { private var texX = 0.0 private var texY = 0.0 + var hoverText: List = listOf() abstract fun mousePressed(mouseX: Int, mouseY: Int) @@ -41,8 +41,8 @@ abstract class WidgetButton(val gui: GuiAdvancedMemoryCard, x: Int, y: Int, widt u0 = (32.0 * k) / GUI_WIDTH, v0 = (232.0) / GUI_TEX_HEIGHT, u1 = (32.0 * (k + 1)) / GUI_WIDTH, v1 = (232.0 + height) / GUI_TEX_HEIGHT) // Draw button icon - drawTexturedQuad(tessellator, xPosition.toDouble(), yPosition.toDouble(), - (xPosition + width).toDouble(), (yPosition + height).toDouble(), + drawTexturedQuad(tessellator, xPosition + 1.0, yPosition + 1.0, + xPosition + width - 1.0, yPosition + height - 1.0, u0 = texX / GUI_WIDTH, v0 = texY / GUI_TEX_HEIGHT, u1 = (texX + width) / GUI_WIDTH, v1 = (texY + height) / GUI_TEX_HEIGHT) diff --git a/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetP2PDevice.kt b/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetP2PDevice.kt index 39924c5..400f92d 100644 --- a/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetP2PDevice.kt +++ b/src/main/java/com/projecturanus/betterp2p/client/gui/widget/WidgetP2PDevice.kt @@ -20,6 +20,10 @@ object P2PEntryConstants { const val LEFT_ALIGN = 24 } +val typeIcons: List = listOf( + +) + class WidgetP2PDevice(private val selectedInfoProperty: KProperty0, val modeSupplier: () -> BetterMemoryCardModes, val infoSupplier: () -> InfoWrapper?, var x: Int, var y: Int): Widget() { var renderNameTextField = true @@ -45,7 +49,7 @@ class WidgetP2PDevice(private val selectedInfoProperty: KProperty0 } GL11.glColor3f(255f, 255f, 255f) // Draw our icons... - drawIcon(gui, info.icon!!, info.overlay!!, x + 3, y + 3) + drawIcon(gui, info.icon, info.overlay, x + 3, y + 3) gui.bindTexture(gui.BACKGROUND) if (info.output) { drawTexturedQuad(Tessellator.instance, x.toDouble(), y + 4.0, x + 16.0, y + 20.0, diff --git a/src/main/java/com/projecturanus/betterp2p/item/BetterMemoryCardModes.kt b/src/main/java/com/projecturanus/betterp2p/item/BetterMemoryCardModes.kt index 975d0ef..168f5e0 100644 --- a/src/main/java/com/projecturanus/betterp2p/item/BetterMemoryCardModes.kt +++ b/src/main/java/com/projecturanus/betterp2p/item/BetterMemoryCardModes.kt @@ -1,20 +1,36 @@ package com.projecturanus.betterp2p.item -enum class BetterMemoryCardModes { +import com.projecturanus.betterp2p.client.gui.fmtTooltips + +const val MAX_TOOLTIP_LENGTH = 40 + +enum class BetterMemoryCardModes(val unlocalizedName: String, vararg val unlocalizedDesc: String) { /** * Select an input P2P and bind its output */ - OUTPUT, + OUTPUT("gui.advanced_memory_card.mode.output", + "gui.advanced_memory_card.mode.output.desc.1", + "gui.advanced_memory_card.mode.output.desc.2", + "gui.advanced_memory_card.mode.output.desc.3" + ), /** * Select an output P2P and bind its input */ - INPUT, + INPUT("gui.advanced_memory_card.mode.input", + "gui.advanced_memory_card.mode.input.desc.1", + "gui.advanced_memory_card.mode.input.desc.2", + "gui.advanced_memory_card.mode.input.desc.3" + ), /** * Copy same output frequency */ - COPY; + COPY("gui.advanced_memory_card.mode.copy", + "gui.advanced_memory_card.mode.copy.desc.1", + "gui.advanced_memory_card.mode.copy.desc.2", + "gui.advanced_memory_card.mode.copy.desc.3", + ); fun next(): BetterMemoryCardModes { return values()[ordinal.plus(1) % values().size] diff --git a/src/main/java/com/projecturanus/betterp2p/util/CableBusUtil.kt b/src/main/java/com/projecturanus/betterp2p/util/CableBusUtil.kt index 60878cf..ff8670b 100644 --- a/src/main/java/com/projecturanus/betterp2p/util/CableBusUtil.kt +++ b/src/main/java/com/projecturanus/betterp2p/util/CableBusUtil.kt @@ -2,13 +2,16 @@ package com.projecturanus.betterp2p.util import appeng.api.config.SecurityPermissions import appeng.api.networking.IGrid +import appeng.api.networking.IGridHost import appeng.api.networking.security.ISecurityGrid import appeng.api.parts.IPart import appeng.api.parts.IPartHost import appeng.api.parts.SelectedPart +import appeng.api.util.IReadOnlyCollection import appeng.parts.AEBasePart import appeng.parts.ICableBusContainer import appeng.parts.p2p.PartP2PTunnel +import appeng.parts.p2p.PartP2PTunnelME import appeng.tile.networking.TileCableBus import net.minecraft.entity.player.EntityPlayer import net.minecraft.tileentity.TileEntity @@ -51,6 +54,15 @@ fun listTargetGridP2P(grid: IGrid?, player: EntityPlayer, clazz: Class }?.toList() ?: emptyList() } +fun listAllGridP2P(grid: IGrid?, player: EntityPlayer): List> { + if (grid is ISecurityGrid && !grid.hasPermission(player, SecurityPermissions.BUILD)) + return emptyList() + val classes = grid?.machinesClasses?.filter { c -> c.superclass == PartP2PTunnel::class.java } ?: emptyList() + val ret: MutableList> = mutableListOf() + classes.forEach{ c -> ret.addAll(grid?.getMachines(c)?.map { it.machine as PartP2PTunnel<*> } ?: emptyList()) } + return ret +} + val AEBasePart.facingPosX: Int? get() = host?.location?.x?.and(side?.offsetX ?: EnumFacing.UP.frontOffsetX) diff --git a/src/main/java/com/projecturanus/betterp2p/util/p2p/P2PStatus.kt b/src/main/java/com/projecturanus/betterp2p/util/p2p/P2PStatus.kt index 996de8c..026b7e2 100644 --- a/src/main/java/com/projecturanus/betterp2p/util/p2p/P2PStatus.kt +++ b/src/main/java/com/projecturanus/betterp2p/util/p2p/P2PStatus.kt @@ -4,6 +4,7 @@ import appeng.api.networking.IGrid import appeng.parts.p2p.PartP2PTunnel import appeng.parts.p2p.PartP2PTunnelME import com.projecturanus.betterp2p.network.hashP2P +import com.projecturanus.betterp2p.util.listAllGridP2P import com.projecturanus.betterp2p.util.listTargetGridP2P import net.minecraft.entity.player.EntityPlayer @@ -11,8 +12,12 @@ class P2PStatus(player: EntityPlayer, grid: IGrid, val targetP2P: PartP2PTunnel< val listP2P: MutableMap> = mutableMapOf() init { - listTargetGridP2P(grid, player, targetP2P?.javaClass ?: PartP2PTunnelME::class.java) - .forEach { listP2P[hashP2P(it)] = it } + if (targetP2P == null) { + listAllGridP2P(grid, player).forEach { listP2P[hashP2P(it)] = it } + } else { + listTargetGridP2P(grid, player, targetP2P.javaClass) + .forEach { listP2P[hashP2P(it)] = it } + } } } diff --git a/src/main/resources/assets/betterp2p/lang/en_US.lang b/src/main/resources/assets/betterp2p/lang/en_US.lang index 25a11ed..ad5956e 100644 --- a/src/main/resources/assets/betterp2p/lang/en_US.lang +++ b/src/main/resources/assets/betterp2p/lang/en_US.lang @@ -13,19 +13,24 @@ gui.advanced_memory_card.sortinfo4=Show Bound P2Ps only gui.advanced_memory_card.sortinfo5=Show Unbound P2Ps only gui.advanced_memory_card.sortinfo6=Tags are space separated and are combined w/ the AND operator. gui.advanced_memory_card.extra.channel=Channels used: %s -gui.advanced_memory_card.mode.input=Mode: Bind Input -gui.advanced_memory_card.mode.output=Mode: Bind Output -gui.advanced_memory_card.mode.copy=Mode: Copy Output -gui.advanced_memory_card.desc.mode=Switch to %s -gui.advanced_memory_card.desc.mode.input=Input -gui.advanced_memory_card.desc.mode.output=Output +gui.advanced_memory_card.mode.input=Current Mode: Bind to §9Input +gui.advanced_memory_card.mode.input.desc.1=• Before binding, the §aselected §aP2P §7and §bbind §btarget §7have their connections removed. +gui.advanced_memory_card.mode.input.desc.2=• The §aselected P2P §7becomes the the §6output§7, while the §bbind §btarget §7becomes the §9input§7. +gui.advanced_memory_card.mode.input.desc.3=• The §aselected P2P §7becomes the same type as its new input. +gui.advanced_memory_card.mode.output=Current Mode: Bind to §6Output +gui.advanced_memory_card.mode.output.desc.1=• Before binding, the §aselected §aP2P §7and §bbind §btarget §7have their connections removed. +gui.advanced_memory_card.mode.output.desc.2=• The §aselected P2P §7becomes the the §9input§7, while the §bbind §btarget §7becomes the §6output§7. +gui.advanced_memory_card.mode.output.desc.3=• The §bbind target §7becomes the same type as its new input. +gui.advanced_memory_card.mode.copy=Current Mode: Copy §6Output +gui.advanced_memory_card.mode.copy.desc.1=• Before binding, the §bbind §btarget §7has its connections removed. +gui.advanced_memory_card.mode.copy.desc.2=• The §aselected §aP2P §7becomes the §9input§7, while the §bbind §btarget §7is added to the list of the §aselected §aP2P's §6outputs§7. +gui.advanced_memory_card.mode.copy.desc.3=• The §bbind target §7becomes the same type as its new input. gui.advanced_memory_card.desc.not_set=Not set gui.advanced_memory_card.desc.effect=Effect: -gui.advanced_memory_card.gui_scale.resize=Resize -gui.advanced_memory_card.gui_scale.small=Small -gui.advanced_memory_card.gui_scale.normal=Standard -gui.advanced_memory_card.gui_scale.large=Large -gui.advanced_memory_card.gui_scale.dynamic=Automatic +gui.advanced_memory_card.gui_scale.small=Current Size: Small +gui.advanced_memory_card.gui_scale.normal=Current Size: Standard +gui.advanced_memory_card.gui_scale.large=Current Size: Large +gui.advanced_memory_card.gui_scale.dynamic=Current Size: Automatic gui.advanced_memory_card.p2p_status.bound=Bound gui.advanced_memory_card.p2p_status.unbound=Unbound gui.advanced_memory_card.p2p_status.input=Input diff --git a/src/main/resources/assets/betterp2p/textures/gui/advanced_memory_card.png b/src/main/resources/assets/betterp2p/textures/gui/advanced_memory_card.png index fb0e23ce2467c70538cb7ab929c307d96dda6693..923c397e9263e7a3a94491cbbb109170087c1d34 100644 GIT binary patch literal 7225 zcmeHMS5#9`lucsLfFhwoA`p6$q9_Om1PBDAg(lJwq&MjTp+t&+g3?90f^?AH1(n`A z(iQ0)q=h=q`JMTlwPvlEkN5H3zUQ5N_rCX>`_>D`sbk5>5M&?_h+J6-qXhziQNRU* zT?L+8;(4cl8z)|Oiqzn4Th-Uw`LlRAm~ zEyl9>gK&d{V%|L4LG8W8+}!EQW!uj=IcqaBvd_Oh8Ea>7-srY{D(_c4@3JwYp>nT!l z4k~FYbT@B4H9GVi^9TRISfBr-J*@%^AbqZ+?*;;0r}}q+hi3fGKp=#RGDcSCg~?{B zaTwFGcl)x9*8#0|wV-G`D}7$pNT|t^&lNu*f2eM(D%jX8B8@w01WAv-%RYfTPu8&b)P7?3m@>N{6 z=#%X4X;^M(BK%H~T0Zyj@9zmnKeAWPncC!Xb(cszBfkbkfd~lFtPjJhw(56F=0C~l zSTxd*gJEdYbx)n(s)GyA^?ySYVJT9+p5^VFneTE3ty=l{`6KVWd;|awNN)=YT7?P; z32{#uLBljs=%J70GXx+L4Df4EIn?w0l|lFiS)>-^)lH^HH<=$kk-QGg^=#1*CI#2- zh);4q-}qUY70#?_N?+(#ZVQH@;M8C!50|qAKNP|q2qIa6f4D+;4@05vcq0v2;S2yM z{A%D9tOWxCM|4j8BqKBfAVEBM360`{6kY+I5vKU;1D~CfVjn``887fm4cTRTRpG79 z--5z&3GUz6Ttz?2q3%IoI2-0nDR@{|^G`trB$T}lAxsOAf&__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