@@ -444,8 +444,8 @@ local function GameVersionSelect_OnClick(self, mouseButton)
444444 return button
445445 end
446446
447- -- Create game version buttons from newest xpac to oldest
448- local gameVersions = {}
447+ -- Create game version buttons from newest xpac to oldest
448+ local gameVersions = {}
449449 if AtlasLoot :GameVersion_GE (AtlasLoot .MOP_VERSION_NUM ) then
450450 table.insert (gameVersions , AtlasLoot .MOP_VERSION_NUM )
451451 end
@@ -460,12 +460,12 @@ local function GameVersionSelect_OnClick(self, mouseButton)
460460 end
461461 table.insert (gameVersions , AtlasLoot .CLASSIC_VERSION_NUM )
462462
463- local GVButton = createGVButton (gameVersions [1 ], GAME_VERSION_TEXTURES [gameVersions [1 ]])
463+ local GVButton = createGVButton (gameVersions [1 ], GAME_VERSION_TEXTURES [gameVersions [1 ]])
464464 GVButton :SetPoint (" TOP" , frame , " TOP" , 0 , - 5 )
465- for i = 2 , # gameVersions do
466- GVButton = createGVButton (gameVersions [i ], GAME_VERSION_TEXTURES [gameVersions [i ]])
467- GVButton :SetPoint (" TOP" , frame .buttons [# frame .buttons - 1 ], " BOTTOM" , 0 , - buttonGap )
468- end
465+ for i = 2 , # gameVersions do
466+ GVButton = createGVButton (gameVersions [i ], GAME_VERSION_TEXTURES [gameVersions [i ]])
467+ GVButton :SetPoint (" TOP" , frame .buttons [# frame .buttons - 1 ], " BOTTOM" , 0 , - buttonGap )
468+ end
469469
470470 frame :SetSize (width , height + (# frame .buttons * 32 ) + ((# frame .buttons - 1 ) * buttonGap ))
471471 frame :Hide ()
@@ -550,6 +550,36 @@ local function GUI_InfoOnLeave(self)
550550 GetAlTooltip ():Hide ()
551551end
552552
553+ -- Transmog
554+ local function TransmogButton_Refresh (self )
555+ self .texture :SetDesaturated (not AtlasLoot .db .GUI .transmogHighlighter )
556+
557+ if GUI .frame .contentFrame .shownFrame and GUI .frame .contentFrame .shownFrame .OnTransMogUpdate then
558+ GUI .frame .contentFrame .shownFrame .OnTransMogUpdate ()
559+ end
560+ end
561+
562+ local function TransmogButton_OnClick (self , button )
563+ AtlasLoot .db .GUI .transmogHighlighter = not AtlasLoot .db .GUI .transmogHighlighter
564+ TransmogButton_Refresh (self )
565+ end
566+
567+ local function TransmogButton_OnEnter (self , owner )
568+ local tooltip = GetAlTooltip ()
569+ tooltip :ClearLines ()
570+ if owner and type (owner ) == " table" then
571+ tooltip :SetOwner (owner [1 ], owner [2 ], owner [3 ], owner [4 ])
572+ else
573+ tooltip :SetOwner (self , " ANCHOR_RIGHT" , - (self :GetWidth () * 0.5 ), 5 )
574+ end
575+ tooltip :AddLine (TRANSMOGRIFY )
576+ tooltip :Show ()
577+ end
578+
579+ local function TransmogButton_OnLeave (self )
580+ GetAlTooltip ():Hide ()
581+ end
582+
553583-- ################################
554584-- DropDowns/Select
555585-- ################################
@@ -1185,6 +1215,10 @@ function GUI:Create()
11851215 frame .contentFrame .contentPhaseButton :SetScript (" OnClick" , ContentPhaseButton_OnClick )
11861216 frame .contentFrame .contentPhaseButton .mainButton = true
11871217
1218+ frame .contentFrame .contentPhaseButton .texture = frame .contentFrame .contentPhaseButton :CreateTexture (frameName .. " -contentPhaseButton-texture" ," ARTWORK" )
1219+ frame .contentFrame .contentPhaseButton .texture :SetAllPoints (frame .contentFrame .contentPhaseButton )
1220+ frame .contentFrame .contentPhaseButton .texture :SetTexture (AtlasLoot .Data .ContentPhase :GetActivePhaseTexture ())
1221+
11881222 -- Sound
11891223 frame .contentFrame .soundsButton = GUI .CreateButton ()
11901224 frame .contentFrame .soundsButton :SetPoint (" RIGHT" , frame .contentFrame .modelButton , " LEFT" , - 5 , 0 )
@@ -1243,9 +1277,20 @@ function GUI:Create()
12431277 frame .contentFrame .clasFilterButton .texture :SetAllPoints (frame .contentFrame .clasFilterButton )
12441278 -- frame.contentFrame.clasFilterButton.texture:SetTexture(CLASS_ICON_PATH[PLAYER_CLASS_FN])
12451279
1246- frame .contentFrame .contentPhaseButton .texture = frame .contentFrame .contentPhaseButton :CreateTexture (frameName .. " -contentPhaseButton-texture" ," ARTWORK" )
1247- frame .contentFrame .contentPhaseButton .texture :SetAllPoints (frame .contentFrame .contentPhaseButton )
1248- frame .contentFrame .contentPhaseButton .texture :SetTexture (AtlasLoot .Data .ContentPhase :GetActivePhaseTexture ())
1280+ -- Transmog
1281+ frame .contentFrame .transmogButton = CreateFrame (" Button" , frameName .. " -transmofButton" )
1282+ frame .contentFrame .transmogButton :SetParent (frame .contentFrame )
1283+ frame .contentFrame .transmogButton :RegisterForClicks (" LeftButtonUp" , " RightButtonUp" );
1284+ frame .contentFrame .transmogButton :SetWidth (25 )
1285+ frame .contentFrame .transmogButton :SetHeight (25 )
1286+ frame .contentFrame .transmogButton :SetPoint (" LEFT" , frame .contentFrame .clasFilterButton , " RIGHT" , 5 , 0 )
1287+ frame .contentFrame .transmogButton :SetScript (" OnClick" , TransmogButton_OnClick )
1288+ frame .contentFrame .transmogButton :SetScript (" OnEnter" , TransmogButton_OnEnter )
1289+ frame .contentFrame .transmogButton :SetScript (" OnLeave" , TransmogButton_OnLeave )
1290+ frame .contentFrame .transmogButton .texture = frame .contentFrame .transmogButton :CreateTexture (frameName .. " -transmogButton-texture" ," ARTWORK" )
1291+ frame .contentFrame .transmogButton .texture :SetAllPoints (frame .contentFrame .transmogButton )
1292+ frame .contentFrame .transmogButton .texture :SetTexture (" Interface\\ Icons\\ INV_Arcane_Orb" )
1293+ frame .contentFrame .transmogButton .texture :SetDesaturated (not AtlasLoot .db .GUI .transmogHighlighter )
12491294
12501295 ContentPhaseButton_Refresh (frame .contentFrame .contentPhaseButton )
12511296
0 commit comments