mirror of
https://github.com/GTNewHorizons/WirelessCraftingTerminal.git
synced 2026-11-19 11:49:18 +00:00
Merge pull request #4 from repo-alt/master
Extended tooltip added to the crafting CPU GUI
This commit is contained in:
4 files changed
+19
-1
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
aeversion=rv3
|
||||
wctchannel=
|
||||
wctbuild=1.8.7.7-GTNH
|
||||
wctbuild=1.8.7.8-GTNH
|
||||
wctgroup=net.p455w0rd.wirelesscraftingterminal
|
||||
wctbasename=WirelessCraftingTerminal
|
||||
|
||||
|
||||
@@ -311,6 +311,7 @@ public class GuiCraftConfirm extends WCTBaseGui {
|
||||
dspToolTip = Platform.getItemDisplayName(is);
|
||||
|
||||
if (lineList.size() > 0) {
|
||||
addItemTooltip(is, lineList);
|
||||
dspToolTip = dspToolTip + '\n' + Joiner.on("\n").join(lineList);
|
||||
}
|
||||
|
||||
|
||||
@@ -293,6 +293,7 @@ public class GuiCraftingCPU extends WCTBaseGui implements ISortSource
|
||||
|
||||
if( lineList.size() > 0 )
|
||||
{
|
||||
addItemTooltip(is, lineList);
|
||||
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.google.common.base.Stopwatch;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.gui.widgets.ITooltip;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.helpers.InventoryAction;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
@@ -771,4 +772,19 @@ public abstract class WCTBaseGui extends GuiContainer {
|
||||
public static final synchronized void setSwitchingGuis(final boolean switchingGuis) {
|
||||
WCTBaseGui.switchingGuis = switchingGuis;
|
||||
}
|
||||
protected void addItemTooltip(ItemStack is, List<String> lineList)
|
||||
{
|
||||
if (isShiftKeyDown())
|
||||
{
|
||||
List l = is.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
if (!l.isEmpty())
|
||||
l.remove(0);
|
||||
lineList.addAll(l);
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: update AE2 on maven and dependency in build gradle
|
||||
// lineList.add(GuiText.HoldShiftForTooltip.getLocal());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user