|
| 1 | +-------------------------------- |
| 2 | +-- PartyFrame.lua |
| 3 | +-- Handles Party tab interface |
| 4 | +-- and interactions. |
| 5 | +-------------------------------- |
| 6 | + |
1 | 7 | local _, KeyMaster = ...
|
2 | 8 | local MainInterface = KeyMaster.MainInterface
|
3 | 9 | local DungeonTools = KeyMaster.DungeonTools
|
@@ -44,6 +50,32 @@ local function portalButton_mouseoout(self, event, ...)
|
44 | 50 | cdFrame:SetCooldown(0 ,0)
|
45 | 51 | end
|
46 | 52 |
|
| 53 | +-- Party frame notification when party info isn't displayed |
| 54 | +function PartyFrame:noPartyInfoNotification(parent) |
| 55 | + local noPartyInfo = CreateFrame("Frame", "KM_NoPartyInfo", parent) |
| 56 | + noPartyInfo:SetSize(parent:GetWidth()-4, parent:GetHeight()-4) |
| 57 | + noPartyInfo:SetPoint("CENTER", parent, "CENTER") |
| 58 | + noPartyInfo:SetFrameLevel(parent:GetFrameLevel()+1) |
| 59 | + noPartyInfo.text = noPartyInfo:CreateFontString(nil, "OVERLAY", "KeyMasterFontBig") |
| 60 | + noPartyInfo.text:SetText(KeyMasterLocals.PARTYFRAME["NoPartyInfo"].text) |
| 61 | + noPartyInfo.text:SetPoint("CENTER", noPartyInfo, "CENTER", 60, -90) |
| 62 | + noPartyInfo.text:SetWidth(parent:GetWidth()*0.55) |
| 63 | + noPartyInfo.text:SetJustifyV("CENTER") |
| 64 | + noPartyInfo.text:SetJustifyH("LEFT") |
| 65 | + local msgColor = {} |
| 66 | + msgColor.r, msgColor.g, msgColor.b, _ = Theme:GetThemeColor("color_POOR") |
| 67 | + noPartyInfo.text:SetTextColor(msgColor.r, msgColor.g, msgColor.b, 1) |
| 68 | + noPartyInfo.icon = noPartyInfo:CreateTexture() |
| 69 | + noPartyInfo.icon:SetTexture("Interface\\Addons\\KeyMaster\\Assets\\Images\\KeyMaster-Interface-Clean") |
| 70 | + noPartyInfo.icon:SetTexCoord(916/1024, 1, 216/1024, 322/1024) |
| 71 | + noPartyInfo.icon:SetPoint("RIGHT", noPartyInfo.text, "LEFT", -8, 0) |
| 72 | + noPartyInfo.icon:SetSize(80, 80) |
| 73 | + noPartyInfo.icon:SetAlpha(0.1) |
| 74 | + noPartyInfo:Hide() |
| 75 | + |
| 76 | + return noPartyInfo |
| 77 | +end |
| 78 | + |
47 | 79 | local function createPartyDungeonHeader(anchorFrame, mapId)
|
48 | 80 | if not anchorFrame and mapId then
|
49 | 81 | KeyMaster:_ErrorMsg("createPartyDungeonHeader", "PartyFrame", "No valid parameters passed.")
|
@@ -138,11 +170,11 @@ local function createPartyDungeonHeader(anchorFrame, mapId)
|
138 | 170 | local pButton = CreateFrame("Button","portal_button"..mapId,temp_frame,"SecureActionButtonTemplate")
|
139 | 171 | pButton:SetAttribute("type", "spell")
|
140 | 172 | pButton:SetAttribute("spell", portalSpellName)
|
141 |
| - pButton:RegisterForClicks("LeftButtonDown") |
| 173 | + pButton:RegisterForClicks("AnyDown") |
142 | 174 | pButton:SetWidth(pButton:GetParent():GetWidth())
|
143 | 175 | pButton:SetHeight(pButton:GetParent():GetWidth())
|
144 | 176 | pButton:SetPoint("TOPLEFT", temp_frame, "TOPLEFT", 0, 0)
|
145 |
| - pButton:SetScript("OnMouseUp", portalButton_buttonevent) |
| 177 | + pButton:SetScript("OnMouseDown", portalButton_buttonevent) |
146 | 178 | pButton:SetScript("OnEnter", portalButton_mouseover)
|
147 | 179 | pButton:SetScript("OnLeave", portalButton_mouseoout)
|
148 | 180 |
|
|
0 commit comments