mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 01:54:59 +00:00
Middle click craft ordering inserts a proper count (#329)
Co-authored-by: Kogepan229 <[email protected]>
This commit is contained in:
1 parent
80bcb3bdf3
commit
697217c5cd
6 files changed
+15
-18
No files matched your search
@@ -92,7 +92,7 @@ public class GuiCraftingStatus extends appeng.client.gui.implementations.GuiCraf
|
||||
new CPacketInventoryAction(
|
||||
InventoryAction.AUTO_CRAFT,
|
||||
Ae2ReflectClient.getInventorySlots(this).size(),
|
||||
0,
|
||||
hoveredAEStack.getStackSize(),
|
||||
hoveredAEStack));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ public class GuiFCPriority extends FCGuiAmount {
|
||||
protected void addQty(final int i) {
|
||||
try {
|
||||
this.amountBox.setText(Long.toString(getAmount() + i));
|
||||
this.amountBox.setCursorPositionEnd();
|
||||
} catch (final NumberFormatException ignore) {}
|
||||
try {
|
||||
NetworkHandler.instance
|
||||
|
||||
@@ -45,9 +45,7 @@ public class GuiFluidCraftAmount extends FCGuiAmount {
|
||||
this.guiTop + 53,
|
||||
Settings.CRAFTING_MODE,
|
||||
CraftingMode.STANDARD));
|
||||
|
||||
this.amountBox.setText("1");
|
||||
this.amountBox.setSelectionPos(0);
|
||||
((ContainerCraftAmount) this.inventorySlots).setAmountField(this.amountBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.glodblock.github.client.gui.base;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -12,6 +11,7 @@ import com.glodblock.github.inventory.gui.GuiType;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.client.gui.widgets.MEGuiTextField;
|
||||
import appeng.container.AEBaseContainer;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiText;
|
||||
@@ -20,7 +20,7 @@ import appeng.util.calculators.Calculator;
|
||||
|
||||
public abstract class FCGuiAmount extends AEBaseGui {
|
||||
|
||||
protected GuiTextField amountBox;
|
||||
protected MEGuiTextField amountBox;
|
||||
protected GuiTabButton originalGuiBtn;
|
||||
protected GuiButton submit;
|
||||
protected GuiButton plus1;
|
||||
@@ -72,16 +72,10 @@ public abstract class FCGuiAmount extends AEBaseGui {
|
||||
this.originalGuiBtn.setHideEdge(13);
|
||||
}
|
||||
|
||||
this.amountBox = new GuiTextField(
|
||||
this.fontRendererObj,
|
||||
this.guiLeft + 62,
|
||||
this.guiTop + 57,
|
||||
59,
|
||||
this.fontRendererObj.FONT_HEIGHT);
|
||||
this.amountBox.setEnableBackgroundDrawing(false);
|
||||
this.amountBox = new MEGuiTextField(61, 12);
|
||||
this.amountBox.x = this.guiLeft + 60;
|
||||
this.amountBox.y = this.guiTop + 55;
|
||||
this.amountBox.setMaxStringLength(16);
|
||||
this.amountBox.setTextColor(0xFFFFFF);
|
||||
this.amountBox.setVisible(true);
|
||||
this.amountBox.setFocused(true);
|
||||
}
|
||||
|
||||
@@ -134,6 +128,7 @@ public abstract class FCGuiAmount extends AEBaseGui {
|
||||
}
|
||||
String out = Long.toString(resultI);
|
||||
this.amountBox.setText(out);
|
||||
this.amountBox.setCursorPositionEnd();
|
||||
} catch (final NumberFormatException ignore) {}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user