コード例 #1
0
        internal static void OnShowFriends(IntPtr address)
        {
            OnShowFriendsCallback   callback     = null;
            ShowFriendsCallbackInfo callbackInfo = null;

            if (Helper.TryGetAndRemoveCallback <OnShowFriendsCallback, ShowFriendsCallbackInfoInternal, ShowFriendsCallbackInfo>(address, out callback, out callbackInfo))
            {
                callback(callbackInfo);
            }
        }
コード例 #2
0
        /// <summary>
        /// Opens the overlay with a request to show the friends list.
        /// </summary>
        /// <param name="options">Structure containing the account id of the friends list to show.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate.</param>
        /// <param name="completionDelegate">A callback that is fired when the request to show the friends list has been sent to the overlay, or on an error.</param>
        /// <returns>
        /// <see cref="Result.Success" /> If the overlay has been notified about the request.
        /// <see cref="Result.InvalidParameters" /> If any of the options are incorrect.
        /// <see cref="Result.NotConfigured" /> If the overlay is not properly configured.
        /// <see cref="Result.NoChange" /> If the overlay is already visible.
        /// </returns>
        public void ShowFriends(ShowFriendsOptions options, object clientData, OnShowFriendsCallback completionDelegate)
        {
            var optionsInternal = Helper.CopyProperties <ShowFriendsOptionsInternal>(options);

            var completionDelegateInternal = new OnShowFriendsCallbackInternal(OnShowFriends);
            var clientDataAddress          = IntPtr.Zero;

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_UI_ShowFriends(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
            Helper.TryMarshalDispose(ref optionsInternal);
        }
コード例 #3
0
        /// <summary>
        /// Opens the Social Overlay with a request to show the friends list.
        /// </summary>
        /// <param name="options">Structure containing the Epic Online Services Account ID of the friends list to show.</param>
        /// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate.</param>
        /// <param name="completionDelegate">A callback that is fired when the request to show the friends list has been sent to the Social Overlay, or on an error.</param>
        /// <returns>
        /// <see cref="Result.Success" /> If the Social Overlay has been notified about the request.
        /// <see cref="Result.InvalidParameters" /> If any of the options are incorrect.
        /// <see cref="Result.NotConfigured" /> If the Social Overlay is not properly configured.
        /// <see cref="Result.NoChange" /> If the Social Overlay is already visible.
        /// </returns>
        public void ShowFriends(ShowFriendsOptions options, object clientData, OnShowFriendsCallback completionDelegate)
        {
            System.IntPtr optionsAddress = new System.IntPtr();
            Helper.TryMarshalSet <ShowFriendsOptionsInternal, ShowFriendsOptions>(ref optionsAddress, options);

            var clientDataAddress = System.IntPtr.Zero;

            var completionDelegateInternal = new OnShowFriendsCallbackInternal(OnShowFriendsCallbackInternalImplementation);

            Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);

            EOS_UI_ShowFriends(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);

            Helper.TryMarshalDispose(ref optionsAddress);
        }