mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Removed the max width for the debug tooltip because Forge makes it so tooptips can't go offscreen anyways
This commit is contained in:
parent
48c3c0c848
commit
602072d51b
1 changed files with 3 additions and 6 deletions
|
@ -56,7 +56,7 @@ public class ClientEvents{
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onTooltipEvent(ItemTooltipEvent event){
|
public void onTooltipEvent(ItemTooltipEvent event){
|
||||||
//Advanced Item Info
|
//Advanced Item Info
|
||||||
if(event.getItemStack().getItem() != null){
|
if(event.getItemStack() != null && event.getItemStack().getItem() != null){
|
||||||
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
|
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
|
||||||
if(GuiScreen.isCtrlKeyDown()){
|
if(GuiScreen.isCtrlKeyDown()){
|
||||||
event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":");
|
event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":");
|
||||||
|
@ -102,10 +102,7 @@ public class ClientEvents{
|
||||||
if(compound != null && !compound.hasNoTags()){
|
if(compound != null && !compound.hasNoTags()){
|
||||||
event.getToolTip().add(ADVANCED_INFO_HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".nbt.desc")+":");
|
event.getToolTip().add(ADVANCED_INFO_HEADER_PRE+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".nbt.desc")+":");
|
||||||
if(GuiScreen.isShiftKeyDown()){
|
if(GuiScreen.isShiftKeyDown()){
|
||||||
List<String> strgList = Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(compound.toString(), 200);
|
event.getToolTip().add(ADVANCED_INFO_TEXT_PRE+compound.toString());
|
||||||
for(String strg : strgList){
|
|
||||||
event.getToolTip().add(ADVANCED_INFO_TEXT_PRE+strg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.getToolTip().add(ADVANCED_INFO_TEXT_PRE+TextFormatting.ITALIC+"["+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".pressShift.desc")+"]");
|
event.getToolTip().add(ADVANCED_INFO_TEXT_PRE+TextFormatting.ITALIC+"["+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".pressShift.desc")+"]");
|
||||||
|
@ -113,7 +110,7 @@ public class ClientEvents{
|
||||||
}
|
}
|
||||||
|
|
||||||
//Disabling Info
|
//Disabling Info
|
||||||
event.getToolTip().addAll(Minecraft.getMinecraft().fontRendererObj.listFormattedStringToWidth(TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".disablingInfo.desc"), 200));
|
event.getToolTip().add(TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".disablingInfo.desc"));
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in a new issue