Пример #1
0
        public void ShowToolTipCommon(IDescribable describable, string showSellPrice)
        {
            //Debug.Log("UIManager.ShowToolTipCommon(" + (describable == null ? "null" : describable.DisplayName) + ", " + showSellPrice + ")");
            if (describable == null)
            {
                HideToolTip();
                return;
            }

            // show new price
            toolTipText.text = describable.GetDescription();
            if (toolTipCurrencyBarController != null)
            {
                toolTipCurrencyBarController.ClearCurrencyAmounts();
                if (describable is Item && showSellPrice != string.Empty)
                {
                    KeyValuePair <Currency, int> sellAmount = (describable as Item).GetSellPrice();
                    if (sellAmount.Value == 0 || sellAmount.Key == null)
                    {
                        // don't print a sell price on things that cannot be sold
                        return;
                    }
                    toolTipCurrencyBarController.UpdateCurrencyAmount(sellAmount.Key, sellAmount.Value, showSellPrice);
                }
            }
        }
Пример #2
0
 /// <summary>
 /// Shows the tooltip
 /// </summary>
 public void ShowTooltip(Vector2 pivot, Vector3 position, IDescribable description)
 {
     tooltipRect.pivot = pivot;
     tooltip.SetActive(true);
     tooltip.transform.position = position;
     tooltipText.text           = description.GetDescription();
 }
Пример #3
0
 /// <summary>
 /// Handles showing the tooltip when the equipment window is open
 /// </summary>
 public void ShowToolTipEquipmentView(IDescribable description, bool showSaleValue = true, float size = 1)
 {
     toolTip.SetActive(true);
     toolTip.transform.position = toolTipLocation.position;
     toolTipTitle.text          = description.GetTitle();
     toolTipStats.text          = description.GetDescription(showSaleValue);
     toolTip.GetComponent <RectTransform>().localScale = new Vector3(size, size, size);
 }
Пример #4
0
 public void ShowTooltip(Vector2 pivot, Vector3 position, IDescribable description)
 {
     //피벗을 따로 선언해주는 이유 : 장비창에서 왼쪽의 장비한 아이템이 화면을 넘어가서 반대로 설명창 UI를 표현하기 위해
     tooltipRect.pivot = pivot;
     tooltip.SetActive(true);
     tooltip.transform.position = position;
     tooltip.GetComponentInChildren <Text>().text = description.GetDescription();
 }
Пример #5
0
    /// <summary>
    /// Affiche le tooltip
    /// </summary>
    /// <param name="pivot">Pivot du tooltip</param>
    /// <param name="position">Position du tooltip</param>
    /// <param name="itemDescription">Description du tooltip</param>
    public void ShowTooltip(Vector2 pivot, Vector3 position, IDescribable itemDescription)
    {
        // Pivot du tooltip
        tooltipRect.pivot = pivot;

        // Position du tooltip
        tooltip.transform.position = position;

        // Description du tooltip
        tooltipText.text = itemDescription.GetDescription();

        // Affichage du tooltip
        tooltip.SetActive(true);
    }
Пример #6
0
    //public void ShowTooltip(Vector3 position, IDescribable description)
    //{
    //    toolTip.SetActive(true);
    //    toolTip.transform.position = position;
    //    toolTipTitle.text = description.GetDescription();
    //}

    public void ShowTooltip(string tooltipType, Vector2 pivot, Vector3 position, IDescribable description)
    {
        if (tooltipType == "generic")
        {
            tooltipRect.pivot = pivot;
            toolTip.SetActive(true);
            toolTip.transform.position = position;
            toolTipText.text           = description.GetDescription();
        }
        if (tooltipType == "equipment")
        {
            EquipmentTooltip.SetActive(true);
            EquipmentTooltip.transform.position = position;
        }
    }
Пример #7
0
        public string[] Handle(string[] args)
        {
            List <string> returns = new List <string>();
            bool          found   = false;

            foreach (ICommandPlugin plugin in PluginRepository.Commands)
            {
                if ((args.Length > 0 && plugin.CanHandle(args[0])) || args.Length == 0)
                {
                    found = true;
                    IDescribable description = (IDescribable)plugin;
                    returns.Add(description.GetName() + "\n\r" + description.GetDescription());
                }
            }
            if (!found)
            {
                returns.Add("The command " + args[0] + " is unrecongnised and therefore has no help text available");
            }
            return(returns.ToArray());
        }
Пример #8
0
 public void RefreshTooltip(IDescribable description)
 {
     tooltipText.text = description.GetDescription();
 }
Пример #9
0
 public void RefreshToolTip(IDescribable description, bool showSaleValue = true, float size = 1)
 {
     toolTipTitle.text = description.GetTitle();
     toolTipStats.text = description.GetDescription(showSaleValue);
     toolTip.GetComponent <RectTransform>().localScale = new Vector3(size, size, size);
 }
Пример #10
0
 public void RefreshInfos(IDescribable description)
 {
     infosText.text = description.GetDescription();
 }
Пример #11
0
 public void ShowInfos(Vector3 pos, IDescribable description)
 {
     infos.SetActive(true);
     infos.transform.position = pos;
     infosText.text           = description.GetDescription();
 }
Пример #12
0
 /// <summary>
 /// Actualise le tooltip
 /// </summary>
 /// <param name="itemDescription">Description du tooltip</param>
 public void RefreshTooltip(IDescribable itemDescription)
 {
     // Actualise le text du tooltîp
     tooltipText.text = itemDescription.GetDescription();
 }
 public static void DisplayLoadedPlugins()
 {
     UserInteraction.ShowMessage(String.Format("Loaded {0} command plugins\n\r", Commands.Count));
     foreach (ICommandPlugin plugin in Commands)
     {
         IDescribable description = (IDescribable)plugin;
         UserInteraction.ShowMessage(String.Format($"{description.GetName()}\n\r{description.GetDescription()}\n\r-----------\n\r"));
     }
 }
 public void ShowTooltip(Vector3 position, IDescribable description)
 {
     gameObject.SetActive(true);
     gameObject.transform.position = position;
     gameObject.GetComponentInChildren <Text>().text = description.GetDescription();
 }
Пример #15
0
 public void ShowTooltip(Vector3 position, IDescribable description)
 {
     Tooltip.SetActive(true);
     Tooltip.transform.position = position;
     TooltipText.text           = description.GetDescription();
 }