Skip to content

Class HoverScale

Definition

Namespace: StardewUI.Animation
Assembly: StardewUI.dll

Standalone scaling behavior that can be attached to any Image, causing it to scale up to a specified amount when hovered by the pointer.

public class HoverScale

Inheritance
Object ⇦ HoverScale

Members

Methods

Name Description
Attach(Image, Single, TimeSpan?) Attaches a new hover behavior to an image.

Details

Methods

Attach(Image, float, TimeSpan?)

Attaches a new hover behavior to an image.

public static void Attach(StardewUI.Widgets.Image image, float maxScale, System.TimeSpan? duration);
Parameters

image   Image
The image that will receive the hover behavior.

maxScale   Single
Target scale at the end of the animation; generally a number > 1.

duration   Nullable<TimeSpan>
Duration of the animation; if not specified, defaults to 80 ms.