Skip to content

Conversation

@1broccoli
Copy link

added background textures

1broccoli added 7 commits May 1, 2025 16:42
 SafeQueue frame has the following additional attributes
movable="true" enableMouse="true"

additional BACKGROUND layer for the SafeQueuePopupTemplate frame:

<Layer level="BACKGROUND">
    <Texture name="$parentBattlegroundTexture" parentKey="BattlegroundTexture">
        <Size>
            <AbsDimension x="320" y="124"/>
        </Size>
        <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="0"/>
        </Anchors>
        <Scripts>
            <OnLoad>
                self:Hide() -- Ensure the texture starts hidden
            </OnLoad>
        </Scripts>
    </Texture>
</Layer>
Battleground Texture Handling:

Added battlegroundTextures table to define custom textures for battlegrounds.
Added SafeQueue:SetBackground(battleground) function to set the background texture for the popup.
Set Background on Popup Show:

Added a call to self:SetBackground(battleground) in the SafeQueue:SetScript("OnShow") function to ensure the background is set when the popup is shown.
Movable Frame:

Added functionality to make the SafeQueue frame movable:
SafeQueue:SetMovable(true)
SafeQueue:EnableMouse(true)
Added drag-and-drop support with OnDragStart and OnDragStop scripts.
Added SafeQueue:SavePosition() function to save the frame's position.
Added SafeQueue:RestorePosition() function to restore the frame's position on load.
Minimize Button:

Added a minimize button to the SafeQueue frame:
Created a hideButton using UIPanelCloseButton.
Added a script to hide the popup and set a minimized state (SafeQueue.isMinimized = true) when the button is clicked.
LibDataBroker Integration:

Added LibDataBroker-1.1 and LibDBIcon-1.0 integration for additional functionality (e.g., minimap icon).
Text Formatting in SetExpiresText: local text = ("Expires in |cff%s%s|r"):format(color, SecondsToTime(secs))

Changed to:
local text = L["SafeQueue expires in |cff%s%s|r"]:format(color, SecondsToTime(secs))
Ace Libraries
background textures, test.png is a fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant