I have successfully added a new sidebar button, but it doesn't stay enabled when I reload FG. What am I missing?
Thanks :)
Printable View
I have successfully added a new sidebar button, but it doesn't stay enabled when I reload FG. What am I missing?
Thanks :)
Are you enabling it via the button entries at the top of the Library window? Or are you enabling it via code?
Sorry, I should have specified. I'm checking the visibility box for it in the Library window. When I quit and re-load, it is unchecked again (I assume the original set of them is being loaded before my new option is added to the array).
Here's the code that I'm using to add it:
https://github.com/bmos/FG-PFRPG-Dis...se_tracker.lua
FGC or FGU?
Do other standard buttons save their state after you exit FG and re-start the campaign?
EDIT: Note that /reload won't save these settings, you need to exit the campaign.
I can't see anything obviously wrong with your code.
The ["sidebar"] buttons are stored in the campaign CampaignRegistry.lua file. Check to see if that is being written OK when you exit.
Oh!
I hadn't actually closed, just /reload
Thanks Trenloe