Skip to content

Commit a044822

Browse files
committed
Merge branch 'development'
2 parents 4f00326 + 299e345 commit a044822

8 files changed

Lines changed: 141 additions & 69 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
* [Armory]: More settings and visual improvements
44
* [GameMenu]: Some more infos on the GameMenu
5+
* [GameMenu]: Fix Option -fix1
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
local MER = unpack(ElvUI_MerathilisUI)
2+
3+
MER.Changelog[661] = {
4+
RELEASE_DATE = "TBD",
5+
FIXES = {},
6+
NEW = {},
7+
IMPROVEMENTS = {},
8+
}

ElvUI_MerathilisUI/Core/Changelog/Load_Changelog.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@
4949
<Script file="Previous\6.57.lua"/>
5050
<Script file="Previous\6.58.lua"/>
5151
<Script file="Previous\6.59.lua"/>
52-
<Script file="6.60.lua"/>
52+
<Script file="Previous\6.60.lua"/>
53+
<Script file="6.61.lua"/>
5354
</Ui>
File renamed without changes.

ElvUI_MerathilisUI/Core/Profile/Profile.lua

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@ local norm = format("|cff1eff00%s|r", L["[ABBR] Normal"])
66
local hero = format("|cff0070dd%s|r", L["[ABBR] Heroic"])
77
local myth = format("|cffa335ee%s|r", L["[ABBR] Mythic"])
88
local lfr = format("|cffff8000%s|r", L["[ABBR] Looking for Raid"])
9-
local delv = format("|cff0020C2%s|r", L["[ABBR] Delves"])
109

1110
P.core = {
1211
installed = nil,
1312
lastLayoutVersion = nil,
1413
}
1514

1615
P.general = {
17-
GameMenu = {
18-
enable = true,
19-
bgColor = F.Table.HexToRGB("#00000080"),
20-
},
2116
splashScreen = true,
2217
AFK = true,
2318
fontScale = 0,
@@ -41,6 +36,12 @@ P.general = {
4136
},
4237
}
4338

