Lysa.ui  0.0
Lysa 3D Engine
Icon Class Referenceabstract

Detailed Description

Base class for the widgets drawing a picture fitted into the widget rectangle.

Inherits from: Widget

Lua full name: lysa.ui.Icon

Public Member Functions

nil reset_color ()
 Reverts to the color of the style. More...
 
lysa.Rect get_drawing_rect (screen_ratio: number)
 Returns the rectangle the picture is drawn into for a given screen aspect ratio. More...
 

Properties

lysa.float4 color
 RGBA color the icon is drawn with.
 
boolean has_custom_color
 True if a color was set with the color field, false to use the style color. (read-only)
 
number scale
 Scale factor applied to the picture inside the widget rectangle.
 
number source_ratio
 Width / height ratio of the source picture. (read-only)
 

Member Function Documentation

nil reset_color ( )

Reverts to the color of the style.

lysa.Rect get_drawing_rect ( number  screen_ratio)

Returns the rectangle the picture is drawn into for a given screen aspect ratio.

Parameters
screen_rationumber
Returns
lysa.Rect

Property Documentation

lysa.float4 color

RGBA color the icon is drawn with.

boolean has_custom_color

True if a color was set with the color field, false to use the style color. (read-only)

number scale

Scale factor applied to the picture inside the widget rectangle.

number source_ratio

Width / height ratio of the source picture. (read-only)