1ForeverHD / TopbarPlus

Construct dynamic and intuitive topbar icons. Enhance the appearance and behaviour of these icons with features such as themes, dropdowns and menus.
https://devforum.roblox.com/t/topbarplus/1017485
Mozilla Public License 2.0
91 stars 119 forks source link

:bindEvent not allowing :setLabel (icon text) to be changed #88

Closed DownCharged closed 5 months ago

DownCharged commented 5 months ago

Error: Players.DownCharged.PlayerGui.LocalScript:23: attempt to index nil with 'setLabel'

local Feedback = Icon.new()
    :setImage(6023426957)
    :setLabel("")

    :bindEvent("selected", function(icon)
        selection.Feedback = true
        print("selected!", selection.Feedback)
        :setLabel("Test")
    end)

    :bindEvent("deselected", function(icon)
        selection.Feedback = false
        print("deselected!", selection.Feedback)
    end)

    :bindEvent("hoverStarted", function(icon)
        print("hovering!")
    end)

    :bindEvent("hoverEnded", function(icon)
        print("Not hovering!")
end)

(Not sure if this was reported before)