feat: open bank from bag slots
This commit is contained in:
+135
@@ -789,6 +789,141 @@ local function HideCharacterDropdown()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Bank dropdown management
|
||||||
|
local bankDropdown = nil
|
||||||
|
|
||||||
|
-- Toggle bank dropdown
|
||||||
|
function Guda_BagFrame_ToggleBankDropdown(button)
|
||||||
|
if bankDropdown and bankDropdown:IsShown() then
|
||||||
|
bankDropdown:Hide()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not bankDropdown then
|
||||||
|
-- Create dropdown frame
|
||||||
|
bankDropdown = CreateFrame("Frame", "Guda_BankDropdown", UIParent)
|
||||||
|
bankDropdown:SetFrameStrata("DIALOG")
|
||||||
|
bankDropdown:SetWidth(200)
|
||||||
|
bankDropdown:SetBackdrop({
|
||||||
|
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||||
|
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
|
||||||
|
tile = true,
|
||||||
|
tileSize = 16,
|
||||||
|
edgeSize = 16,
|
||||||
|
insets = { left = 4, right = 4, top = 4, bottom = 4 }
|
||||||
|
})
|
||||||
|
bankDropdown:SetBackdropColor(0, 0, 0, 0.95)
|
||||||
|
bankDropdown:EnableMouse(true)
|
||||||
|
bankDropdown:Hide()
|
||||||
|
|
||||||
|
bankDropdown.buttons = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Position dropdown below the button
|
||||||
|
bankDropdown:ClearAllPoints()
|
||||||
|
bankDropdown:SetPoint("TOPLEFT", button, "BOTTOMLEFT", 0, -2)
|
||||||
|
|
||||||
|
-- Clear existing buttons
|
||||||
|
for _, btn in ipairs(bankDropdown.buttons) do
|
||||||
|
btn:Hide()
|
||||||
|
end
|
||||||
|
bankDropdown.buttons = {}
|
||||||
|
|
||||||
|
-- Get all characters
|
||||||
|
local chars = addon.Modules.DB:GetAllCharacters(true)
|
||||||
|
|
||||||
|
local yOffset = -8
|
||||||
|
|
||||||
|
-- Add character buttons
|
||||||
|
for _, char in ipairs(chars) do
|
||||||
|
-- Capture variables in local scope for closure
|
||||||
|
local charFullName = char.fullName
|
||||||
|
local charName = char.name
|
||||||
|
local charMoney = char.money or 0
|
||||||
|
local charClassToken = char.classToken
|
||||||
|
|
||||||
|
local charButton = CreateFrame("Button", nil, bankDropdown)
|
||||||
|
charButton:SetWidth(188)
|
||||||
|
charButton:SetHeight(20)
|
||||||
|
charButton:SetPoint("TOP", bankDropdown, "TOP", 0, yOffset)
|
||||||
|
|
||||||
|
-- Button background on hover
|
||||||
|
local charBg = charButton:CreateTexture(nil, "BACKGROUND")
|
||||||
|
charBg:SetAllPoints()
|
||||||
|
charBg:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
|
||||||
|
charBg:SetBlendMode("ADD")
|
||||||
|
charBg:SetAlpha(0)
|
||||||
|
|
||||||
|
-- Get class color
|
||||||
|
local classColor = charClassToken and RAID_CLASS_COLORS[charClassToken]
|
||||||
|
local r, g, b = 1, 1, 1
|
||||||
|
if classColor then
|
||||||
|
r, g, b = classColor.r, classColor.g, classColor.b
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Button text
|
||||||
|
local charText = charButton:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
|
||||||
|
charText:SetPoint("LEFT", charButton, "LEFT", 8, 0)
|
||||||
|
charText:SetText(charName)
|
||||||
|
charText:SetTextColor(r, g, b)
|
||||||
|
|
||||||
|
-- Money text
|
||||||
|
local moneyText = charButton:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||||
|
moneyText:SetPoint("RIGHT", charButton, "RIGHT", -8, 0)
|
||||||
|
moneyText:SetText(addon.Modules.Utils:FormatMoney(charMoney))
|
||||||
|
moneyText:SetTextColor(0.7, 0.7, 0.7)
|
||||||
|
|
||||||
|
-- Button scripts
|
||||||
|
charButton:SetScript("OnEnter", function()
|
||||||
|
charBg:SetAlpha(0.3)
|
||||||
|
end)
|
||||||
|
charButton:SetScript("OnLeave", function()
|
||||||
|
charBg:SetAlpha(0)
|
||||||
|
end)
|
||||||
|
charButton:SetScript("OnClick", function()
|
||||||
|
if charFullName then
|
||||||
|
-- Show bank for this character
|
||||||
|
Guda_BagFrame_ShowCharacterBank(charFullName, charName)
|
||||||
|
bankDropdown:Hide()
|
||||||
|
else
|
||||||
|
addon:Print("Error: Character fullName is nil")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
table.insert(bankDropdown.buttons, charButton)
|
||||||
|
yOffset = yOffset - 20
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set dropdown height based on content
|
||||||
|
bankDropdown:SetHeight(math.abs(yOffset) + 8)
|
||||||
|
|
||||||
|
-- Show dropdown
|
||||||
|
bankDropdown:Show()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Show character's bank
|
||||||
|
function Guda_BagFrame_ShowCharacterBank(fullName, displayName)
|
||||||
|
-- Use the existing BankFrame module
|
||||||
|
if not addon.Modules.BankFrame then
|
||||||
|
addon:Print("Bank frame module not available")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Position bank frame at center of screen
|
||||||
|
if Guda_BankFrame then
|
||||||
|
Guda_BankFrame:ClearAllPoints()
|
||||||
|
Guda_BankFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Show the character's bank
|
||||||
|
addon.Modules.BankFrame:ShowCharacter(fullName)
|
||||||
|
|
||||||
|
-- Make sure frame is shown
|
||||||
|
if Guda_BankFrame then
|
||||||
|
Guda_BankFrame:Show()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Search changed handler
|
-- Search changed handler
|
||||||
function Guda_BagFrame_OnSearchChanged(self)
|
function Guda_BagFrame_OnSearchChanged(self)
|
||||||
local text = self:GetText()
|
local text = self:GetText()
|
||||||
|
|||||||
+2
-2
@@ -232,12 +232,12 @@
|
|||||||
<OnLoad>
|
<OnLoad>
|
||||||
local icon = getglobal(this:GetName().."_Icon")
|
local icon = getglobal(this:GetName().."_Icon")
|
||||||
if icon then
|
if icon then
|
||||||
icon:SetTexture("Interface\\Icons\\INV_Misc_Bag_09")
|
icon:SetTexture("Interface\\Icons\\INV_Misc_Bag_08")
|
||||||
icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
|
icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
|
||||||
end
|
end
|
||||||
</OnLoad>
|
</OnLoad>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
Guda_BankFrame:Toggle()
|
Guda_BagFrame_ToggleBankDropdown(this)
|
||||||
</OnClick>
|
</OnClick>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
GameTooltip:SetOwner(this, "ANCHOR_TOP")
|
GameTooltip:SetOwner(this, "ANCHOR_TOP")
|
||||||
|
|||||||
+63
-19
@@ -11,8 +11,13 @@ local searchText = ""
|
|||||||
|
|
||||||
-- OnLoad
|
-- OnLoad
|
||||||
function Guda_BankFrame_OnLoad(self)
|
function Guda_BankFrame_OnLoad(self)
|
||||||
getglobal(self:GetName().."_Title"):SetText("Guda Bank")
|
-- Set up search box placeholder
|
||||||
getglobal(self:GetName().."_SearchBox"):SetText("Search...")
|
local searchBox = getglobal(self:GetName().."_SearchBar_SearchBox")
|
||||||
|
if searchBox then
|
||||||
|
searchBox:SetText("Search bank...")
|
||||||
|
searchBox:SetTextColor(0.5, 0.5, 0.5, 1)
|
||||||
|
end
|
||||||
|
|
||||||
addon:Debug("Bank frame loaded")
|
addon:Debug("Bank frame loaded")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -23,7 +28,18 @@ end
|
|||||||
|
|
||||||
-- OnHide
|
-- OnHide
|
||||||
function Guda_BankFrame_OnHide(self)
|
function Guda_BankFrame_OnHide(self)
|
||||||
Guda_ReleaseAllButtons()
|
-- Only release buttons that belong to this frame
|
||||||
|
local itemContainer = getglobal("Guda_BankFrame_ItemContainer")
|
||||||
|
if itemContainer then
|
||||||
|
-- Hide only the buttons that are children of this container
|
||||||
|
local children = { itemContainer:GetChildren() }
|
||||||
|
for _, child in ipairs(children) do
|
||||||
|
if child.hasItem ~= nil then -- It's an item button
|
||||||
|
child:Hide()
|
||||||
|
child:ClearAllPoints()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Toggle visibility
|
-- Toggle visibility
|
||||||
@@ -53,7 +69,17 @@ function BankFrame:Update()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
Guda_ReleaseAllButtons()
|
-- Only release buttons that belong to this frame
|
||||||
|
local itemContainer = getglobal("Guda_BankFrame_ItemContainer")
|
||||||
|
if itemContainer then
|
||||||
|
local children = { itemContainer:GetChildren() }
|
||||||
|
for _, child in ipairs(children) do
|
||||||
|
if child.hasItem ~= nil then -- It's an item button
|
||||||
|
child:Hide()
|
||||||
|
child:ClearAllPoints()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local bankData
|
local bankData
|
||||||
local isOtherChar = false
|
local isOtherChar = false
|
||||||
@@ -85,30 +111,48 @@ function BankFrame:DisplayItems(bankData, isOtherChar, charName)
|
|||||||
local col = 0
|
local col = 0
|
||||||
local buttonSize = addon.Modules.DB:GetSetting("iconSize") or addon.Constants.BUTTON_SIZE
|
local buttonSize = addon.Modules.DB:GetSetting("iconSize") or addon.Constants.BUTTON_SIZE
|
||||||
local spacing = addon.Modules.DB:GetSetting("iconSpacing") or addon.Constants.BUTTON_SPACING
|
local spacing = addon.Modules.DB:GetSetting("iconSpacing") or addon.Constants.BUTTON_SPACING
|
||||||
local perRow = addon.Modules.DB:GetSetting("bankColumns") or 15
|
local perRow = addon.Modules.DB:GetSetting("bankColumns") or 10
|
||||||
local itemContainer = getglobal("Guda_BankFrame_ItemContainer")
|
local itemContainer = getglobal("Guda_BankFrame_ItemContainer")
|
||||||
|
|
||||||
for _, bagID in ipairs(addon.Constants.BANK_BAGS) do
|
for _, bagID in ipairs(addon.Constants.BANK_BAGS) do
|
||||||
local bag = bankData[bagID]
|
local bag = bankData[bagID]
|
||||||
|
|
||||||
if bag and bag.slots then
|
-- Get slot count for this bag
|
||||||
for slot, itemData in pairs(bag.slots) do
|
local numSlots
|
||||||
if self:PassesSearchFilter(itemData) then
|
if isOtherChar and bag and bag.numSlots then
|
||||||
local button = Guda_GetItemButton(itemContainer)
|
-- Use stored slot count for other characters
|
||||||
|
numSlots = bag.numSlots
|
||||||
|
else
|
||||||
|
-- Use current character's bag slot count
|
||||||
|
numSlots = addon.Modules.Utils:GetBagSlotCount(bagID)
|
||||||
|
end
|
||||||
|
|
||||||
local xPos = x + (col * (buttonSize + spacing))
|
-- Only show bags that have slots
|
||||||
local yPos = y - (row * (buttonSize + spacing))
|
if numSlots and numSlots > 0 then
|
||||||
|
-- Iterate through ALL slots (1 to numSlots) to show empty slots too
|
||||||
|
for slot = 1, numSlots do
|
||||||
|
local itemData = bag and bag.slots and bag.slots[slot] or nil
|
||||||
|
|
||||||
button:ClearAllPoints()
|
-- Check if item matches search filter
|
||||||
button:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", xPos, yPos)
|
local matchesFilter = self:PassesSearchFilter(itemData)
|
||||||
|
|
||||||
Guda_ItemButton_SetItem(button, bagID, slot, itemData, true, isOtherChar and charName or nil)
|
local button = Guda_GetItemButton(itemContainer)
|
||||||
|
|
||||||
col = col + 1
|
-- Position button
|
||||||
if col >= perRow then
|
local xPos = x + (col * (buttonSize + spacing))
|
||||||
col = 0
|
local yPos = y - (row * (buttonSize + spacing))
|
||||||
row = row + 1
|
|
||||||
end
|
button:ClearAllPoints()
|
||||||
|
button:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", xPos, yPos)
|
||||||
|
|
||||||
|
-- Set item data with filter match info
|
||||||
|
Guda_ItemButton_SetItem(button, bagID, slot, itemData, true, isOtherChar and charName or nil, matchesFilter)
|
||||||
|
|
||||||
|
-- Advance position
|
||||||
|
col = col + 1
|
||||||
|
if col >= perRow then
|
||||||
|
col = 0
|
||||||
|
row = row + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+111
-41
@@ -3,37 +3,38 @@
|
|||||||
<!-- Bank Frame -->
|
<!-- Bank Frame -->
|
||||||
<Frame name="Guda_BankFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent">
|
<Frame name="Guda_BankFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="400" y="500"/>
|
<AbsDimension x="420" y="600"/>
|
||||||
</Size>
|
</Size>
|
||||||
|
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="LEFT" relativePoint="LEFT" relativeTo="UIParent">
|
<Anchor point="CENTER" relativePoint="CENTER" relativeTo="UIParent">
|
||||||
<Offset>
|
<Offset>
|
||||||
<AbsDimension x="50" y="0"/>
|
<AbsDimension x="0" y="0"/>
|
||||||
</Offset>
|
</Offset>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
|
|
||||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||||
<BackgroundInsets>
|
<BackgroundInsets>
|
||||||
<AbsInset left="11" right="12" top="12" bottom="11"/>
|
<AbsInset left="11" right="12" top="12" bottom="11"/>
|
||||||
</BackgroundInsets>
|
</BackgroundInsets>
|
||||||
<TileSize>
|
<TileSize>
|
||||||
<AbsValue val="32"/>
|
<AbsValue val="16"/>
|
||||||
</TileSize>
|
</TileSize>
|
||||||
<EdgeSize>
|
<EdgeSize>
|
||||||
<AbsValue val="32"/>
|
<AbsValue val="32"/>
|
||||||
</EdgeSize>
|
</EdgeSize>
|
||||||
|
<Color r="0" g="0" b="0" a="0.9"/>
|
||||||
</Backdrop>
|
</Backdrop>
|
||||||
|
|
||||||
<Layers>
|
<Layers>
|
||||||
<!-- Title -->
|
<!-- Title at top -->
|
||||||
<Layer level="ARTWORK">
|
<Layer level="ARTWORK">
|
||||||
<FontString name="$parent_Title" inherits="GameFontNormalLarge">
|
<FontString name="$parent_Title" inherits="GameFontNormalLarge">
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOP">
|
<Anchor point="TOP">
|
||||||
<Offset>
|
<Offset>
|
||||||
<AbsDimension x="0" y="-18"/>
|
<AbsDimension x="0" y="-12"/>
|
||||||
</Offset>
|
</Offset>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
@@ -58,21 +59,44 @@
|
|||||||
</Scripts>
|
</Scripts>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Settings Button -->
|
<!-- Settings Button (header right, next to close) -->
|
||||||
<Button name="$parent_SettingsButton">
|
<Button name="$parent_SettingsButton">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="24" y="24"/>
|
<AbsDimension x="24" y="24"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOPRIGHT" relativePoint="TOPLEFT" relativeTo="$parent_CloseButton" x="-5" y="0"/>
|
<Anchor point="TOPRIGHT" relativePoint="TOPLEFT" relativeTo="$parent_CloseButton">
|
||||||
|
<Offset>
|
||||||
|
<AbsDimension x="0" y="-5"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
<NormalTexture file="Interface\Icons\Trade_Engineering"/>
|
<Layers>
|
||||||
|
<Layer level="ARTWORK">
|
||||||
|
<Texture name="$parent_Icon">
|
||||||
|
<Size>
|
||||||
|
<AbsDimension x="20" y="20"/>
|
||||||
|
</Size>
|
||||||
|
<Anchors>
|
||||||
|
<Anchor point="CENTER"/>
|
||||||
|
</Anchors>
|
||||||
|
<Color r="0.8" g="0.8" b="0.8"/>
|
||||||
|
</Texture>
|
||||||
|
</Layer>
|
||||||
|
</Layers>
|
||||||
<Scripts>
|
<Scripts>
|
||||||
|
<OnLoad>
|
||||||
|
local icon = getglobal(this:GetName().."_Icon")
|
||||||
|
if icon then
|
||||||
|
icon:SetTexture("Interface\\Icons\\Trade_Engineering")
|
||||||
|
icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
|
||||||
|
end
|
||||||
|
</OnLoad>
|
||||||
<OnClick>
|
<OnClick>
|
||||||
Guda_OpenSettings()
|
Guda_OpenSettings()
|
||||||
</OnClick>
|
</OnClick>
|
||||||
<OnEnter>
|
<OnEnter>
|
||||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
|
GameTooltip:SetOwner(this, "ANCHOR_TOP")
|
||||||
GameTooltip:SetText("Settings")
|
GameTooltip:SetText("Settings")
|
||||||
GameTooltip:Show()
|
GameTooltip:Show()
|
||||||
</OnEnter>
|
</OnEnter>
|
||||||
@@ -82,51 +106,91 @@
|
|||||||
</Scripts>
|
</Scripts>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<!-- Search Box -->
|
<!-- Search Bar (below title) -->
|
||||||
<EditBox name="$parent_SearchBox" autoFocus="false" inherits="InputBoxTemplate">
|
<Frame name="$parent_SearchBar">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="200" y="20"/>
|
<AbsDimension x="400" y="30"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOP">
|
<Anchor point="TOP">
|
||||||
<Offset>
|
<Offset>
|
||||||
<AbsDimension x="0" y="-48"/>
|
<AbsDimension x="0" y="-40"/>
|
||||||
</Offset>
|
</Offset>
|
||||||
</Anchor>
|
</Anchor>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
<Scripts>
|
|
||||||
<OnTextChanged>
|
|
||||||
Guda_BankFrame_OnSearchChanged(this)
|
|
||||||
</OnTextChanged>
|
|
||||||
<OnEscapePressed>
|
|
||||||
this:ClearFocus()
|
|
||||||
</OnEscapePressed>
|
|
||||||
</Scripts>
|
|
||||||
</EditBox>
|
|
||||||
|
|
||||||
<!-- Sort Button -->
|
<Frames>
|
||||||
<Button name="$parent_SortButton" inherits="UIPanelButtonTemplate" text="Sort Bank">
|
<!-- Full-width Search Box -->
|
||||||
<Size>
|
<EditBox name="$parent_SearchBox" autoFocus="false" inherits="InputBoxTemplate">
|
||||||
<AbsDimension x="100" y="22"/>
|
<Size>
|
||||||
</Size>
|
<AbsDimension x="0" y="20"/>
|
||||||
<Anchors>
|
</Size>
|
||||||
<Anchor point="BOTTOM" x="0" y="10"/>
|
<Anchors>
|
||||||
</Anchors>
|
<Anchor point="LEFT">
|
||||||
<Scripts>
|
<Offset>
|
||||||
<OnClick>
|
<AbsDimension x="16" y="0"/>
|
||||||
Guda_BankFrame_Sort()
|
</Offset>
|
||||||
</OnClick>
|
</Anchor>
|
||||||
</Scripts>
|
<Anchor point="RIGHT">
|
||||||
</Button>
|
<Offset>
|
||||||
|
<AbsDimension x="-10" y="0"/>
|
||||||
|
</Offset>
|
||||||
|
</Anchor>
|
||||||
|
</Anchors>
|
||||||
|
<Scripts>
|
||||||
|
<OnEditFocusGained>
|
||||||
|
if this:GetText() == "Search bank..." then
|
||||||
|
this:SetText("")
|
||||||
|
this:SetTextColor(1, 1, 1, 1)
|
||||||
|
end
|
||||||
|
</OnEditFocusGained>
|
||||||
|
<OnEditFocusLost>
|
||||||
|
if this:GetText() == "" then
|
||||||
|
this:SetText("Search bank...")
|
||||||
|
this:SetTextColor(0.5, 0.5, 0.5, 1)
|
||||||
|
Guda_BankFrame_OnSearchChanged(this)
|
||||||
|
end
|
||||||
|
</OnEditFocusLost>
|
||||||
|
<OnTextChanged>
|
||||||
|
Guda_BankFrame_OnSearchChanged(this)
|
||||||
|
</OnTextChanged>
|
||||||
|
<OnEscapePressed>
|
||||||
|
this:SetText("Search bank...")
|
||||||
|
this:SetTextColor(0.5, 0.5, 0.5, 1)
|
||||||
|
this:ClearFocus()
|
||||||
|
Guda_BankFrame_OnSearchChanged(this)
|
||||||
|
</OnEscapePressed>
|
||||||
|
</Scripts>
|
||||||
|
</EditBox>
|
||||||
|
</Frames>
|
||||||
|
</Frame>
|
||||||
|
|
||||||
<!-- Container for item buttons -->
|
<!-- Container for item buttons -->
|
||||||
<Frame name="$parent_ItemContainer">
|
<Frame name="$parent_ItemContainer" enableMouse="true">
|
||||||
<Size>
|
<Size>
|
||||||
<AbsDimension x="370" y="420"/>
|
<AbsDimension x="400" y="480"/>
|
||||||
</Size>
|
</Size>
|
||||||
<Anchors>
|
<Anchors>
|
||||||
<Anchor point="TOP" x="0" y="-75"/>
|
<Anchor point="TOP" relativePoint="BOTTOM" relativeTo="$parent_SearchBar" x="0" y="-5"/>
|
||||||
</Anchors>
|
</Anchors>
|
||||||
|
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" tile="true">
|
||||||
|
<BackgroundInsets>
|
||||||
|
<AbsInset left="0" right="0" top="0" bottom="0"/>
|
||||||
|
</BackgroundInsets>
|
||||||
|
<TileSize>
|
||||||
|
<AbsValue val="16"/>
|
||||||
|
</TileSize>
|
||||||
|
<Color r="0" g="0" b="0" a="0.5"/>
|
||||||
|
</Backdrop>
|
||||||
|
<Scripts>
|
||||||
|
<OnMouseDown>
|
||||||
|
-- Clear search focus when clicking in item area
|
||||||
|
local searchBox = getglobal("Guda_BankFrame_SearchBar_SearchBox")
|
||||||
|
if searchBox then
|
||||||
|
searchBox:ClearFocus()
|
||||||
|
end
|
||||||
|
</OnMouseDown>
|
||||||
|
</Scripts>
|
||||||
</Frame>
|
</Frame>
|
||||||
</Frames>
|
</Frames>
|
||||||
|
|
||||||
@@ -141,6 +205,12 @@
|
|||||||
Guda_BankFrame_OnHide(this)
|
Guda_BankFrame_OnHide(this)
|
||||||
</OnHide>
|
</OnHide>
|
||||||
<OnMouseDown>
|
<OnMouseDown>
|
||||||
|
-- Clear search box focus when clicking on bank frame
|
||||||
|
local searchBox = getglobal("Guda_BankFrame_SearchBar_SearchBox")
|
||||||
|
if searchBox then
|
||||||
|
searchBox:ClearFocus()
|
||||||
|
end
|
||||||
|
|
||||||
if (arg1 == "LeftButton") then
|
if (arg1 == "LeftButton") then
|
||||||
this:StartMoving()
|
this:StartMoving()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user