Created
August 14, 2014 14:19
-
-
Save merlight/2abe047b24c1047d49f1 to your computer and use it in GitHub Desktop.
AdvancedFilters layout update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local newFilter = self:GetTabFilterInfo(inventoryType, filterTab) | |
if subfilterRows[newFilter] then | |
UpdateInventoryAnchors(self, inventoryType, ADV_FILTER_HEIGHT) | |
else | |
UpdateInventoryAnchors(self, inventoryType, 0) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function UpdateInventoryAnchors(self, inventoryType, shiftY) | |
local layoutData = self.appliedLayout | |
if not layoutData then return end | |
local inventory = self.inventories[inventoryType] | |
local backpack = inventory.listView | |
backpack:SetWidth(layoutData.width) | |
backpack:ClearAnchors() | |
backpack:SetAnchor(TOPRIGHT, nil, TOPRIGHT, 0, layoutData.backpackOffsetY + shiftY) | |
backpack:SetAnchor(BOTTOMRIGHT) | |
ZO_ScrollList_SetHeight(backpack, backpack:GetHeight()) | |
-- ZO_ScrollList_Commit(backpack) -- not necessary, ChangeFilter will do it later | |
local displayInventory = self:GetDisplayInventoryTable(inventoryType) | |
local sortBy = displayInventory.sortHeaders.headerContainer | |
sortBy:ClearAnchors() | |
sortBy:SetAnchor(TOPRIGHT, nil, TOPRIGHT, 0, layoutData.sortByOffsetY + shiftY) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment