@@ -22,12 +22,13 @@ function ImpUI_Party:StyleFrames()
2222
2323 -- Fonts
2424 local font = Helpers .get_styled_font (ImpUI .db .profile .primaryInterfaceFont );
25+ local size = 10 ;
2526
2627 -- Style Each Party Frame
2728 for i = 1 , 4 do
2829 -- Update Fonts
2930 _G [" PartyMemberFrame" .. i .. " Name" ]:SetTextColor (font .r , font .g , font .b , font .a );
30- _G [" PartyMemberFrame" .. i .. " Name" ]:SetFont (font .font , 10 , font .flags );
31+ _G [" PartyMemberFrame" .. i .. " Name" ]:SetFont (font .font , size , font .flags );
3132
3233 if (Helpers .IsRetail ()) then
3334 _G [" PartyMemberFrame" .. i .. " HealthBarText" ]:SetFont (font .font , 8 , font .flags );
@@ -39,6 +40,45 @@ function ImpUI_Party:StyleFrames()
3940 _G [" PartyMemberFrame" .. i .. " ManaBarTextRight" ]:SetFont (font .font , 8 , font .flags );
4041 end
4142 end
43+
44+ ImpUI_Party :UpdateColours ();
45+ end
46+
47+ --[[
48+ Simply updates the class colouring for all party members.
49+
50+ @ return void
51+ ]]
52+ function ImpUI_Party :UpdateColours ()
53+ if (IsInGroup () == false ) then return end
54+
55+ local font = Helpers .get_styled_font (ImpUI .db .profile .primaryInterfaceFont );
56+ local enabled = ImpUI .db .profile .partyClassColours ;
57+
58+ for i = 1 , 4 do
59+ local unitName = " party" .. i ;
60+ if (UnitExists (unitName )) then
61+ if (UnitClass (unitName )) then
62+ local c = Helpers .GetClassColour (unitName );
63+ local nameFrame = _G [" PartyMemberFrame" .. i .. " Name" ];
64+
65+ if (enabled ) then
66+ nameFrame :SetTextColor (c .r , c .g , c .b , 1 );
67+ else
68+ nameFrame :SetTextColor (font .r , font .g , font .b , font .a );
69+ end
70+ end
71+ end
72+ end
73+ end
74+
75+ --[[
76+ Fires when the party a player is in changes / updates with new members.
77+
78+ @ return void
79+ ]]
80+ function ImpUI_Party :GROUP_ROSTER_UPDATE ()
81+ ImpUI_Party :UpdateColours ();
4282end
4383
4484--[[
@@ -140,6 +180,8 @@ function ImpUI_Party:OnEnable()
140180
141181 ImpUI_Party :LoadPosition ();
142182 ImpUI_Party :StyleFrames ();
183+
184+ self :RegisterEvent (' GROUP_ROSTER_UPDATE' );
143185end
144186
145187--[[
0 commit comments