Files
Guda-ClassicAPI/UI/MailboxFrame.xml
T
Salikh Gurgenidze 61bb1d9d8e feat: mailbox bug
2025-12-27 01:59:14 +04:00

245 lines
9.2 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<!-- Mailbox Frame -->
<Frame name="Guda_MailboxFrame" toplevel="true" movable="true" enableMouse="true" hidden="true" parent="UIParent">
<Size>
<AbsDimension x="420" y="540"/>
</Size>
<Anchors>
<Anchor point="CENTER" relativePoint="CENTER" relativeTo="UIParent">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11"/>
</BackgroundInsets>
<TileSize>
<AbsValue val="16"/>
</TileSize>
<EdgeSize>
<AbsValue val="32"/>
</EdgeSize>
</Backdrop>
<Layers>
<!-- Title at top -->
<Layer level="ARTWORK">
<FontString name="$parent_Title" inherits="GameFontNormalLarge">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="-12"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<!-- Close Button -->
<Button name="$parent_CloseButton" inherits="UIPanelCloseButton">
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-16" y="-10"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
Guda_MailboxFrame:Hide()
</OnClick>
</Scripts>
</Button>
<!-- Search Bar -->
<Frame name="$parent_SearchBar" inherits="OptionFrameBoxTemplate">
<Size>
<AbsDimension x="250" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-35"/>
</Offset>
</Anchor>
</Anchors>
<Frames>
<EditBox name="$parent_SearchBox" autoFocus="false" inherits="InputBoxTemplate">
<Size>
<AbsDimension x="240" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
Guda_MailboxFrame_OnSearchTextChanged()
</OnTextChanged>
<OnEscapePressed>
this:ClearFocus()
</OnEscapePressed>
<OnEnterPressed>
this:ClearFocus()
</OnEnterPressed>
<OnEditFocusGained>
if this:GetText() == "Search mailbox..." then
this:SetText("")
this:SetTextColor(1, 1, 1, 1)
end
if Guda_MailboxClickCatcher then
Guda_MailboxClickCatcher:Show()
end
</OnEditFocusGained>
<OnEditFocusLost>
if this:GetText() == "" then
this:SetText("Search mailbox...")
this:SetTextColor(0.5, 0.5, 0.5, 1)
end
if Guda_MailboxClickCatcher then
Guda_MailboxClickCatcher:Hide()
end
</OnEditFocusLost>
</Scripts>
</EditBox>
</Frames>
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4)
this:SetBackdropColor(0.15, 0.15, 0.15, 0.5)
</OnLoad>
</Scripts>
</Frame>
<!-- Character Selection Button -->
<Button name="$parent_CharacterButton">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-20" y="-40"/>
</Offset>
</Anchor>
</Anchors>
<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>
<OnLoad>
local icon = getglobal(this:GetName().."_Icon")
if icon then
icon:SetTexture("Interface\\AddOns\\Guda\\Assets\\All_Characters")
end
</OnLoad>
<OnClick>
Guda_MailboxFrame_ShowCharacterMenu()
</OnClick>
<OnEnter>
GameTooltip:SetOwner(this, "ANCHOR_TOP")
GameTooltip:SetText("Switch Character")
GameTooltip:Show()
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
</Scripts>
</Button>
<!-- Scroll Frame for Items -->
<ScrollFrame name="$parent_ScrollFrame" inherits="UIPanelScrollFrameTemplate">
<Size>
<AbsDimension x="360" y="420"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-75"/>
</Offset>
</Anchor>
</Anchors>
<ScrollChild>
<Frame name="Guda_MailboxFrame_ItemContainer">
<Size>
<AbsDimension x="360" y="420"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Frame>
</ScrollChild>
</ScrollFrame>
<!-- Footer for stats/info -->
<Frame name="$parent_Footer">
<Size>
<AbsDimension x="380" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT">
<Offset>
<AbsDimension x="20" y="15"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parent_Text" inherits="GameFontHighlightSmall" justifyH="LEFT">
<Anchors>
<Anchor point="LEFT"/>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame name="$parent_MoneyFrame" inherits="SmallMoneyFrameTemplate">
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-15" y="10"/>
</Offset>
</Anchor>
</Anchors>
</Frame>
</Frames>
<Scripts>
<OnLoad>
Guda_MailboxFrame_OnLoad(this)
</OnLoad>
<OnShow>
Guda_MailboxFrame_OnShow(this)
</OnShow>
<OnMouseDown>
this:StartMoving()
</OnMouseDown>
<OnMouseUp>
this:StopMovingOrSizing()
</OnMouseUp>
</Scripts>
</Frame>
</Ui>