mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Added ability to register to OnLobbyJoinRequested callback
This commit is contained in:
parent
6b5f8f7481
commit
2474c3de99
@ -37,6 +37,9 @@ public Lobby( Client c )
|
||||
{
|
||||
client = c;
|
||||
|
||||
// For backwards compatibility
|
||||
OnLobbyJoinRequested = Join;
|
||||
|
||||
client.RegisterCallback<SteamNative.LobbyDataUpdate_t>( OnLobbyDataUpdatedAPI );
|
||||
client.RegisterCallback<SteamNative.LobbyChatMsg_t>( OnLobbyChatMessageRecievedAPI );
|
||||
client.RegisterCallback<SteamNative.LobbyChatUpdate_t>( OnLobbyStateUpdatedAPI );
|
||||
@ -493,12 +496,17 @@ public void OpenFriendInviteOverlay()
|
||||
/// </summary>
|
||||
public Action<ulong, ulong> OnUserInvitedToLobby;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a user accepts an invitation to a lobby while the game is running. The parameter is a lobby id.
|
||||
/// </summary>
|
||||
public Action<ulong> OnLobbyJoinRequested;
|
||||
|
||||
/// <summary>
|
||||
/// Joins a lobby if a request was made to join the lobby through the friends list or an invite
|
||||
/// </summary>
|
||||
internal void OnLobbyJoinRequestedAPI( GameLobbyJoinRequested_t callback )
|
||||
{
|
||||
Join( callback.SteamIDLobby );
|
||||
if (OnLobbyJoinRequested != null) { OnLobbyJoinRequested(callback.SteamIDLobby); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user