Skip to content

Commit

Permalink
Preliminary 11.0 update
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jul 30, 2024
1 parent 3808441 commit e269cfa
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 30 deletions.
3 changes: 1 addition & 2 deletions .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"BATTLEGROUND",
"BLUE_GEM",
"RED_GEM",
"EasyMenu",
"MenuUtil",
"MinimapCluster",
"CloseDropDownMenus",
"CreateFramePool",
Expand All @@ -30,7 +30,6 @@
"REPorterFrameCorePOI",
"REPorterFrameCorePOITimers",
"REPorterFrameEstimatorText",
"REPorterReportDropDown",
"REPorterFrameEstimator"
],
"diagnostics.disable": [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# REPorter

[Wago Addons](https://addons.wago.io/addons/reflex-arenabattleground-historian)
[Wago Addons](https://addons.wago.io/addons/reporter-battleground-map)

[WoWInterface](http://www.wowinterface.com/downloads/info21089-REPorter-BattlegroundMap.html)

Expand Down
45 changes: 22 additions & 23 deletions REPorter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ RE.BlinkPOIValue = 0.3
RE.BlinkPOIUp = true

RE.FoundNewVersion = false
RE.AddonVersionCheck = 21003
RE.AddonVersionCheck = 21004
RE.ScreenHeight, RE.ScreenWidth = UIParent:GetCenter()

RE.MapSettings = {
Expand Down Expand Up @@ -239,27 +239,6 @@ RE.BackdropC = {
insets = { left = 5, right = 5, top = 5, bottom = 5 },
}

RE.POIDropDown = {
{ text = L["Incoming"], hasArrow = true, notCheckable = true,
menuList = {
{ text = "1", notCheckable = true, minWidth = 15, func = function() RE:SmallButton(1, true); CloseDropDownMenus() end },
{ text = "2", notCheckable = true, minWidth = 15, func = function() RE:SmallButton(2, true); CloseDropDownMenus() end },
{ text = "3", notCheckable = true, minWidth = 15, func = function() RE:SmallButton(3, true); CloseDropDownMenus() end },
{ text = "4", notCheckable = true, minWidth = 15, func = function() RE:SmallButton(4, true); CloseDropDownMenus() end },
{ text = "5", notCheckable = true, minWidth = 15, func = function() RE:SmallButton(5, true); CloseDropDownMenus() end },
{ text = "5+", notCheckable = true, minWidth = 15, func = function() RE:SmallButton(6, true); CloseDropDownMenus() end }
} },
{ text = HELP_LABEL, notCheckable = true, func = function() RE:BigButton(true, true) end },
{ text = L["Clear"], notCheckable = true, func = function() RE:BigButton(false, true) end },
{ text = "", notCheckable = true, disabled = true },
{ text = ATTACK, notCheckable = true, func = function() RE:ReportDropDownClick("Attack") end },
{ text = L["Guard"], notCheckable = true, func = function() RE:ReportDropDownClick("Guard") end },
{ text = L["Heavily defended"], notCheckable = true, func = function() RE:ReportDropDownClick("Heavily defended") end },
{ text = L["Losing"], notCheckable = true, func = function() RE:ReportDropDownClick("Losing") end },
{ text = "", notCheckable = true, disabled = true },
{ text = L["On my way"], notCheckable = true, func = function() RE:ReportDropDownClick("On my way") end },
{ text = L["Report status"], notCheckable = true, func = function() RE:ReportDropDownClick("") end }
}
RE.DefaultConfig = {
profile = {
BarHandle = 11,
Expand Down Expand Up @@ -495,6 +474,26 @@ function RE:FramesOverlap(frameA, frameB)
and (frameB:GetBottom() * sB) < (frameA:GetTop() * sA)
end

function RE:POIDropDown(root)
local submenu = root:CreateButton(L["Incoming"])
submenu:CreateButton("1", function() RE:SmallButton(1, true) end)
submenu:CreateButton("2", function() RE:SmallButton(2, true) end)
submenu:CreateButton("3", function() RE:SmallButton(3, true) end)
submenu:CreateButton("4", function() RE:SmallButton(4, true) end)
submenu:CreateButton("5", function() RE:SmallButton(5, true) end)
submenu:CreateButton("5+", function() RE:SmallButton(6, true) end)
root:CreateButton(HELP_LABEL, function() RE:BigButton(true, true) end)
root:CreateButton(L["Clear"], function() RE:BigButton(false, true) end)
root:CreateDivider()
root:CreateButton(ATTACK, function() RE:ReportDropDownClick("Attack") end)
root:CreateButton(L["Guard"], function() RE:ReportDropDownClick("Guard") end)
root:CreateButton(L["Heavily defended"], function() RE:ReportDropDownClick("Heavily defended") end)
root:CreateButton(L["Losing"], function() RE:ReportDropDownClick("Losing") end)
root:CreateDivider()
root:CreateButton(L["On my way"], function() RE:ReportDropDownClick("On my way") end)
root:CreateButton(L["Report status"], function() RE:ReportDropDownClick("") end)
end

function RE:CreatePOI(index)
local frameMain = CreateFrame("Frame", "REPorterFrameCorePOI"..index, REPorterFrameCorePOI)
frameMain:SetFrameLevel(10)
Expand Down Expand Up @@ -1254,7 +1253,7 @@ function RE:OnClickPOI(self)

CloseDropDownMenus()
RE.ClickedPOI = RE.POINodes[self.name].name
EasyMenu(RE.POIDropDown, REPorterReportDropDown, self, 0 , 0, "MENU")
MenuUtil.CreateContextMenu(UIParent, RE.POIDropDown)
end
---

Expand Down
4 changes: 2 additions & 2 deletions REPorter.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 100207
## Interface: 110000
## Title: |cFF74D06CRE|rPorter
## Notes: Provide battleground map.
## Version: 2.10.3
## Version: 2.10.4
## Author: AcidWeb
## SavedVariables: REPorterSettings
## IconTexture: Interface\AddOns\REPorter\RELogo
Expand Down
2 changes: 0 additions & 2 deletions REPorter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
</Layers>
</Frame>

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

<Frame name="REPorterFrame" hidden="true" resizable="true" movable="true" clampedToScreen="true" parent="UIParent">
<Size>
<AbsDimension x="783" y="522"/>
Expand Down

0 comments on commit e269cfa

Please sign in to comment.