Skip to content

Commit

Permalink
Preliminary 10.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Oct 26, 2022
1 parent 168e31c commit 5b66967
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 78 deletions.
17 changes: 12 additions & 5 deletions REFlex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ local GetActiveMatchDuration = _G.C_PvP.GetActiveMatchDuration
local GetCurrentArenaSeason = _G.GetCurrentArenaSeason
local GetCVar = _G.GetCVar
local GetMouseFocus = _G.GetMouseFocus
local GetAddOnMetadata = _G.GetAddOnMetadata
local UnitName = _G.UnitName
local UnitFactionGroup = _G.UnitFactionGroup
local UnitHonor = _G.UnitHonor
Expand All @@ -52,7 +53,6 @@ local RequestRatedInfo = _G.RequestRatedInfo
local RequestPVPRewards = _G.RequestPVPRewards
local RequestRandomBattlegroundInstanceInfo = _G.RequestRandomBattlegroundInstanceInfo
local HasArenaSkirmishWinToday = _G.C_PvP.HasArenaSkirmishWinToday
local InterfaceOptionsFrame_OpenToCategory = _G.InterfaceOptionsFrame_OpenToCategory
local TimerAfter = _G.C_Timer.After
local AbbreviateNumbers = _G.AbbreviateNumbers
local UIParentLoadAddOn = _G.UIParentLoadAddOn
Expand All @@ -61,7 +61,7 @@ local SendAddonMessage = _G.C_ChatInfo.SendAddonMessage
local PlaySound = _G.PlaySound
local ElvUI = _G.ElvUI

RE.Version = 3110
RE.Version = 3200
RE.LastSquash = 1602662400
RE.FoundNewVersion = false

Expand Down Expand Up @@ -121,7 +121,7 @@ function RE:OnLoad(self)
_G.REFlexFrameTab5:SetText(_G.GUILD_PLAYSTYLE_CASUAL)
_G.REFlexFrameTab6:SetText(_G.PVP_TAB_CONQUEST)

_G.REFlexFrame_Title:SetText("REFlex "..tostring(RE.Version):gsub(".", "%1."):sub(1,-2))
_G.REFlexFrame_Title:SetText("REFlex "..GetAddOnMetadata("REFlex", "version"))
_G.REFlexFrame_HKBar_I:SetStatusBarTexture("Interface\\TargetingFrame\\UI-StatusBar")
_G.REFlexFrame_HKBar_I:SetStatusBarColor(0, 0.9, 0)

Expand Down Expand Up @@ -310,8 +310,8 @@ function RE:OnEvent(_, event, ...)
elseif button == "MiddleButton" then
RE:SurrenderMatch()
elseif button == "RightButton" then
_G.InterfaceOptionsFrame:Show()
InterfaceOptionsFrame_OpenToCategory(RE.OptionsMenu)
_G.SettingsPanel:Show()
_G.SettingsPanel:OpenToCategory("REFlex")
end
else
if button == "LeftButton" then
Expand Down Expand Up @@ -656,6 +656,13 @@ function RE:UpdateGUI()
RE.SpecDropDown:SetValue(RE.Settings.Filters.Spec)
RE.BracketDropDown:SetValue(RE.Settings.Filters.Bracket)
RE.DateDropDown:SetValue(RE.Settings.Filters.DateMode)

_G.REFlexFrameTab6:ClearAllPoints()
_G.REFlexFrameTab5:ClearAllPoints()
_G.REFlexFrameTab4:ClearAllPoints()
_G.REFlexFrameTab6:SetPoint("CENTER", _G.REFlexFrame, "BOTTOMRIGHT", -40, -10)
_G.REFlexFrameTab5:SetPoint("RIGHT", _G.REFlexFrameTab6, "LEFT", -3, 0)
_G.REFlexFrameTab4:SetPoint("RIGHT", _G.REFlexFrameTab5, "LEFT", -3, 0)
end
if PanelTemplates_GetSelectedTab(_G.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: 90207
## Interface: 100000
## Title: |cFF74D06CRE|rFlex
## Notes: Collect statistics of played arena matches and battlegrounds.
## Version: 3.1.10
## Version: 3.2.0
## Author: AcidWeb
## SavedVariablesPerCharacter: REFlexSettings, REFlexDatabase, REFlexHonorDatabase
## X-WoWI-ID: 19190
Expand Down
39 changes: 9 additions & 30 deletions REFlex.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<Anchors>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-5" y="-5"/>
<AbsDimension x="-10" y="-10"/>
</Offset>
</Anchor>
</Anchors>
Expand Down Expand Up @@ -86,7 +86,7 @@
<OnClick>REFlex:OnArenaStatsClick(self)</OnClick>
</Scripts>
</Button>
<Button name="$parentTab1" inherits="CharacterFrameTabButtonTemplate" id="1">
<Button name="$parentTab1" inherits="CharacterFrameTabTemplate" id="1">
<Anchors>
<Anchor point="CENTER" relativePoint="BOTTOMLEFT">
<Offset>
Expand All @@ -98,7 +98,7 @@
<OnClick>PanelTemplates_SetTab(REFlexFrame, 1); REFlex:UpdateGUI()</OnClick>
</Scripts>
</Button>
<Button name="$parentTab2" inherits="CharacterFrameTabButtonTemplate" id="2">
<Button name="$parentTab2" inherits="CharacterFrameTabTemplate" id="2">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTab1" relativePoint="RIGHT">
<Offset>
Expand All @@ -110,7 +110,7 @@
<OnClick>PanelTemplates_SetTab(REFlexFrame, 2); REFlex:UpdateGUI()</OnClick>
</Scripts>
</Button>
<Button name="$parentTab3" inherits="CharacterFrameTabButtonTemplate" id="3">
<Button name="$parentTab3" inherits="CharacterFrameTabTemplate" id="3">
<Anchors>
<Anchor point="LEFT" relativeTo="$parentTab2" relativePoint="RIGHT">
<Offset>
Expand All @@ -122,40 +122,19 @@
<OnClick>PanelTemplates_SetTab(REFlexFrame, 3); REFlex:UpdateGUI()</OnClick>
</Scripts>
</Button>
<Button name="$parentTab6" inherits="CharacterFrameTabButtonTemplate" id="6">
<Anchors>
<Anchor point="CENTER" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-40" y="-10"/>
</Offset>
</Anchor>
</Anchors>
<Button name="$parentTab4" inherits="CharacterFrameTabTemplate" id="4">
<Scripts>
<OnClick>PanelTemplates_SetTab(REFlexFrame, 6); REFlex:UpdateGUI()</OnClick>
<OnClick>PanelTemplates_SetTab(REFlexFrame, 4); REFlex:UpdateGUI()</OnClick>
</Scripts>
</Button>
<Button name="$parentTab5" inherits="CharacterFrameTabButtonTemplate" id="5">
<Anchors>
<Anchor point="RIGHT" relativeTo="$parentTab6" relativePoint="LEFT">
<Offset>
<AbsDimension x="15" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Button name="$parentTab5" inherits="CharacterFrameTabTemplate" id="5">
<Scripts>
<OnClick>PanelTemplates_SetTab(REFlexFrame, 5); REFlex:UpdateGUI()</OnClick>
</Scripts>
</Button>
<Button name="$parentTab4" inherits="CharacterFrameTabButtonTemplate" id="4">
<Anchors>
<Anchor point="RIGHT" relativeTo="$parentTab5" relativePoint="LEFT">
<Offset>
<AbsDimension x="15" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Button name="$parentTab6" inherits="CharacterFrameTabTemplate" id="6">
<Scripts>
<OnClick>PanelTemplates_SetTab(REFlexFrame, 4); REFlex:UpdateGUI()</OnClick>
<OnClick>PanelTemplates_SetTab(REFlexFrame, 6); REFlex:UpdateGUI()</OnClick>
</Scripts>
</Button>
<Frame name="$Parent_HKBar" inherits="BackdropTemplate">
Expand Down
6 changes: 1 addition & 5 deletions REFlexFunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -461,11 +461,7 @@ function RE:GetRaceIcon(token, size)
return "|TInterface\\Icons\\INV_Misc_QuestionMark:"..size..":"..size.."|t"
else
token = sgsub(BR[token], "_PL", "")
return "|TInterface\\Glues\\CharacterCreate\\CharacterCreateIcons:"..size..":"..size..":0:0:2048:1024:" ..
RE.RaceIcons[token][1]*2048+5 ..
":" .. RE.RaceIcons[token][2]*2048-5 ..
":" .. RE.RaceIcons[token][3]*1024+5 ..
":" .. RE.RaceIcons[token][4]*1024-5 .. "|t"
return "|A:"..RE.RaceIcons[token]..":"..size..":"..size.."|a"
end
end

Expand Down
74 changes: 38 additions & 36 deletions REFlexStructures.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,42 +123,44 @@ RE.MapListStat = {
}

RE.RaceIcons = {
["Human"] = {0.86084, 0.89209, 0.000976562, 0.0634766},
["Humans"] = {0.86084, 0.89209, 0.000976562, 0.0634766},
["Dwarf"] = {0.444824, 0.476074, 0.889648, 0.952148},
["Dwarves"] = {0.444824, 0.476074, 0.889648, 0.952148},
["Gnome"] = {0.66748, 0.69873, 0.000976562, 0.0634766},
["Gnomes"] = {0.66748, 0.69873, 0.000976562, 0.0634766},
["Night Elf"] = {0.508301, 0.539551, 0.643555, 0.706055},
["Night elves"] = {0.508301, 0.539551, 0.643555, 0.706055},
["Tauren"] = {0.540527, 0.571777, 0.192383, 0.254883},
["Undead"] = {0.540527, 0.571777, 0.450195, 0.512695},
["Troll"] = {0.540527, 0.571777, 0.321289, 0.383789},
["Trolls"] = {0.540527, 0.571777, 0.321289, 0.383789},
["Orc"] = {0.508301, 0.539551, 0.772461, 0.834961},
["Orcs"] = {0.508301, 0.539551, 0.772461, 0.834961},
["Blood Elf"] = {0.0639648, 0.0952148, 0.889648, 0.952148},
["Blood elves"] = {0.0639648, 0.0952148, 0.889648, 0.952148},
["Draenei"] = {0.317871, 0.349121, 0.889648, 0.952148},
["Goblin"] = {0.731934, 0.763184, 0.000976562, 0.0634766},
["Goblins"] = {0.731934, 0.763184, 0.000976562, 0.0634766},
["Worgen"] = {0.540527, 0.571777, 0.836914, 0.899414},
["Pandaren"] = {0.508301, 0.539551, 0.901367, 0.963867},
["Nightborne"] = {0.508301, 0.539551, 0.514648, 0.577148},
["Highmountain Tauren"] = {0.796387, 0.827637, 0.000976562, 0.0634766},
["Void Elf"] = {0.540527, 0.571777, 0.579102, 0.641602},
["Void elves"] = {0.540527, 0.571777, 0.579102, 0.641602},
["Lightforged Draenei"] = {0.508301, 0.539551, 0.12793, 0.19043},
["Dark Iron Dwarf"] = {0.190918, 0.222168, 0.889648, 0.952148},
["Dark Iron Dwarves"] = {0.190918, 0.222168, 0.889648, 0.952148},
["Mag'har Orc"] = {0.508301, 0.539551, 0.256836, 0.319336},
["Zandalari Troll"] = {0.572754, 0.604004, 0.12793, 0.19043},
["Zandalari Trolls"] = {0.572754, 0.604004, 0.12793, 0.19043},
["Kul Tiran"] = {0.925293, 0.956543, 0.000976562, 0.0634766},
["Vulpera"] = {0.540527, 0.571777, 0.708008, 0.770508},
["Vulperas"] = {0.540527, 0.571777, 0.708008, 0.770508},
["Mechagnome"] = {0.508301, 0.539551, 0.385742, 0.448242},
["Mechagnomes"] = {0.508301, 0.539551, 0.385742, 0.448242}
["Human"] = "raceicon-human-male",
["Humans"] = "raceicon-human-male",
["Dwarf"] = "raceicon-dwarf-male",
["Dwarves"] = "raceicon-dwarf-male",
["Gnome"] = "raceicon-gnome-male",
["Gnomes"] = "raceicon-gnome-male",
["Night Elf"] = "raceicon-nightelf-male",
["Night elves"] = "raceicon-nightelf-male",
["Tauren"] = "raceicon-tauren-male",
["Undead"] = "raceicon-undead-male",
["Troll"] = "raceicon-troll-male",
["Trolls"] = "raceicon-troll-male",
["Orc"] = "raceicon-orc-male",
["Orcs"] = "raceicon-orc-male",
["Blood Elf"] = "raceicon-bloodelf-male",
["Blood elves"] = "raceicon-bloodelf-male",
["Draenei"] = "raceicon-draenei-male",
["Goblin"] = "raceicon-goblin-male",
["Goblins"] = "raceicon-goblin-male",
["Worgen"] = "raceicon-worgen-male",
["Pandaren"] = "raceicon-pandaren-male",
["Nightborne"] = "raceicon-nightborne-male",
["Highmountain Tauren"] = "",
["Void Elf"] = "raceicon-voidelf-male",
["Void elves"] = "raceicon-voidelf-male",
["Lightforged Draenei"] = "raceicon-lightforged-male",
["Dark Iron Dwarf"] = "raceicon-darkirondwarf-male",
["Dark Iron Dwarves"] = "raceicon-darkirondwarf-male",
["Mag'har Orc"] = "raceicon-magharorc-male",
["Zandalari Troll"] = "raceicon-zandalari-male",
["Zandalari Trolls"] = "raceicon-zandalari-male",
["Kul Tiran"] = "raceicon-kultiran-male",
["Vulpera"] = "raceicon-vulpera-male",
["Vulperas"] = "raceicon-vulpera-male",
["Mechagnome"] = "raceicon-mechagnome-male",
["Mechagnomes"] = "raceicon-mechagnome-male",
["Dracthyr"] = "raceicon-dracthyr-male",
["Dracthyrs"] = "raceicon-dracthyr-male",
}

RE.BracketNames = {
Expand Down

0 comments on commit 5b66967

Please sign in to comment.