Skip to content

Commit

Permalink
Initial 11.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jul 30, 2024
1 parent dbe83b8 commit 1773e95
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
"REFlexFrameTab5",
"REFlexFrameTab6",
"CalendarFrame",
"EasyMenu",
"MenuUtil",
"PVPMatchResults",
"StaticPopupDialogs",
"ReloadUI",
"GetMouseFoci",
"REFlexFrame_StatsButton",
"REFlexFrame_ScoreHolder_RBG",
"REFlexFrame_ScoreHolder_HK1",
Expand Down
23 changes: 19 additions & 4 deletions REFlex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ local GetMatchPVPStatColumns = C_PvP.GetMatchPVPStatColumns
local GetActiveMatchDuration = C_PvP.GetActiveMatchDuration
local GetCurrentArenaSeason = GetCurrentArenaSeason
local GetCVar = GetCVar
local GetMouseFocus = GetMouseFocus
local GetMouseFoci = GetMouseFoci
local GetAddOnMetadata = C_AddOns.GetAddOnMetadata
local UnitName = UnitName
local UnitFactionGroup = UnitFactionGroup
Expand All @@ -61,7 +61,7 @@ local SendAddonMessage = C_ChatInfo.SendAddonMessage
local PlaySound = PlaySound
local ElvUI = ElvUI

RE.Version = 3314
RE.Version = 3315
RE.LastSquash = 1602662400
RE.FoundNewVersion = false

Expand Down Expand Up @@ -299,7 +299,17 @@ function RE:OnEvent(_, event, ...)
QTIP:Release(RE.Tooltip)
end
function RE.LDB:OnClick(button)
if REFlex_CompartmentClick or LDBI:GetMinimapButton("REFlex") == GetMouseFocus() then
local isMouseOverMinimapButton = false
local mouseFoci = GetMouseFoci()

for _, region in ipairs(mouseFoci) do
if region:IsMouseMotionFocus() and region == LDBI:GetMinimapButton("REFlex") then
isMouseOverMinimapButton = true
break
end
end

if REFlex_CompartmentClick or isMouseOverMinimapButton then
if button == "LeftButton" then
if not REFlexFrame:IsVisible() then
REFlexFrame:Show()
Expand Down Expand Up @@ -624,7 +634,6 @@ function RE:OnArenaStatsClick(self)
QTIP:Release(RE.Tooltip)
else
CloseDropDownMenus()
EasyMenu(RE.StatsDropDown, REFlexStatsDropDown, self, 0 , 0, "MENU")
end
end

Expand Down Expand Up @@ -687,6 +696,12 @@ function RE:UpdateGUI()
REFlexFrameTab6:SetPoint("CENTER", REFlexFrame, "BOTTOMRIGHT", -40, -10)
REFlexFrameTab5:SetPoint("RIGHT", REFlexFrameTab6, "LEFT", -3, 0)
REFlexFrameTab4:SetPoint("RIGHT", REFlexFrameTab5, "LEFT", -3, 0)

MenuUtil.CreateButtonMenu(REFlexFrame_StatsButton,
{L["Most common teams"], function() RE:GetArenaStatsTooltip(1) end, 1},
{L["Easiest teams"], function() RE:GetArenaStatsTooltip(2) end, 2},
{L["Hardest teams"], function() RE:GetArenaStatsTooltip(3) end, 3}
)
end
if PanelTemplates_GetSelectedTab(REFlexFrame) < 4 then
RE.TableBG:Show()
Expand Down
4 changes: 2 additions & 2 deletions REFlex.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100207
## Interface: 110000
## Title: |cFF74D06CRE|rFlex
## Notes: Collect statistics of played arena matches and battlegrounds.
## Version: 3.3.14
## Version: 3.3.15
## Author: AcidWeb
## SavedVariablesPerCharacter: REFlexSettings, REFlexDatabase, REFlexHonorDatabase
## AddonCompartmentFunc: REFlex_CompartmentOnClick
Expand Down
6 changes: 2 additions & 4 deletions REFlex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
<Script file="REFlexStructures.lua"/>
<Script file="REFlexUpdater.lua"/>

<Frame name="REFlexStatsDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true"/>

<Frame name="REFlexFrame" inherits="BackdropTemplate" resizable="false" movable="true" hidden="true" parent="UIParent">
<Size>
<AbsDimension x="790" y="625"/>
Expand Down Expand Up @@ -71,7 +69,7 @@
<OnClick>REFlex:DumpCSV()</OnClick>
</Scripts>
</Button>
<Button name="$parent_StatsButton" text="S" inherits="UIPanelButtonTemplate">
<DropdownButton name="$parent_StatsButton" text="S" inherits="UIPanelButtonTemplate">
<Size>
<AbsDimension x="20" y="20"/>
</Size>
Expand All @@ -85,7 +83,7 @@
<Scripts>
<OnClick>REFlex:OnArenaStatsClick(self)</OnClick>
</Scripts>
</Button>
</DropdownButton>
<Button name="$parentTab1" inherits="CharacterFrameTabTemplate" id="1">
<Anchors>
<Anchor point="CENTER" relativePoint="BOTTOMLEFT">
Expand Down
6 changes: 0 additions & 6 deletions REFlexStructures.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,6 @@ for classID=1, MAX_CLASSES do
end
end

RE.StatsDropDown = {
{ text = L["Most common teams"], notCheckable = true, func = function() RE:GetArenaStatsTooltip(1) end },
{ text = L["Easiest teams"], notCheckable = true, func = function() RE:GetArenaStatsTooltip(2) end },
{ text = L["Hardest teams"], notCheckable = true, func = function() RE:GetArenaStatsTooltip(3) end }
}

RE.AceConfig = {
type = "group",
args = {
Expand Down

0 comments on commit 1773e95

Please sign in to comment.