/// The decoration label is only shown if the icon has children and is a descendant of the hover /// icon. DescendantOfRhs is also used if hover icon is null. float GetDecorationLabelAlpha(IconRelationship relationship) { if (state == IconState.Hovering || state == IconState.Closed || relationship != IconRelationship.DescendantOfRhs || menuNode.children.Count == 0) { return(DEFAULT_DECORATION_LABEL_ALPHA); } return(DESCENDANT_DECORATION_LABEL_ALPHA); }
/// It is easy or difficult to hover based on the relationship to the most recent hover icon float GetHoverDelay(IconRelationship relationship) { switch (relationship) { case IconRelationship.DescendantOfRhs: case IconRelationship.AncestorOfRhs: return(0.0f); default: return(menuRoot.hoverDelay); } }
private float GetTooltipAlpha(IconRelationship relationship) { if (state == IconState.Closed) { return(DEFAULT_TOOLTIP_ALPHA); } float newAlpha; switch (relationship) { case IconRelationship.DescendantOfRhs: case IconRelationship.AncestorOfRhs: newAlpha = SELECTED_PATH_TOOLTIP_ALPHA; break; default: newAlpha = DEFAULT_TOOLTIP_ALPHA; break; } return(newAlpha); }
/// Background is determined by the relationship to the most recent hover Icon private float GetBackgroundAlpha(IconRelationship relationship) { if (state == IconState.Closed) { return(CLOSED_ICON_BG_ALPHA); } float newAlpha; switch (relationship) { case IconRelationship.DescendantOfRhs: newAlpha = DESCENDANT_ICON_BG_ALPHA; break; case IconRelationship.AncestorOfRhs: newAlpha = ANCESTOR_ICON_BG_ALPHA; break; default: newAlpha = DEFAULT_ICON_BG_ALPHA; break; } return(newAlpha); }