Skip to content

Commit

Permalink
10.1 update
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed May 3, 2023
1 parent a086817 commit 6db52a4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
9 changes: 5 additions & 4 deletions REFlex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ local SendAddonMessage = _G.C_ChatInfo.SendAddonMessage
local PlaySound = _G.PlaySound
local ElvUI = _G.ElvUI

RE.Version = 3307
RE.Version = 3308
RE.LastSquash = 1602662400
RE.FoundNewVersion = false

Expand Down Expand Up @@ -252,11 +252,11 @@ function RE:OnEvent(_, event, ...)
text = "|cFF74D06CRE|rFlex",
icon = "Interface\\PvPRankBadges\\PvPRank09"
})
function RE.LDB:OnEnter()
function RE.LDB:OnEnter(frame)
local brawlInfo = GetAvailableBrawlInfo()
local mod = 0
RE.Tooltip = QTIP:Acquire("REFlexTooltipLDB", 2, "LEFT", "LEFT")
RE.Tooltip:SmartAnchorTo(self)
RE.Tooltip:SmartAnchorTo(frame or self)
if ElvUI then
local red, green, blue = unpack(ElvUI[1].media.backdropfadecolor)
RE.Tooltip:SetBackdropColor(red, green, blue, ElvUI[1].Tooltip and ElvUI[1].Tooltip.db.colorAlpha or 1)
Expand Down Expand Up @@ -301,7 +301,7 @@ function RE:OnEvent(_, event, ...)
QTIP:Release(RE.Tooltip)
end
function RE.LDB:OnClick(button)
if LDBI:GetMinimapButton("REFlex") == GetMouseFocus() then
if REFlex_CompartmentClick or LDBI:GetMinimapButton("REFlex") == GetMouseFocus() then
if button == "LeftButton" then
if not _G.REFlexFrame:IsVisible() then
_G.REFlexFrame:Show()
Expand Down Expand Up @@ -331,6 +331,7 @@ function RE:OnEvent(_, event, ...)
end
end
end
REFlex_CompartmentClick = false
end
LDBI:Register("REFlex", RE.LDB, RE.Settings.MiniMapButtonSettings)

Expand Down
8 changes: 6 additions & 2 deletions REFlex.toc
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
## Interface: 100007
## Interface: 100100
## Title: |cFF74D06CRE|rFlex
## Notes: Collect statistics of played arena matches and battlegrounds.
## Version: 3.3.7
## Version: 3.3.8
## Author: AcidWeb
## SavedVariablesPerCharacter: REFlexSettings, REFlexDatabase, REFlexHonorDatabase
## AddonCompartmentFunc: REFlex_CompartmentOnClick
## AddonCompartmentFuncOnEnter: REFlex_CompartmentOnEnter
## AddonCompartmentFuncOnLeave: REFlex_CompartmentOnLeave
## IconTexture: Interface\AddOns\REFlex\RELogo
## X-WoWI-ID: 19190
## X-Wago-ID: vEGPQRN1

Expand Down
13 changes: 13 additions & 0 deletions REFlexFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -906,3 +906,16 @@ function RE:ForeachInOrder(t, f, cmp)
f(k, t[k])
end
end

function REFlex_CompartmentOnClick(_, button)
REFlex_CompartmentClick = true
RE.LDB:OnClick(button)
end

function REFlex_CompartmentOnEnter(_, frame)
RE.LDB:OnEnter(frame)
end

function REFlex_CompartmentOnLeave()
RE.LDB:OnLeave()
end
Binary file added RELogo.tga
Binary file not shown.

0 comments on commit 6db52a4

Please sign in to comment.