Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions native/friends.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,16 @@ HL_PRIM void HL_NAME(activate_overlay_store)( int appid, int flag ) {
SteamFriends()->ActivateGameOverlayToStore((AppId_t)appid,(EOverlayToStoreFlag)flag);
}

HL_PRIM void HL_NAME(set_rich_presence)( vbyte *pchKey, vbyte *pchValue ) {
SteamFriends()->SetRichPresence((char*)pchKey, (char*)pchValue);
}

DEFINE_PRIM(_BYTES, get_user_name, _UID);
DEFINE_PRIM(_BYTES, get_user_avatar, _UID _I32 _REF(_I32) _REF(_I32));
DEFINE_PRIM(_BOOL, request_user_information, _UID _BOOL);
DEFINE_PRIM(_ARR, get_friends, _I32);
DEFINE_PRIM(_BOOL, has_friend, _UID _I32);
DEFINE_PRIM(_VOID, activate_overlay_user, _BYTES _UID);
DEFINE_PRIM(_VOID, activate_overlay_store, _I32 _I32);
DEFINE_PRIM(_VOID, set_rich_presence, _UID _UID);

5 changes: 5 additions & 0 deletions steam/Friends.hx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,16 @@ class Friends {
public static function activateOverlay( overlay : OverlayKind, ?uid : UID ) {
activate_overlay_user( overlay == None ? null : @:privateAccess overlay.toString().toUtf8(), uid);
}

public static function setRichPresence(key:String, value:String) {
@:privateAccess set_rich_presence(key.toUtf8(), value.toUtf8());
}

public static function activateOverlayStore( appId : Int, flags : OverlayToStoreFlag ) : Void {}

static function get_friends( flags : FriendFlags ) : hl.NativeArray<UID> { return null; }
static function has_friend( uid : UID, flags : FriendFlags ) : Bool { return false; }
static function activate_overlay_user( overlay : hl.Bytes, uid : UID ) : Void {}
static function set_rich_presence( pchKey:hl.Bytes, pchValue:hl.Bytes ) : Void {}

}