/trunk
local RAID_CLASS_COLORS = CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS |
local L = {} |
local format, strfind, strupper, GetGuildRosterInfo, GetFriendInfo, CLASS_BUTTONS, GetDifficultyColor = |
format, strfind, strupper, GetGuildRosterInfo, GetFriendInfo, CLASS_BUTTONS, GetQuestDifficultyColor |
local format, strfind, GetGuildRosterInfo, GetFriendInfo, CLASS_BUTTONS, GetDifficultyColor = |
format, strfind, GetGuildRosterInfo, GetFriendInfo, CLASS_BUTTONS, GetQuestDifficultyColor |
local orgReloadUI = ReloadUI |
ReloadUI = function(...) |
friendEntries[1] = new( nil, "Name", "", "Lv", "Zone", "Notes" ) |
end |
online = online + 1 |
friendEntries[online+1] = new( name, status ~= "" and format("%s %s", tostring(status), tostring(name)) or name, class, level, zone or "Unknown", note and format("[%s]",note) or "-" ) |
friendEntries[online+1] = new( name, status ~= "" and format("%s %s", tostring(status), tostring(name)) or name, L[class], level, zone or "Unknown", note and format("[%s]",note) or "-" ) |
end |
end |
f.FriendsBlock.text = format(config.hideTotalFriends and " %d" or " %d/%d", online, total) |
highlight:SetAlpha(0) |
local function Menu_OnEnter(b) |
if b.index then |
if b and b.index then |
highlight:SetAllPoints(b) |
if b.index > 1 then |
highlight:SetAlpha(1) |
highlight:ClearAllPoints() |
tip:Hide() |
tipShown = false |
if b.index and b.index > 1 then highlight:SetAlpha(0) end |
if b and b.index and b.index > 1 then highlight:SetAlpha(0) end |
if not MouseIsOver(f) then |
sliderValue = 0 |
block = nil |
button.fontName:SetText( name or "" ) |
if class then |
if index > 1 then |
class = isGuild and class or L[class] |
local color = RAID_CLASS_COLORS[class] |
if color then |
button.fontName:SetTextColor( color.r, color.g, color.b ) |
if inGroup then |
button.icon:SetTexture(isGrouped and "Interface\\Buttons\\UI-CheckBox-Check" or "") |
button.icon:SetTexCoord(.15,.85,.15,.85) |
else |
button.icon:SetTexture"Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes" |
local offset, left, right, bottom, top = 0.025, unpack( CLASS_BUTTONS[class] ) |
button.icon:SetTexCoord( left+offset, right-offset, bottom+offset, top-offset ) |
end |
button.fontName:SetTextColor( color.r, color.g, color.b ) |
if inGroup then |
button.icon:SetTexture(isGrouped and "Interface\\Buttons\\UI-CheckBox-Check" or "") |
button.icon:SetTexCoord(.15,.85,.15,.85) |
else |
button.fontName:SetTextColor( 1,1,0 ) |
button.icon:SetTexture"" |
button.icon:SetTexture"Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes" |
local offset, left, right, bottom, top = 0.025, unpack( CLASS_BUTTONS[class] ) |
button.icon:SetTexCoord( left+offset, right-offset, bottom+offset, top-offset ) |
end |
color = GetDifficultyColor(level) |
button.fontLevel:SetTextColor( color.r, color.g, color.b ) |
if not dontShow and InCombatLockdown() then f:Show() return Menu_OnEnter(f) end |
for k, v in next, guildEntries do del(v) guildEntries[k]=nil end |
for i=1, GetNumGuildMembers(true) do |
local name, rank, _, level, _, zone, note, offnote, connected, status, class = GetGuildRosterInfo(i) |
local name, rank, _, level, class, zone, note, offnote, connected, status = GetGuildRosterInfo(i) |
if connected then |
if #guildEntries == 0 then |
guildEntries[1] = new( nil, "Name", "", "Lv", "Zone", "Notes", "Rank" ) |
format( "[%s] - \124cffff9944[%s]\124r", note, offnote ) or |
format( "[%s]", note )) or (offnote ~= "" and |
format( "\124cffff9944[%s]\124r", offnote ) or "-") |
guildEntries[#guildEntries+1] = new( name, status == "" and name or format( "%s %s", status, name ), class, level, zone, notes, rank, i ) |
guildEntries[#guildEntries+1] = new( name, status == "" and name or format( "%s %s", status, name ), L[class], level, zone, notes, rank, i ) |
end |
end |
f.GuildBlock.text = IsInGuild() and format(config.hideGuildTotal and" %s%d"or" %s%d/%d", config.showGuildName and GetGuildInfo"player" and GetGuildInfo"player"..": " or "", #guildEntries-1, GetNumGuildMembers(true) ) or "No Guild" |
L[loc] = eng |
end |
tip = _G.GameTooltip |
tip = GameTooltip |
horde = UnitFactionGroup"player" == "Horde" |
if _G.Skinner then |
_G.Skinner:applySkin(self) |
if Skinner then |
Skinner:applySkin(self) |
else |
f:SetBackdrop( { bgFile="Interface\\Buttons\\WHITE8X8", edgeFile="Interface\\Tooltips\\UI-Tooltip-Border", |
tile=true, tileSize=12, edgeSize=12, insets = { left=2, right=2, top=2, bottom=2 } } ) |