Space Plunder
Loading...
Searching...
No Matches
FindLeaderboard.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#include "LeaderboardData.h"
25
26#if USING_CODE_ANALYSIS
27MSVC_PRAGMA(warning(pop))
28#endif
29
30#pragma pop_macro("ARRAY_COUNT")
31#include "FindLeaderboard.generated.h"
32
34DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FResponseFindLeaderboardDelegate, const FSteamLeaderboardHandle&, LeaderboardHandle, int32, SteamErrorOutput);
36UCLASS()
37class STATSINTEGRATION_API UFindLeaderboard : public UBlueprintAsyncActionBase
38{
39 GENERATED_BODY()
40
41public:
42 UPROPERTY(BlueprintAssignable)
43 FResponseFindLeaderboardDelegate OnSuccess;
44
45 UPROPERTY(BlueprintAssignable)
46 FResponseFindLeaderboardDelegate OnFailure;
47
48 /* Asynchronously downloads stats and achievements from the server. */
49 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
50 static UFindLeaderboard* FindOrCreateLeaderboard(FString Name, ESteamLeaderboardSortMethod SortMethod, ESteamLeaderboardDisplayType DisplayType);
51
52 /* Asynchronously downloads stats and achievements from the server. */
53 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
54 static UFindLeaderboard* FindLeaderboard(FString Name);
55
56private:
57 FOnlineSubsystemSteam* SteamSubsystem;
58 virtual void Activate() override;
59
61 FString LeaderboardName;
62 bool bCreateLeaderboard;
63 ESteamLeaderboardSortMethod LeaderboardSortMethod;
64 ESteamLeaderboardDisplayType LeaderboardDisplayType;
65
66 void FindLeaderboardByName();
67 void FindOrCreateLeaderboardByName();
68
69 void OnLeaderboardFound(LeaderboardFindResult_t* pCallback, bool bIOFailure);
70
71 CCallResult<UFindLeaderboard, LeaderboardFindResult_t> m_callFindResult;
72};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FResponseFindLeaderboardDelegate, const FSteamLeaderboardHandle &, LeaderboardHandle, int32, SteamErrorOutput)
ESteamLeaderboardDisplayType
Definition LeaderboardData.h:47
ESteamLeaderboardSortMethod
Definition LeaderboardData.h:28
Definition FindLeaderboard.h:38
Definition LeaderboardData.h:68