PageRenderTime 82ms CodeModel.GetById 40ms app.highlight 9ms RepoModel.GetById 31ms app.codeStats 0ms

/Tukui/modules/skins/journal.lua

http://github.com/Asphyxia/Tukui
Lua | 109 lines | 88 code | 21 blank | 0 comment | 2 complexity | b995a1599d5fa7a32119ecec583f7e16 MD5 | raw file
  1local T, C, L = unpack(select(2, ...))
  2
  3local function LoadSkin()
  4		EncounterJournal:StripTextures(true)
  5		
  6		EncounterJournal.backdrop = EncounterJournal:CreateTexture(nil, "BACKGROUND")
  7		EncounterJournal.backdrop:SetDrawLayer("BACKGROUND", -7)
  8		EncounterJournal.backdrop:SetTexture(0, 0, 0)
  9		EncounterJournal.backdrop:Point("TOPLEFT", EncounterJournal, "TOPLEFT", -T.mult*3, T.mult*3)
 10		EncounterJournal.backdrop:Point("BOTTOMRIGHT", EncounterJournal, "BOTTOMRIGHT", T.mult*3, -T.mult*3)
 11		
 12		EncounterJournal.backdrop2 = EncounterJournal:CreateTexture(nil, "BACKGROUND")
 13		EncounterJournal.backdrop2:SetDrawLayer("BACKGROUND", -6)
 14		EncounterJournal.backdrop2:SetTexture(unpack(C["media"].bordercolor))
 15		EncounterJournal.backdrop2:Point("TOPLEFT", EncounterJournal, "TOPLEFT", -T.mult*2, T.mult*2)
 16		EncounterJournal.backdrop2:Point("BOTTOMRIGHT", EncounterJournal, "BOTTOMRIGHT", T.mult*2, -T.mult*2)						
 17
 18		EncounterJournal.backdrop3 = EncounterJournal:CreateTexture(nil, "BACKGROUND")
 19		EncounterJournal.backdrop3:SetDrawLayer("BACKGROUND", -5)
 20		EncounterJournal.backdrop3:SetTexture(0, 0, 0)
 21		EncounterJournal.backdrop3:Point("TOPLEFT", EncounterJournal, "TOPLEFT", -T.mult, T.mult)
 22		EncounterJournal.backdrop3:Point("BOTTOMRIGHT", EncounterJournal, "BOTTOMRIGHT", T.mult, -T.mult)					
 23
 24		EncounterJournal.backdrop4 = EncounterJournal:CreateTexture(nil, "BACKGROUND")
 25		EncounterJournal.backdrop4:SetDrawLayer("BACKGROUND", -4)
 26		EncounterJournal.backdrop4:SetTexture(unpack(C["media"].backdropcolor))
 27		EncounterJournal.backdrop4:SetAllPoints()						
 28		
 29		EncounterJournalNavBar:StripTextures(true)
 30		EncounterJournalNavBarOverlay:StripTextures(true)
 31		
 32		EncounterJournalNavBar:CreateBackdrop("Transparent")
 33		EncounterJournalNavBar.backdrop:Point("TOPLEFT", -2, 0)
 34		EncounterJournalNavBar.backdrop:SetPoint("BOTTOMRIGHT")
 35		T.SkinButton(EncounterJournalNavBarHomeButton, true)
 36		
 37		T.SkinEditBox(EncounterJournalSearchBox)
 38		T.SkinCloseButton(EncounterJournalCloseButton)
 39		
 40		EncounterJournalInset:StripTextures(true)
 41		EncounterJournal:HookScript("OnShow", function()
 42			if not EncounterJournalInstanceSelect.backdrop then						
 43				EncounterJournalInstanceSelect.backdrop = EncounterJournalInstanceSelect:CreateTexture(nil, "BACKGROUND")
 44				EncounterJournalInstanceSelect.backdrop:SetDrawLayer("BACKGROUND", -3)
 45				EncounterJournalInstanceSelect.backdrop:SetTexture(0, 0, 0)
 46				EncounterJournalInstanceSelect.backdrop:Point("TOPLEFT", EncounterJournalInstanceSelect.bg, "TOPLEFT", -T.mult*3, T.mult*3)
 47				EncounterJournalInstanceSelect.backdrop:Point("BOTTOMRIGHT", EncounterJournalInstanceSelect.bg, "BOTTOMRIGHT", T.mult*3, -T.mult*3)
 48				
 49				EncounterJournalInstanceSelect.backdrop2 = EncounterJournalInstanceSelect:CreateTexture(nil, "BACKGROUND")
 50				EncounterJournalInstanceSelect.backdrop2:SetDrawLayer("BACKGROUND", -2)
 51				EncounterJournalInstanceSelect.backdrop2:SetTexture(unpack(C["media"].bordercolor))
 52				EncounterJournalInstanceSelect.backdrop2:Point("TOPLEFT", EncounterJournalInstanceSelect.bg, "TOPLEFT", -T.mult*2, T.mult*2)
 53				EncounterJournalInstanceSelect.backdrop2:Point("BOTTOMRIGHT", EncounterJournalInstanceSelect.bg, "BOTTOMRIGHT", T.mult*2, -T.mult*2)						
 54
 55				EncounterJournalInstanceSelect.backdrop3 = EncounterJournalInstanceSelect:CreateTexture(nil, "BACKGROUND")
 56				EncounterJournalInstanceSelect.backdrop3:SetDrawLayer("BACKGROUND", -1)
 57				EncounterJournalInstanceSelect.backdrop3:SetTexture(0, 0, 0)
 58				EncounterJournalInstanceSelect.backdrop3:Point("TOPLEFT", EncounterJournalInstanceSelect.bg, "TOPLEFT", -T.mult, T.mult)
 59				EncounterJournalInstanceSelect.backdrop3:Point("BOTTOMRIGHT", EncounterJournalInstanceSelect.bg, "BOTTOMRIGHT", T.mult, -T.mult)								
 60			end
 61			
 62			if not EncounterJournalEncounterFrameInfo.backdrop then						
 63				EncounterJournalEncounterFrameInfo.backdrop = EncounterJournalEncounterFrameInfo:CreateTexture(nil, "BACKGROUND")
 64				EncounterJournalEncounterFrameInfo.backdrop:SetDrawLayer("BACKGROUND", -3)
 65				EncounterJournalEncounterFrameInfo.backdrop:SetTexture(0, 0, 0)
 66				EncounterJournalEncounterFrameInfo.backdrop:Point("TOPLEFT", EncounterJournalEncounterFrameInfoBG, "TOPLEFT", -T.mult*3, T.mult*3)
 67				EncounterJournalEncounterFrameInfo.backdrop:Point("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBG, "BOTTOMRIGHT", T.mult*3, -T.mult*3)
 68				
 69				EncounterJournalEncounterFrameInfo.backdrop2 = EncounterJournalEncounterFrameInfo:CreateTexture(nil, "BACKGROUND")
 70				EncounterJournalEncounterFrameInfo.backdrop2:SetDrawLayer("BACKGROUND", -2)
 71				EncounterJournalEncounterFrameInfo.backdrop2:SetTexture(unpack(C["media"].bordercolor))
 72				EncounterJournalEncounterFrameInfo.backdrop2:Point("TOPLEFT", EncounterJournalEncounterFrameInfoBG, "TOPLEFT", -T.mult*2, T.mult*2)
 73				EncounterJournalEncounterFrameInfo.backdrop2:Point("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBG, "BOTTOMRIGHT", T.mult*2, -T.mult*2)						
 74
 75				EncounterJournalEncounterFrameInfo.backdrop3 = EncounterJournalEncounterFrameInfo:CreateTexture(nil, "BACKGROUND")
 76				EncounterJournalEncounterFrameInfo.backdrop3:SetDrawLayer("BACKGROUND", -1)
 77				EncounterJournalEncounterFrameInfo.backdrop3:SetTexture(0, 0, 0)
 78				EncounterJournalEncounterFrameInfo.backdrop3:Point("TOPLEFT", EncounterJournalEncounterFrameInfoBG, "TOPLEFT", -T.mult, T.mult)
 79				EncounterJournalEncounterFrameInfo.backdrop3:Point("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBG, "BOTTOMRIGHT", T.mult, -T.mult)								
 80			end	
 81			EncounterJournalEncounterFrameInfoBossTab:ClearAllPoints()
 82			EncounterJournalEncounterFrameInfoBossTab:Point("LEFT", EncounterJournalEncounterFrameInfoEncounterTile, "RIGHT", -10, 4)
 83			EncounterJournalEncounterFrameInfoLootTab:ClearAllPoints()
 84			EncounterJournalEncounterFrameInfoLootTab:Point("LEFT", EncounterJournalEncounterFrameInfoBossTab, "RIGHT", -24, 0)
 85			
 86			EncounterJournalEncounterFrameInfoBossTab:SetFrameStrata("HIGH")
 87			EncounterJournalEncounterFrameInfoLootTab:SetFrameStrata("HIGH")
 88			
 89			EncounterJournalEncounterFrameInfoBossTab:SetScale(0.75)
 90			EncounterJournalEncounterFrameInfoLootTab:SetScale(0.75)
 91		end)
 92		
 93		T.SkinScrollBar(EncounterJournalInstanceSelectScrollFrameScrollBar)
 94		T.SkinScrollBar(EncounterJournalEncounterFrameInfoDetailsScrollFrameScrollBar, 4)
 95		T.SkinScrollBar(EncounterJournalEncounterFrameInfoLootScrollFrameScrollBar, 4)
 96		
 97		EncounterJournalEncounterFrameInfoBossTab:GetNormalTexture():SetTexture(nil)
 98		EncounterJournalEncounterFrameInfoBossTab:GetPushedTexture():SetTexture(nil)
 99		EncounterJournalEncounterFrameInfoBossTab:GetDisabledTexture():SetTexture(nil)
100		EncounterJournalEncounterFrameInfoBossTab:GetHighlightTexture():SetTexture(nil)
101
102		EncounterJournalEncounterFrameInfoLootTab:GetNormalTexture():SetTexture(nil)
103		EncounterJournalEncounterFrameInfoLootTab:GetPushedTexture():SetTexture(nil)
104		EncounterJournalEncounterFrameInfoLootTab:GetDisabledTexture():SetTexture(nil)
105		EncounterJournalEncounterFrameInfoLootTab:GetHighlightTexture():SetTexture(nil)		
106	end
107
108
109tinsert(T.SkinFuncs["Tukui"], LoadSkin)