mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 06:05:46 +03:00
Overlay
This commit is contained in:
parent
f84aba045c
commit
5b24c8ca01
41
Facepunch.Steamworks/Client.Overlay.cs
Normal file
41
Facepunch.Steamworks/Client.Overlay.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public partial class Client : IDisposable
|
||||
{
|
||||
private Overlay _overlay;
|
||||
|
||||
public Overlay Overlay
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _overlay == null )
|
||||
_overlay = new Overlay { client = this };
|
||||
|
||||
return _overlay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Overlay
|
||||
{
|
||||
internal Client client;
|
||||
|
||||
public void OpenProfile( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "steamid", steamid ); }
|
||||
public void OpenChat( ulong steamid ){ client._friends.ActivateGameOverlayToUser( "chat", steamid ); }
|
||||
public void OpenTrade( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "jointrade", steamid ); }
|
||||
public void OpenStats( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "stats", steamid ); }
|
||||
public void OpenAchievements( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "achievements", steamid ); }
|
||||
|
||||
public void AddFriend( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "friendadd", steamid ); }
|
||||
public void RemoveFriend( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "friendremove", steamid ); }
|
||||
public void AcceptFriendRequest( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "friendrequestaccept", steamid ); }
|
||||
public void IgnoreFriendRequest( ulong steamid ) { client._friends.ActivateGameOverlayToUser( "friendrequestignore", steamid ); }
|
||||
|
||||
public void OpenUrl( string url ) { client._friends.ActivateGameOverlayToWebPage( url ); }
|
||||
}
|
||||
}
|
@ -43,6 +43,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Client.Overlay.cs" />
|
||||
<Compile Include="Client.Voice.cs" />
|
||||
<Compile Include="Client.Auth.cs" />
|
||||
<Compile Include="Client.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user