Skip to content

Commit

Permalink
Use high-quality class icon atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
verseczi authored and Nevcairiel committed Feb 23, 2024
1 parent 24634b5 commit c745a18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ read_globals = {
"CombatFeedback_OnUpdate",
"CompactRaidFrameManager_GetSetting",
"CompactRaidFrameManager_SetSetting",
"GetClassAtlas",
"RegisterStateDriver",
"RegisterUnitWatch",
"SecureButton_GetModifiedUnit",
Expand Down
8 changes: 6 additions & 2 deletions modules/portrait.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ function Portrait:Update(frame, event)
if( type == "class" ) then
local classToken = frame:UnitClassToken()
if( classToken ) then
frame.portrait:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes")
frame.portrait:SetTexCoord(CLASS_ICON_TCOORDS[classToken][1], CLASS_ICON_TCOORDS[classToken][2], CLASS_ICON_TCOORDS[classToken][3], CLASS_ICON_TCOORDS[classToken][4])
local classIconAtlas = GetClassAtlas(classToken)
if( classIconAtlas ) then
frame.portrait:SetAtlas(classIconAtlas)
else
frame.portrait:SetTexture("")
end
else
frame.portrait:SetTexture("")
end
Expand Down

0 comments on commit c745a18

Please sign in to comment.