DIFF

class ImageWidgetSource

ImageWidget Widget Managed

Part of Widget UI system

All members, including inherited

Methods 11

proto native void SetImageTexture(int image, RTTextureWidget texture)
proto void GetImageSize(int image, out int sx, out int sy)

returns size of image

proto native int GetImage()

Returns active image

proto native void SetUV(float uv[4][2])

When WF_CUSTOMUV is set, we can supply our own UV coords instead of computed ones.

uv
Pointer to array of at least 8 floats (4 corners * 2 floats for u/v)
proto native bool LoadMaskTexture(string resource)

Loads texture as mask used for alpha masking.

resource
Resource name of the texture to load

Returns: True if texture was successfully loaded, false otherwise

proto native float GetMaskProgress()

Progress determines which alpha values are opaque using the mask. For progress x, pixels with alpha in mask < x will be opaque and alpha in mask > x will be transparent. For smooth transition see GetMaskTransitionWidth.

Returns: Progress from 0 to 1 representing alpha range which is visible in the mask

proto native void SetMaskProgress(float value)

See GetMaskProgress for explanation.

value
Expected in range [0; 1]
proto native float GetMaskTransitionWidth()

Transition width 0.1 and progress 0.2 mean that values in mask lower than progress will be opaque. Values higher than (progress + width) will be transparent and values between progress and (progress + width) will be smoothly transitioned.

Returns: Width of the alpha mask transition representing softness of the transition.

proto native void SetMaskTransitionWidth(float value)

See GetMaskTransitionWidth for transition width explanation.

value
Expected in range [0; 1]