Space Plunder
Loading...
Searching...
No Matches
SetLeaderboard.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4#pragma warning(disable:4996)
5#pragma warning(disable:4265)
6#pragma warning(disable:4701)
7
8#include "CoreMinimal.h"
9#include "SteamRequests.h"
10#include "Kismet/BlueprintAsyncActionBase.h"
11#include "SteamRequests.h"
12#pragma push_macro("ARRAY_COUNT")
13#undef ARRAY_COUNT
14
15#if USING_CODE_ANALYSIS
16MSVC_PRAGMA(warning(push))
17MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
18#endif
19
20#include "OnlineSubsystem.h"
21#include "OnlineSubsystemSteam.h"
22#include <steam/steam_api.h>
23
24#if USING_CODE_ANALYSIS
25MSVC_PRAGMA(warning(pop))
26#endif
27
28#pragma pop_macro("ARRAY_COUNT")
29#include "SetLeaderboard.generated.h"
30
31
32
34DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseUploadLeaderboardDelegate, int32, SteamErrorOutput);
35
37UCLASS()
38class STATSINTEGRATION_API USetLeaderboard : public UBlueprintAsyncActionBase
39{
40 GENERATED_BODY()
41
42public:
43 UPROPERTY(BlueprintAssignable)
44 FResponseUploadLeaderboardDelegate OnSuccess;
45
46 UPROPERTY(BlueprintAssignable)
47 FResponseUploadLeaderboardDelegate OnFailure;
48
49 // ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod
50 // Uploads a user score to the Steam back-end.
51 // This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t
52 // Details are extra game-defined information regarding how the user got that score
53 // pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list
54 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
55 static USetLeaderboard* SetLeaderboard(const FSteamLeaderboardHandle Handle, const ESteamLeaderboardUploadScoreMethod UploadMethod,
56 const int32 NewScore, const TArray<int32> NewScoreDetails);
57
58 // LeaderboardScoreUploaded_t
59
60private:
61 FOnlineSubsystemSteam* SteamSubsystem;
62 virtual void Activate() override;
63
64 void UploadLeaderboard();
65
66 FSteamLeaderboardHandle LeaderboardHandle;
68 int32 Score;
69 TArray<int32> ScoreDetails;
70
71 void OnUploadLeaderboard(LeaderboardScoreUploaded_t* pLeaderboardScoresUploaded, bool bIOFailure);
72 CCallResult<USetLeaderboard, LeaderboardScoreUploaded_t> m_callUploadResult;
73
74
75};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
ESteamLeaderboardUploadScoreMethod
Definition LeaderboardData.h:56
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseUploadLeaderboardDelegate, int32, SteamErrorOutput)
Definition SetLeaderboard.h:39
Definition LeaderboardData.h:68