I am currently creating my first plugin, and everything is going as expected. However, I have noticed that the plugin toolbar buttons act as toggle buttons by default (click 1, dark grey, click 2, back to normal,) and I cannot find documentation for this behavior on the developer website. Given I would like to utilize and nullify this behavior for different circumstances, I was wondering if anyone has information on how to read and change this property.
I actually found a really hacky way to do this. If you simply disable and re-enable a plugin toolbar button rapidly, it will reset the button state allowing you to achieve this behavior.
I can’t quite figure out how to use this, unfortunately.
I’ve tried the following:
local function AttachmentLocus()
--LocusButton.Enabled = false
--LocusButton.Enabled = true
LocusButton:SetActive(true)
which does not throw an error, but does not change the state. I do see the documentation that suggests the use of this in the plugin toolbar button page ((PluginToolbarButton),) but again, I cannot get it to do anything.