Table of Contents

Interface ITooltip

Namespace
FishMMO.Shared.Core
Assembly
FishMMO.Shared.dll

Something the UI can describe: an item, an ability, a buff, an attribute.

public interface ITooltip
Extension Methods

Remarks

The contract is data. An implementer fills a TooltipContent with typed rows and never formats a string, because the same description is drawn in several places that disagree about how it should look: a hover tooltip, an inline details pane, a crafting preview that shows what each part changed, a merchant row.

This used to be string Tooltip(), and every implementer concatenated rich text on the spot. Nothing downstream could read a stat back out, so the crafting panel could not preview what it was about to build and the items and abilities systems shared nothing but the interface name.

Properties

Icon

Gets the icon sprite to display in the tooltip.

Sprite Icon { get; }

Property Value

Sprite

Name

Gets the display name for the tooltip.

string Name { get; }

Property Value

string

Methods

BuildTooltip(TooltipContent)

Writes this object's description into content as typed rows.

void BuildTooltip(TooltipContent content)

Parameters

content TooltipContent

The content being assembled.

Remarks

Rows are added with a priority from TooltipPriority and sorted once at the end, so a component's stats land in the stats block rather than after everything its parent wrote. Implementers append; they never clear.