MenuModel.getItemAttributeValue

Queries the item at position item_index in model for the attribute specified by attribute.

If expected_type is non-NULL then it specifies the expected type of the attribute. If it is NULL then any type will be accepted.

If the attribute exists and matches expected_type (or if the expected type is unspecified) then the value is returned.

If the attribute does not exist, or does not match the expected type then NULL is returned.

class MenuModel
getItemAttributeValue

Parameters

itemIndex int

the index of the item

attribute string

the attribute to query

expectedType VariantType

the expected type of the attribute, or NULL

Return Value

Type: Variant

the value of the attribute

Meta

Since

2.32