From 7abd06a806f85a924cc286796dfa69065240a902 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Thu, 15 Feb 2018 13:23:36 +0000 Subject: [PATCH] Added Friends.ListenForFriendsMessages --- Facepunch.Steamworks/Client/Friends.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Facepunch.Steamworks/Client/Friends.cs b/Facepunch.Steamworks/Client/Friends.cs index 3c557b7..7a69c1d 100644 --- a/Facepunch.Steamworks/Client/Friends.cs +++ b/Facepunch.Steamworks/Client/Friends.cs @@ -43,6 +43,28 @@ namespace Facepunch.Steamworks client.RegisterCallback( OnGameJoinRequested ); } + private bool _listenForFriendsMessages; + + /// + /// Listens for Steam friends chat messages. + /// You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2. + /// After enabling this you will receive callbacks when ever the user receives a chat message. + /// + public bool ListenForFriendsMessages + { + get + { + return _listenForFriendsMessages; + } + + set + { + _listenForFriendsMessages = value; + client.native.friends.SetListenForFriendsMessages( value ); + } + } + + public delegate void JoinRequestedDelegate( SteamFriend friend, string connect ); //