if this:GetText() == "Search bank..." then this:SetText("") this:SetTextColor(1, 1, 1, 1) end -- Show bank click catcher to detect clicks outside bank while typing local cc = getglobal("Guda_BankClickCatcher") if cc then cc:Show() end -- Hide bank click catcher when focus is lost local cc = getglobal("Guda_BankClickCatcher") if cc then cc:Hide() end if this:GetText() == "" then this:SetText("Search bank...") this:SetTextColor(0.5, 0.5, 0.5, 1) Guda_BankFrame_OnSearchChanged(this) end Guda_BankFrame_OnSearchChanged(this) -- Show/hide clear button based on search content local clearBtn = getglobal("Guda_BankFrame_SearchBar_ClearButton") if clearBtn then local text = this:GetText() if text ~= "" and text ~= "Search bank..." then clearBtn:Show() else clearBtn:Hide() end end this:SetText("Search bank...") this:SetTextColor(0.5, 0.5, 0.5, 1) this:ClearFocus() Guda_BankFrame_OnSearchChanged(this) local cc = getglobal("Guda_BankClickCatcher") if cc then cc:Hide() end -- Clear search focus when clicking toolbar local searchBox = getglobal("Guda_BankFrame_SearchBar_SearchBox") if searchBox then searchBox:ClearFocus() end local text = getglobal(this:GetName().."_Text") if text then text:SetText("0 / 0") text:SetTextColor(0.8, 0.8, 0.8) end -- Clear search focus when clicking in item area local searchBox = getglobal("Guda_BankFrame_SearchBar_SearchBox") if searchBox then searchBox:ClearFocus() end -- Drop item into first available bank slot if CursorHasItem and CursorHasItem() then -- Try main bank slots (bag -1) for slot = 1, GetContainerNumSlots(-1) do if not GetContainerItemLink(-1, slot) then PickupContainerItem(-1, slot) break end end -- Try bank bags 5-10 for bag = 5, 10 do if CursorHasItem() then for slot = 1, GetContainerNumSlots(bag) do if not GetContainerItemLink(bag, slot) then PickupContainerItem(bag, slot) break end end end end end Guda_ClearCursorItem() Guda_BankFrame_OnLoad(this) Guda_BankFrame_OnShow(this) Guda_BankFrame_OnHide(this) -- 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 this:StartMoving() end this:StopMovingOrSizing() -- Drop item into first available bank slot if CursorHasItem and CursorHasItem() then -- Try main bank slots (bag -1) for slot = 1, GetContainerNumSlots(-1) do if not GetContainerItemLink(-1, slot) then PickupContainerItem(-1, slot) break end end -- Try bank bags 5-10 for bag = 5, 10 do if CursorHasItem() then for slot = 1, GetContainerNumSlots(bag) do if not GetContainerItemLink(bag, slot) then PickupContainerItem(bag, slot) break end end end end end Guda_ClearCursorItem()