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
public class YauiImage : YauiElement
Inheritance: System.Object -> Yaui.YauiElement
Properties
Sprite
View Source
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
public Sprite OverrideSprite { get; set; }
Color
View Source
public Color Color { get; set; }
Type
View Source
public ImageType Type { get; set; }
BorderScale
View Source
public float BorderScale { get; set; }
FillMethod
View Source
public FillMethod FillMethod { get; set; }
FillOrigin
A value of the FillOrigin enum of Yaui.YauiImage.FillMethod (e.g. Yaui.FillOrigin360).
View Source
public int FillOrigin { get; set; }
FillAmount
View Source
public float FillAmount { get; set; }
FillClockwise
View Source
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
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
protected override bool ContentIsMaskShape { get; }
Methods
OnValidate()
View Source
protected override void OnValidate()
OnDidApplyAnimationProperties()
View Source
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
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
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
protected override void OnLayoutApplied()
OnBoxChanged()
Called after the box style was written (e.g. content that uses its corner radii).
View Source
protected override void OnBoxChanged()