using Microsoft.Xna.Framework;
namespace CalamityMod.Items
{
// This interface is used on items where you can hold Left SHIFT for an expanded tooltip.
// All actual implementation of this behavior is done in CalamityGlobalItemTooltip.
public interface IHoldShiftTooltipItem
{
#region Default Keys and Colors
///
/// Internal ID for the TooltipLine which contains Calamity items' extended tooltips when holding SHIFT.
///
internal const string ExtensionTooltipID = "CalamityMod:HoldShiftTooltip";
///
/// Internal ID for the TooltipLine which contains Calamity items' "Hold SHIFT" extension indicators.
///
internal const string ExtensionIndicatorTooltipID = "CalamityMod:HoldShiftExtensionIndicator";
///
/// Internal ID for the TooltipLine which contains Calamity items' flavor tooltips.
/// Flavor tooltips on items which do not use this interface will be present in standard vanilla tooltip lines.
///
internal const string FlavorTooltipID = "CalamityMod:FlavorTooltip";
///
/// The lang/localization key of the default tooltip extension indicator message.
/// This key is used for items which don't replace their tooltips when holding SHIFT.
///
public const string DefaultExtensionIndicatorKey = "UI.HoldShiftTooltipExtensionIndicator";
///
/// The lang/localization key of the default tooltip replacement indicator message.
/// This key is used for items which replace their tooltips entirely when holding SHIFT.
///
public const string DefaultReplacementIndicatorKey = "UI.HoldShiftTooltipReplacementIndicator";
///
/// The default color of the default tooltip extension indicator message.
///
public static readonly Color DefaultExtensionIndicatorColor = new Color(184, 184, 184); // #B8B8B8
///
/// The default lang/localization key which is queried to show an item's tooltip extension.
///
public const string DefaultTooltipExtensionKey = "HoldShiftTooltip";
///
/// The default lang/localization key which is queried to show an item's flavor tooltip.
///
public const string DefaultFlavorTooltipKey = "FlavorTooltip";
#endregion
///
/// Whether holding Left SHIFT for the tooltip extension hides the normal tooltip. Typically this is false.
///
public virtual bool HidesNormalTooltip => false;
#region Extension Indicator Properties
///
/// Whether the "Hold SHIFT for more" extension indicator appears by default. Should essentially always be true.
/// You can set this to false for "secret" easter egg tooltips, like the one on Midas Prime.
///
public virtual bool ShowExtensionIndicator => true;
///
/// The lang/localization key of this item's tooltip extension indicator message.
///
public virtual string ExtensionIndicatorKey => HidesNormalTooltip ? DefaultReplacementIndicatorKey : DefaultExtensionIndicatorKey;
///
/// The color of this item's tooltip extension indicator message. If set to null, the indicator will not be colored.
///
public virtual Color? ExtensionIndicatorColor => DefaultExtensionIndicatorColor;
#endregion
#region Tooltip Extension Properties
///
/// The lang/localization key which this item uses for its tooltip extension.
///
public virtual string TooltipExtensionKey => DefaultTooltipExtensionKey;
///
/// The color of this item's tooltip extension. If set to null, the tooltip extension will not be colored.
///
public virtual Color? TooltipExtensionColor => null;
#endregion
#region Flavor Tooltip Properties
///
/// Whether or not this item should have a separate flavor tooltip. Flavor tooltips are rendered below tooltip extensions for vanilla consistency.
/// Flavor tooltips are optional. If an item only needs a flavor tooltip and not a Hold SHIFT tooltip, just add it to the normal tooltip and don't use this interface.
///
public virtual bool HasFlavorTooltip => false;
///
/// The lang/localization key which this item uses for its flavor tooltip.
///
public virtual string FlavorTooltipKey => DefaultFlavorTooltipKey;
///
/// The color of this item's flavor tooltip. If set to null, the flavor tooltip will not be colored.
///
public virtual Color? FlavorTooltipColor => null;
#endregion
}
}