Struct steamworks::Friend
source · pub struct Friend<Manager> { /* private fields */ }
Implementations§
source§impl<Manager> Friend<Manager>
impl<Manager> Friend<Manager>
pub fn id(&self) -> SteamId
pub fn name(&self) -> String
sourcepub fn nick_name(&self) -> Option<String>
pub fn nick_name(&self) -> Option<String>
Gets the nickname that the current user has set for the specified user.
pub fn state(&self) -> FriendState
sourcepub fn game_played(&self) -> Option<FriendGame>
pub fn game_played(&self) -> Option<FriendGame>
Returns information about the game the player is current playing if any
sourcepub fn coplay_game_played(&self) -> AppId
pub fn coplay_game_played(&self) -> AppId
Gets the app ID of the game that user played with someone on their recently-played-with list.
sourcepub fn coplay_time(&self) -> i32
pub fn coplay_time(&self) -> i32
Gets the timestamp of when the user played with someone on their recently-played-with list.
sourcepub fn small_avatar(&self) -> Option<Vec<u8>>
pub fn small_avatar(&self) -> Option<Vec<u8>>
Returns a small (32x32) avatar for the user in RGBA format
sourcepub fn medium_avatar(&self) -> Option<Vec<u8>>
pub fn medium_avatar(&self) -> Option<Vec<u8>>
Returns a medium (64x64) avatar for the user in RGBA format
sourcepub fn large_avatar(&self) -> Option<Vec<u8>>
pub fn large_avatar(&self) -> Option<Vec<u8>>
Returns a large (184x184) avatar for the user in RGBA format
sourcepub fn has_friend(&self, flags: FriendFlags) -> bool
pub fn has_friend(&self, flags: FriendFlags) -> bool
Checks if the user meets the specified criteria. (Friends, blocked, users on the same server, etc)
sourcepub fn invite_user_to_game(&self, connect_string: &str)
pub fn invite_user_to_game(&self, connect_string: &str)
Invites a friend or clan member to the current game using a special invite string. If the target user accepts the invite then the ConnectString gets added to the command-line when launching the game. If the game is already running for that user, then they will receive a GameRichPresenceJoinRequested_t callback with the connect string.
sourcepub fn set_played_with(&self)
pub fn set_played_with(&self)
Mark a target user as ‘played with’. NOTE: The current user must be in game with the other player for the association to work.