メインコンテンツまでスキップ

Class YauiImage

An element that draws a sprite over its content box (inside the padding and border), on top of its box. The corner radii of the box also round a simple image.

Assembly: Yaui.dll​
View Source​
Declaration
public class YauiImage : YauiElement

Inheritance: System.Object -> Yaui.YauiElement

Properties​

Sprite​

View Source​
Declaration
public Sprite Sprite { get; set; }

OverrideSprite​

Drawn instead of Yaui.YauiImage.Sprite while set, without changing it (not serialized). Selectables set it for their sprite swap transitions.

View Source​
Declaration
public Sprite OverrideSprite { get; set; }

Color​

View Source​
Declaration
public Color Color { get; set; }

Type​

View Source​
Declaration
public ImageType Type { get; set; }

BorderScale​

View Source​
Declaration
public float BorderScale { get; set; }

FillMethod​

View Source​
Declaration
public FillMethod FillMethod { get; set; }

FillOrigin​

A value of the FillOrigin enum of Yaui.YauiImage.FillMethod (e.g. Yaui.FillOrigin360).

View Source​
Declaration
public int FillOrigin { get; set; }

FillAmount​

View Source​
Declaration
public float FillAmount { get; set; }

FillClockwise​

View Source​
Declaration
public bool FillClockwise { get; set; }

HasVisibleContent​

Whether the element draws content besides its box: it is then hittable. Call Yaui.YauiElement.SyncHittable() when the value changes.

View Source​
Declaration
protected override bool HasVisibleContent { get; }

ContentIsMaskShape​

Whether a Yaui.YauiMask on this element takes the shape of the content (the alpha of its images) instead of the box's, while there is content.

View Source​
Declaration
protected override bool ContentIsMaskShape { get; }

Methods​

OnValidate()​

View Source​
Declaration
protected override void OnValidate()

OnDidApplyAnimationProperties()​

View Source​
Declaration
protected override void OnDidApplyAnimationProperties()

OnRegistered()​

Called after the element got its slots in a panel (when enabled, or moved to another panel): write the content here. Content written before is gone.

View Source​
Declaration
protected override void OnRegistered()

OnUnregistering()​

Called before the element releases its slots, including its content. The stores may already be shut down (domain reload).

View Source​
Declaration
protected override void OnUnregistering()

OnLayoutApplied()​

Main thread, once a frame right before rendering: the layout of this element changed (Yaui.YauiElement.LayoutRect, Yaui.YauiElement.ContentBox). Content written here is drawn in this frame.

View Source​
Declaration
protected override void OnLayoutApplied()

OnBoxChanged()​

Called after the box style was written (e.g. content that uses its corner radii).

View Source​
Declaration
protected override void OnBoxChanged()