gre.get_layer_attrs

gre.get_layer_attrs(
    layer_name
    tags...
)
            

Get properties for a layer instance associated with a particular screen.   The layer_name specifies either the fully qualified name of a layer instance using the ScreenName.LayerName naming convention or, if only the layer name is specified, the name will refer to a layer instance associated with the current screen

The tags are a list of string properties associated with the layer instance and can include one or more of the following values:

        x, y, width, height, alpha, hidden, xoffset, yoffset, geometry, effect

A table containing the keys and their respective values is returned or nil if the layer can not be found.


Parameters:
        layer_name      The model full path of the layer to get information about
        tags            One or more tags as strings

Returns:
        A table containing the tags as keys with the associated table value being the Storyboard
        value associated with that tag.

Example:
            

function check_if_hidden()
    -- check if my_layer is currently hidden
    local data = gre.get_layer_attrs("my_layer", "hidden")
    if data.hidden == 1 then
        print("my_layer is currently hidden")
    else
        print("my_layer is currently visible")
    end
end