39+
P.gameMenu = {
40+
enable = true,
41+
bgColor = F.Table.HexToRGB("#00000080"),
42+
showCollections = true,
43+
}
44+
4445
P.themes = {
4546
classColorMap = {
4647
[I.Enum.GradientMode.Color.NORMAL] = { -- RIGHT

ElvUI_MerathilisUI/ElvUI_MerathilisUI.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Interface: 110100
22
## Author: Merathilis
33
## Version: @project-version@
4-
## X-Version: 6.60
4+
## X-Version: 6.60-fix1
55
## Title: |cFF1784d1ElvUI|r |cffffffffMerathilis|r|cffff7d0aUI|r
66
## AddonCompartmentFunc: MerathilisUI_OnAddonCompartmentClick
77
## IconTexture: Interface\AddOns\ElvUI_MerathilisUI\Media\Textures\m2

ElvUI_MerathilisUI/Modules/Misc/GameMenu.lua

Lines changed: 72 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ local CreateFrame = CreateFrame
99
local UIFrameFadeIn = UIFrameFadeIn
1010
local GetTotalAchievementPoints = GetTotalAchievementPoints
1111

12+
local C_CurrencyInfo_GetCurrencyInfo = C_CurrencyInfo.GetCurrencyInfo
1213
local C_MountJournal_GetMountInfoByID = C_MountJournal.GetMountInfoByID
1314
local C_ToyBox_GetNumLearnedDisplayedToys = C_ToyBox.GetNumLearnedDisplayedToys
1415
local C_PetJournal_GetNumPets = C_PetJournal.GetNumPets
1516

1617
local GameMenuFrame = _G.GameMenuFrame
1718

19+
local delvesKeys = { 84736, 84737, 84738, 84739 }
20+
local keyName = C_CurrencyInfo_GetCurrencyInfo(3028).name
21+
1822
-- Credit for the Class logos: ADDOriN @DevianArt
1923
-- http://addorin.deviantart.com/gallery/43689290/World-of-Warcraft-Class-Logos
2024

@@ -68,8 +72,8 @@ function module:GameMenu_OnShow()
6872
mainFrame.bg:SetAllPoints(mainFrame)
6973
mainFrame.bg:SetTexture(I.Media.Textures.Clean)
7074

71-
local bgColor = E.db.mui.general.GameMenu.bgColor
72-
local alpha = E.db.mui.general.GameMenu.bgColor.a
75+
local bgColor = module.db.bgColor
76+
local alpha = module.db.bgColor.a
7377
mainFrame.bg:SetVertexColor(bgColor.r, bgColor.g, bgColor.b, alpha)
7478

7579
local bottomPanel = CreateFrame("Frame", nil, mainFrame, "BackdropTemplate")
@@ -143,68 +147,77 @@ function module:GameMenu_OnShow()
143147
topPanel:Height(0)
144148
topPanel.anim.height:Play()
145149

146-
local textHolder = CreateFrame("Frame", nil, topPanel)
147-
textHolder:Point("LEFT", topPanel, "BOTTOMLEFT", 5, 0)
148-
textHolder:Width(E.screenWidth * 0.5)
149-
textHolder:Height(E.screenHeight * (1 / 4) - 20)
150-
151150
topPanel.factionLogo = topPanel:CreateTexture(nil, "ARTWORK")
152151
topPanel.factionLogo:Point("CENTER", topPanel, "CENTER", 0, 0)
153152
topPanel.factionLogo:Size(186, 186)
154153
topPanel.factionLogo:SetTexture(I.General.MediaPath .. "Textures\\ClassBanner\\CLASS-" .. E.myclass)
155154

156-
textHolder.collections = textHolder:CreateFontString(nil, "ARTWORK")
157-
textHolder.collections:Point("TOPLEFT", textHolder)
158-
textHolder.collections:FontTemplate(nil, 24, "SHADOWOUTLINE")
159-
textHolder.collections:SetTextColor(1, 1, 1, 1)
160-
textHolder.collections:SetText(F.String.GradientClass(L["Collections"]))
161-
textHolder.collections:SetJustifyH("LEFT")
162-
textHolder.collections:SetJustifyV("TOP")
163-
164-
local collectedMounts = 0
165-
if E.MountIDs then
166-
for _, value in pairs(E.MountIDs) do
167-
local _, _, _, _, _, _, _, _, _, _, isCollected = C_MountJournal_GetMountInfoByID(value)
168-
if isCollected then
169-
collectedMounts = collectedMounts + 1
155+
local textHolderLeft = CreateFrame("Frame", nil, topPanel)
156+
textHolderLeft:Point("LEFT", topPanel, "BOTTOMLEFT", 5, 0)
157+
textHolderLeft:Width(E.screenWidth * 0.5)
158+
textHolderLeft:Height(E.screenHeight * (1 / 4) - 20)
159+
160+
if module.db and module.db.showCollections then
161+
textHolderLeft.collections = textHolderLeft:CreateFontString(nil, "ARTWORK")
162+
textHolderLeft.collections:Point("TOPLEFT", textHolderLeft)
163+
textHolderLeft.collections:FontTemplate(nil, 24, "SHADOWOUTLINE")
164+
textHolderLeft.collections:SetTextColor(1, 1, 1, 1)
165+
textHolderLeft.collections:SetText(F.String.GradientClass(L["Collections"]))
166+
textHolderLeft.collections:SetJustifyH("LEFT")
167+
textHolderLeft.collections:SetJustifyV("TOP")
168+
169+
local collectedMounts = 0
170+
if E.MountIDs then
171+
for _, value in pairs(E.MountIDs) do
172+
local _, _, _, _, _, _, _, _, _, _, isCollected = C_MountJournal_GetMountInfoByID(value)
173+
if isCollected then
174+
collectedMounts = collectedMounts + 1
175+
end
170176
end
171177
end
178+
179+
textHolderLeft.collections.mount = textHolderLeft:CreateFontString(nil, "ARTWORK")
180+
textHolderLeft.collections.mount:Point("TOPLEFT", textHolderLeft.collections, "BOTTOMLEFT", 2, -10)
181+
textHolderLeft.collections.mount:FontTemplate(nil, 16, "SHADOWOUTLINE")
182+
textHolderLeft.collections.mount:SetTextColor(1, 1, 1, 1)
183+
textHolderLeft.collections.mount:SetText(L["Mounts: "] .. F.String.MERATHILISUI(collectedMounts))
184+
textHolderLeft.collections.mount:SetJustifyH("LEFT")
185+
textHolderLeft.collections.mount:SetJustifyV("TOP")
186+
187+
textHolderLeft.collections.toys = textHolderLeft:CreateFontString(nil, "OVERLAY")
188+
textHolderLeft.collections.toys:FontTemplate(nil, 16, "SHADOWOUTLINE")
189+
textHolderLeft.collections.toys:Point("TOPLEFT", textHolderLeft.collections.mount, "BOTTOMLEFT", 2, -4)
190+
textHolderLeft.collections.toys:SetTextColor(1, 1, 1, 1)
191+
textHolderLeft.collections.toys:SetText(
192+
L["Toys: "] .. F.String.MERATHILISUI(C_ToyBox_GetNumLearnedDisplayedToys())
193+
)
194+
textHolderLeft.collections.toys:SetJustifyH("LEFT")
195+
textHolderLeft.collections.toys:SetJustifyV("TOP")
196+
197+
local _, petsOwned = C_PetJournal_GetNumPets()
198+
textHolderLeft.collections.pets = textHolderLeft:CreateFontString(nil, "OVERLAY")
199+
textHolderLeft.collections.pets:Point("TOPLEFT", textHolderLeft.collections.toys, "BOTTOMLEFT", 0, -4)
200+
textHolderLeft.collections.pets:FontTemplate(nil, 16, "SHADOWOUTLINE")
201+
textHolderLeft.collections.pets:SetTextColor(1, 1, 1, 1)
202+
textHolderLeft.collections.pets:SetText(L["Pets: "] .. F.String.MERATHILISUI(petsOwned))
203+
textHolderLeft.collections.pets:SetJustifyH("LEFT")
204+
textHolderLeft.collections.pets:SetJustifyV("TOP")
205+
206+
textHolderLeft.collections.achievs = textHolderLeft:CreateFontString(nil, "OVERLAY")
207+
textHolderLeft.collections.achievs:SetPoint("TOPLEFT", textHolderLeft.collections.pets, "BOTTOMLEFT", 0, -4)
208+
textHolderLeft.collections.achievs:FontTemplate(nil, 16, "SHADOWOUTLINE")
209+
textHolderLeft.collections.achievs:SetTextColor(1, 1, 1, 1)
210+
textHolderLeft.collections.achievs:SetText(
211+
L["Achievement Points: "] .. F.String.MERATHILISUI(E:FormatLargeNumber(GetTotalAchievementPoints(), ","))
212+
)
213+
textHolderLeft.collections.achievs:SetJustifyH("LEFT")
214+
textHolderLeft.collections.achievs:SetJustifyV("TOP")
172215
end
173216

174-
textHolder.collections.mount = textHolder:CreateFontString(nil, "ARTWORK")
175-
textHolder.collections.mount:Point("TOPLEFT", textHolder.collections, "BOTTOMLEFT", 2, -10)
176-
textHolder.collections.mount:FontTemplate(nil, 16, "SHADOWOUTLINE")
177-
textHolder.collections.mount:SetTextColor(1, 1, 1, 1)
178-
textHolder.collections.mount:SetText(L["Mounts: "] .. F.String.MERATHILISUI(collectedMounts))
179-
textHolder.collections.mount:SetJustifyH("LEFT")
180-
textHolder.collections.mount:SetJustifyV("TOP")
181-
182-
textHolder.collections.toys = textHolder:CreateFontString(nil, "OVERLAY")
183-
textHolder.collections.toys:FontTemplate(nil, 16, "SHADOWOUTLINE")
184-
textHolder.collections.toys:Point("TOPLEFT", textHolder.collections.mount, "BOTTOMLEFT", 2, -4)
185-
textHolder.collections.toys:SetTextColor(1, 1, 1, 1)
186-
textHolder.collections.toys:SetText(L["Toys: "] .. F.String.MERATHILISUI(C_ToyBox_GetNumLearnedDisplayedToys()))
187-
textHolder.collections.toys:SetJustifyH("LEFT")
188-
textHolder.collections.toys:SetJustifyV("TOP")
189-
190-
local _, petsOwned = C_PetJournal_GetNumPets()
191-
textHolder.collections.pets = textHolder:CreateFontString(nil, "OVERLAY")
192-
textHolder.collections.pets:Point("TOPLEFT", textHolder.collections.toys, "BOTTOMLEFT", 0, -4)
193-
textHolder.collections.pets:FontTemplate(nil, 16, "SHADOWOUTLINE")
194-
textHolder.collections.pets:SetTextColor(1, 1, 1, 1)
195-
textHolder.collections.pets:SetText(L["Pets: "] .. F.String.MERATHILISUI(petsOwned))
196-
textHolder.collections.pets:SetJustifyH("LEFT")
197-
textHolder.collections.pets:SetJustifyV("TOP")
198-
199-
textHolder.collections.achievs = textHolder:CreateFontString(nil, "OVERLAY")
200-
textHolder.collections.achievs:SetPoint("TOPLEFT", textHolder.collections.pets, "BOTTOMLEFT", 0, -4)
201-
textHolder.collections.achievs:FontTemplate(nil, 16, "SHADOWOUTLINE")
202-
textHolder.collections.achievs:SetTextColor(1, 1, 1, 1)
203-
textHolder.collections.achievs:SetText(
204-
L["Achievement Points: "] .. F.String.MERATHILISUI(E:FormatLargeNumber(GetTotalAchievementPoints(), ","))
205-
)
206-
textHolder.collections.achievs:SetJustifyH("LEFT")
207-
textHolder.collections.achievs:SetJustifyV("TOP")
217+
local textHolderRight = CreateFrame("Frame", nil, topPanel)
218+
textHolderRight:Point("RIGHT", topPanel, "BOTTOMRIGHT", -5, 0)
219+
textHolderRight:Width(E.screenWidth * 0.5)
220+
textHolderRight:Height(E.screenHeight * (1 / 4) - 20)
208221

209222
-- Use this frame to control the position of the model - taken from ElvUI
210223
local modelHolder = CreateFrame("Frame", nil, mainFrame)
@@ -255,7 +268,8 @@ function module:GameMenu_OnShow()
255268
self.mainFrame = mainFrame
256269
self.mainFrame:Show()
257270

258-
self.textHolder = textHolder
271+
self.textHolderLeft = textHolderLeft
272+
self.textHolderRight = textHolderRight
259273

260274
self.modelHolder = modelHolder
261275
self.npcHolder = npcHolder
@@ -268,8 +282,8 @@ function module:GameMenu_OnHide()
268282
end
269283

270284
function module:GameMenu()
271-
self.db = E.db.mui.general.GameMenu
272-
if not self.db or not self.db.enable then
285+
module.db = E.db.mui.gameMenu
286+
if not module.db or not module.db.enable then
273287
return
274288
end
275289

ElvUI_MerathilisUI/Options/General.lua

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
local MER, F, E, I, V, P, G, L = unpack(ElvUI_MerathilisUI)
22
local options = MER.options.general.args
33

4-
local C_AddOns_IsAddOnLoaded = C_AddOns.IsAddOnLoaded
5-
64
options.name = {
75
order = 1,
86
type = "group",
@@ -55,9 +53,58 @@ options.name = {
5553
},
5654
GameMenu = {
5755
order = 5,
58-
type = "toggle",
56+
type = "group",
5957
name = L["GameMenu"],
60-
desc = L["Enable/Disable the MerathilisUI Style from the Blizzard GameMenu. (e.g. Pepe, Logo, Bars)"],
58+
guiInline = true,
59+
get = function(info)
60+
return E.db.mui.gameMenu[info[#info]]
61+
end,
62+
set = function(info, value)
63+
E.db.mui.gameMenu[info[#info]] = value
64+
E:StaticPopup_Show("CONFIG_RL")
65+
end,
66+
args = {
67+
enable = {
68+
order = 1,
69+
type = "toggle",
70+
name = L["Enable"],
71+
desc = L["Enable/Disable the MerathilisUI Style from the Blizzard GameMenu. (e.g. Pepe, Logo, Bars)"],
72+
},
73+
bgColor = {
74+
order = 2,
75+
type = "color",
76+
name = L["Background Color"],
77+
hasAlpha = true,
78+
get = function(info)
79+
local t = E.db.mui.gameMenu[info[#info]]
80+
local d = P.gameMenu[info[#info]]
81+
return t.r, t.g, t.b, t.a, d.r, d.g, d.b, d.a
82+
end,
83+
set = function(info, r, g, b, a)
84+
local t = E.db.mui.gameMenu[info[#info]]
85+
t.r, t.g, t.b, t.a = r, g, b, a
86+
end,
87+
disabled = function()
88+
return not E.db.mui.gameMenu.enable
89+
end,
90+
},
91+
info = {
92+
order = 2,
93+
type = "group",
94+
name = L["Info"],
95+
guiInline = true,
96+
hidden = function()
97+
return not E.db.mui.gameMenu.enable
98+
end,
99+
args = {
100+
showCollections = {
101+
order = 1,
102+
type = "toggle",
103+
name = L["Show Collections"],
104+
},
105+
},
106+
},
107+
},
61108
},
62109
},
63110
}

0 commit comments

Comments
 (0)