mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-12 06:38:01 +03:00
Added Friend.GetAvatar( size )
This commit is contained in:
parent
6dc680cbab
commit
6e807c8e4d
@ -24,6 +24,8 @@ namespace Facepunch.Steamworks.Test
|
|||||||
foreach ( var friend in client.Friends.All )
|
foreach ( var friend in client.Friends.All )
|
||||||
{
|
{
|
||||||
Console.WriteLine( "{0}: {1} (Friend:{2}) (Blocked:{3})", friend.Id, friend.Name, friend.IsFriend, friend.IsBlocked );
|
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 @@ namespace Facepunch.Steamworks
|
|||||||
|
|
||||||
Client.native.friends.RequestFriendRichPresence( Id );
|
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>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user