/// <summary> /// Loads the item properties /// </summary> private void LoadProperties() { this.Data = ItemProvider.GetFriendlyNames(this.Item, FriendlyNamesExtraScopes.ItemFullDisplay, this.checkBoxFilterExtraInfo.Checked); // ItemName this.labelItemName.ForeColor = this.Data.Item.GetColor(Data.BaseItemInfoDescription); this.labelItemName.Text = this.Data.FullNameClean; // Base Item Attributes if (this.Data.BaseAttributes.Any()) { this.flowLayoutBaseItemProperties.Controls.Clear(); foreach (var prop in this.Data.BaseAttributes) { this.flowLayoutBaseItemProperties.Controls.Add(BaseTooltip.MakeRow(UIService, this.FontService, prop)); } this.flowLayoutBaseItemProperties.Show(); this.labelBaseItemProperties.Show(); } else { this.flowLayoutBaseItemProperties.Hide(); this.labelBaseItemProperties.Hide(); } // Prefix Attributes if (this.Data.PrefixAttributes.Any()) { this.flowLayoutPrefixProperties.Controls.Clear(); foreach (var prop in this.Data.PrefixAttributes) { this.flowLayoutPrefixProperties.Controls.Add(BaseTooltip.MakeRow(UIService, this.FontService, prop)); } this.flowLayoutPrefixProperties.Show(); this.labelPrefixProperties.Show(); } else { this.flowLayoutPrefixProperties.Hide(); this.labelPrefixProperties.Hide(); } // Suffix Attributes if (this.Data.SuffixAttributes.Any()) { this.flowLayoutSuffixProperties.Controls.Clear(); foreach (var prop in this.Data.SuffixAttributes) { this.flowLayoutSuffixProperties.Controls.Add(BaseTooltip.MakeRow(UIService, this.FontService, prop)); } this.flowLayoutSuffixProperties.Show(); this.labelSuffixProperties.Show(); } else { this.flowLayoutSuffixProperties.Hide(); this.labelSuffixProperties.Hide(); } }
public void Start() { if (this.tooltipText.Length <= 0) { this.tooltipText = "Hello world."; } Canvas canvas = GameObject.FindObjectOfType<Canvas>(); if (canvas != null) { TooltipLocator loc = canvas.GetComponent<TooltipLocator>(); if (loc.tooltip != null) { this.tooltip = loc.tooltip; } else { Debug.LogError("Something is wrong."); } } }
public void Start() { if (this.tooltipText.Length <= 0) { this.tooltipText = "Hello world."; } Canvas canvas = GameObject.FindObjectOfType <Canvas>(); if (canvas != null) { TooltipLocator loc = canvas.GetComponent <TooltipLocator>(); if (loc.tooltip != null) { this.tooltip = loc.tooltip; } else { Debug.LogError("Something is wrong."); } } }
[Inject] protected virtual void Inject(BaseTooltip tooltip) => Tooltip = tooltip;