View Single Post
07/21/15, 04:30 PM   #18
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by sirinsidiator View Post
I think a dedicated settings menu is over-complicating it a bit.
It was just an idea I thought would be a simple solution. I'm ok with whatever.

Originally Posted by sirinsidiator View Post
You are trying to activate the ingame bar through the code posted by merlight in 3 separate addons.
If a user has more than one of these the other two do not need to run the same code to activate the ingame bar again, so I said we could put it in a library because it will only load once by design.
I'm not sure what you mean, merlight hasn't posted any code. But if your talking about the first code I posted it only activates 1 time regardless of how many addons have it. I was using the idea you suggested of setting a flag which prevents the other addons from running the same code:
Originally Posted by sirinsidiator View Post
Instead of checking for specific addons we could set a flag on BACKPACK_TRADING_HOUSE_LAYOUT_FRAGMENT.layoutData
Lua Code:
  1. local sellFiltersEnabled = layoutData.sellFiltersEnabled
  2.     -- Check if someone has already enabled it:
  3.     if sellFiltersEnabled then return end
  4.    
  5.     -- Check if its turned on in my addon:
  6.     if not MY_ADDON_SETTING_ON then return end
  7.    
  8.     -- Set flag -- prevents other addons from running
  9.     -- this code because of check above:
  10.     layoutData.sellFiltersEnabled = true

Originally Posted by sirinsidiator View Post
Unless you have plans to make a custom sell tab bar this should be all that is necessary.
But no I have no plans of doing so and as I said I'm good with whatever you guys want to do. I was just offering some ideas.
  Reply With Quote