|
@@ -4,6 +4,7 @@ using UnityEngine;
|
|
|
using UnityEngine.UI;
|
|
|
using TMPro;
|
|
|
using KairoEngine.Stockpiles;
|
|
|
+using KairoEngine.UI.Tooltips;
|
|
|
|
|
|
namespace KairoEngine.Stockpiles.UI
|
|
|
{
|
|
@@ -12,6 +13,8 @@ namespace KairoEngine.Stockpiles.UI
|
|
|
public Image iconImage;
|
|
|
public TextMeshProUGUI ammoutText;
|
|
|
public TextMeshProUGUI capacityText;
|
|
|
+ public TooltipTrigger tooltipTrigger;
|
|
|
+ public string tooltipType = "";
|
|
|
|
|
|
public StockpileGroupView viewManager;
|
|
|
public StockpilePreset stockpilePreset;
|
|
@@ -29,6 +32,12 @@ namespace KairoEngine.Stockpiles.UI
|
|
|
this.stockpilePreset = stockpilePreset;
|
|
|
iconImage.sprite = this.stockpilePreset.icon;
|
|
|
UpdateValues();
|
|
|
+ if(tooltipTrigger != null)
|
|
|
+ {
|
|
|
+ tooltipTrigger.header = stockpilePreset.title;
|
|
|
+ tooltipTrigger.content = stockpilePreset.description;
|
|
|
+ tooltipTrigger.tooltipType = tooltipType;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void UpdateValues()
|