@@ -9,12 +9,16 @@ local CreateFrame = CreateFrame
99local UIFrameFadeIn = UIFrameFadeIn
1010local GetTotalAchievementPoints = GetTotalAchievementPoints
1111
12+ local C_CurrencyInfo_GetCurrencyInfo = C_CurrencyInfo .GetCurrencyInfo
1213local C_MountJournal_GetMountInfoByID = C_MountJournal .GetMountInfoByID
1314local C_ToyBox_GetNumLearnedDisplayedToys = C_ToyBox .GetNumLearnedDisplayedToys
1415local C_PetJournal_GetNumPets = C_PetJournal .GetNumPets
1516
1617local 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()
268282end
269283
270284function 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
0 commit comments