added filter for 'banks and all chars but current'
git [02-03-18 - 20:38]
added filter for 'banks and all chars but current'
diff --git a/IIfA/IIfA.lua b/IIfA/IIfA.lua
index 3aaf55d..4bcd0d1 100644
--- a/IIfA/IIfA.lua
+++ b/IIfA/IIfA.lua
@@ -59,6 +59,7 @@ IIfA.dropdownBankNames = {
"All Characters",
"Bank and Characters",
"Bank and Current Character",
+ "Bank and all but current Character",
"Bank Only",
"Craft Bag"
}
@@ -187,6 +188,7 @@ function IIfA_onLoad(eventCode, addOnName)
in2TooltipsFontSize = 16,
ShowToolTipWhen = "Always",
DBv3 = {},
+ dontFocusSearch = false
}
-- initializing default values
diff --git a/IIfA/IIfABackpack.lua b/IIfA/IIfABackpack.lua
index a866dc1..02420a7 100644
--- a/IIfA/IIfABackpack.lua
+++ b/IIfA/IIfABackpack.lua
@@ -104,6 +104,10 @@ end
local function DoesInventoryMatchList(locationName, location)
local bagId = location.bagID
+ local function isHouse(location)
+ return nil == getHouseIds()[location.bagID]
+ end
+
-- if locationName == "attributes" then return false end
if( IIfA.InventoryListFilter == "All" ) then
return true
@@ -128,11 +132,18 @@ local function DoesInventoryMatchList(locationName, location)
return (location.bagID == BAG_BANK or
location.bagID == BAG_SUBSCRIBER_BANK or
((location.bagID == BAG_BACKPACK or
- location.bagID == BAG_WORN) and
+ location.bagID == BAG_WORN) and
locationName == IIfA.currentCharacterId))
+
+ elseif(IIfA.InventoryListFilter == "Bank and all but current Character") then
+ return not isHouse(location) and (location.bagID == BAG_BANK or
+ location.bagID == BAG_SUBSCRIBER_BANK or
+ ((location.bagID == BAG_BACKPACK or
+ location.bagID == BAG_WORN) and
+ locationName ~= IIfA.currentCharacterId))
elseif(IIfA.InventoryListFilter == "Bank Only") then
- return (location.bagID == BAG_BANK or
+ return (location.bagID == BAG_BANK or
location.bagID == BAG_SUBSCRIBER_BANK)
elseif(IIfA.InventoryListFilter == "Craft Bag") then
diff --git a/IIfA/IIfAMenu.lua b/IIfA/IIfAMenu.lua
index 0dd8bd3..b95c603 100644
--- a/IIfA/IIfAMenu.lua
+++ b/IIfA/IIfAMenu.lua
@@ -446,6 +446,15 @@ function IIfA:CreateOptionsMenu()
{
type = "checkbox",
+ name = "Don't focus search box on UI toggle?",
+ tooltip = "If you open the UI, the edit control will take focus. Check this box to disable it.",
+ getFunc = function() return IIfA.defaults.dontFocusSearch end,
+ setFunc = function(value)
+ IIfA.defaults.dontFocusSearch = value
+ end,
+ }, -- checkbox end
+ {
+ type = "checkbox",
name = "Search Set Names when using Text Filter",
tooltip = "Enables/Disables set name inclusion in searches",
getFunc = function() return IIfA:GetSettings().bFilterOnSetNameToo end,
diff --git a/IIfA/IIfASceneFuncs.lua b/IIfA/IIfASceneFuncs.lua
index c7589bf..717562c 100644
--- a/IIfA/IIfASceneFuncs.lua
+++ b/IIfA/IIfASceneFuncs.lua
@@ -118,8 +118,9 @@ function IIfA:ToggleInventoryFrame()
IIfA:UpdateInventoryScroll()
IIFA_GUI_SearchBox:TakeFocus()
end
-
- IIfA:SaveFrameInfo("ToggleInventoryFrame")
+ if not IIfA.data.dontFocusSearch then
+ IIfA:SaveFrameInfo("ToggleInventoryFrame")
+ end
end