I am new to TopbarPlus, but I’ve searched the TopbarPlus docs a few times, I must have missed it or misunderstood…
I want to have the visual effect of the icons changing, much like what this does:
Icon.new()
:setImage(123456789, "Deselected")
:setImage(123456789, "Selected")
but, this makes the music toggle button act as such…
(Unlisted YouTube video)
Is there a way to have the icon change, BUT also using :oneClick? Or something similar?
My goal, is to have the music toggle button icon change to the ‘muted’ icon when the music is off, and vise-versa, and to be able to click on the other buttons without it ‘deselecting’/untoggle…
EDIT: This is the current scripting for the music toggle:
Icon.new() --Settings
:setImage(90889351050423)
:setImageScale(0.7)
:align("Right")
:modifyTheme({"Menu", "MaxIcons", 2})
:setMenu({
Icon.new() -- Music toggle
:setImage(109541575110071, "Deselected")
:setImage(124645117814236, "Selected")
:bindEvent("selected", function()
ToggleMusicOff()
end)
:bindEvent("deselected", function()
ToggleMusicOn()
end)
,
Icon.new() -- Settings toggle
:setImage(90889351050423, "Deselected")
:setImage(85845670225309, "Selected")
})
the functions are simply like
if music.Playing = false then
music.Playing = true
(i have debounce etc, i just quickly wrote this bit for clarification)