Skip to content

Indicator

Merlord edited this page Jun 21, 2023 · 5 revisions

Registering an Indicator allows you to define custom tooltips for static references.

Indicator

function description
Indicator.register(params) Register an object with an Indicator. This will give it a tooltip with the provided name.

Indicator.register() Params

Key Type Description
objectId string Required The id of the object to register
name string Required The name of the object to display in the tooltip
additionalUI function Default: nil A function that will be called when the tooltip is created. It will be passed the indicator and the parent element.

Example

CraftingFramework.Indicator.register{
    objectId = "my_object_01",
    name = "My Object",
    additionalUI = function(indicator, parentElement)
       parentElement:createLabel{ text = "Text that displays below the header in the tooltip" }
    end
}
Clone this wiki locally