mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Added Friend.GetAvatar( size )
This commit is contained in:
parent
6dc680cbab
commit
6e807c8e4d
@ -24,6 +24,8 @@ public void FriendList()
|
||||
foreach ( var friend in client.Friends.All )
|
||||
{
|
||||
Console.WriteLine( "{0}: {1} (Friend:{2}) (Blocked:{3})", friend.Id, friend.Name, friend.IsFriend, friend.IsBlocked );
|
||||
|
||||
Assert.IsNotNull(friend.GetAvatar( Steamworks.Friends.AvatarSize.Medium ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -127,6 +127,15 @@ public void Refresh()
|
||||
|
||||
Client.native.friends.RequestFriendRichPresence( Id );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This will return null if you don't have the target user's avatar in your cache.
|
||||
/// Which usually happens for people not on your friends list.
|
||||
/// </summary>
|
||||
public Image GetAvatar( Friends.AvatarSize size )
|
||||
{
|
||||
return Client.Friends.GetCachedAvatar( size, Id );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user