Space Plunder
Loading...
Searching...
No Matches
LeaderboardData.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
5#include "CoreMinimal.h"
7#include "LeaderboardData.generated.h"
8
9USTRUCT(BlueprintType)
11{
12 GENERATED_BODY()
13
14 UPROPERTY(BlueprintReadOnly, Category = "Steam Leaderboards")
15 int32 Rank = 0;
16 UPROPERTY(BlueprintReadOnly, Category = "Steam Leaderboards")
17 FString UserID = "UserID";
18 UPROPERTY(BlueprintReadOnly, Category = "Steam Leaderboards")
19 FString User = "User";
20 UPROPERTY(BlueprintReadOnly, Category = "Steam Leaderboards")
21 int32 Score = 0;
22};
23
24
25// the sort order of a leaderboard
26UENUM(BlueprintType, Category = "Simple Steam Stats & Achievements")
28{
30 LeaderboardSortMethodAscending = 1, // top-score is lowest number
31 LeaderboardSortMethodDescending = 2, // top-score is highest number
32};
33
34// type of data request, when downloading leaderboard entries
35UENUM(BlueprintType, Category = "Simple Steam Stats & Achievements")
43
44// the display type (used by the Steam Community web site) for a leaderboard
45UENUM(BlueprintType, Category = "Simple Steam Stats & Achievements")
47{
49 LeaderboardDisplayTypeNumeric = 1, // simple numerical score
50 LeaderboardDisplayTypeTimeSeconds = 2, // the score represents a time, in seconds
51 LeaderboardDisplayTypeTimeMilliSeconds = 3, // the score represents a time, in milliseconds
52};
53
54UENUM(BlueprintType, Category = "Simple Steam Stats & Achievements")
56{
58 LeaderboardUploadScoreMethodKeepBest = 1, // Leaderboard will keep user's best score
59 LeaderboardUploadScoreMethodForceUpdate = 2, // Leaderboard will always replace score with specified
60};
61
62
63// Define FSteamLeaderboard as a uint64 type
64typedef uint64 FSteamLeaderboard;
65
66USTRUCT(BlueprintType)
68{
69 GENERATED_BODY()
70
72
74 : Handle(0)
75 {
76 }
77
79 : Handle(InHandle)
80 {
81 }
82
83 bool IsValid() const
84 {
85 return Handle != 0;
86 }
87};
88
89USTRUCT(BlueprintType)
91{
92 GENERATED_BODY()
93
94 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="General")
95 FString LeaderboardName = "Default";
96 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="General")
97 bool bCreateIfNotFound = false;
98 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="General")
99 int32 StartNumber = 0;
100 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="General")
101 int32 EndNumber = 5;
102 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="General")
104 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="General")
106
107 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Leaderboard|General")
109 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Leaderboard|General")
110 TEnumAsByte<ESteamAvatarSize> AvatarSize = SteamAvatar_Medium;
111
112};
113
114
118class STATSINTEGRATION_API LeaderboardData
119{
120public:
121};
ESteamLeaderboardDisplayType
Definition LeaderboardData.h:47
@ LeaderboardDisplayTypeNumeric
Definition LeaderboardData.h:49
@ LeaderboardDisplayTypeTimeMilliSeconds
Definition LeaderboardData.h:51
@ LeaderboardDisplayTypeNone
Definition LeaderboardData.h:48
@ LeaderboardDisplayTypeTimeSeconds
Definition LeaderboardData.h:50
ESteamLeaderboardUploadScoreMethod
Definition LeaderboardData.h:56
@ LeaderboardUploadScoreMethodNone
Definition LeaderboardData.h:57
@ LeaderboardUploadScoreMethodKeepBest
Definition LeaderboardData.h:58
@ LeaderboardUploadScoreMethodForceUpdate
Definition LeaderboardData.h:59
ESteamLeaderboardDataRequest
Definition LeaderboardData.h:37
@ LeaderboardDataRequestGlobal
Definition LeaderboardData.h:38
@ LeaderboardDataRequestUsers
Definition LeaderboardData.h:41
@ LeaderboardDataRequestFriends
Definition LeaderboardData.h:40
@ LeaderboardDataRequestGlobalAroundUser
Definition LeaderboardData.h:39
ESteamLeaderboardSortMethod
Definition LeaderboardData.h:28
@ LeaderboardSortMethodAscending
Definition LeaderboardData.h:30
@ LeaderboardSortMethodDescending
Definition LeaderboardData.h:31
@ LeaderboardSortMethodNone
Definition LeaderboardData.h:29
uint64 FSteamLeaderboard
Definition LeaderboardData.h:64
ESteamAvatarSize
Definition SteamFriendsData.h:10
@ SteamAvatar_Medium
Definition SteamFriendsData.h:12
Definition LeaderboardData.h:119
Definition LeaderboardData.h:91
Definition LeaderboardData.h:11
Definition LeaderboardData.h:68
bool IsValid() const
Definition LeaderboardData.h:83
FSteamLeaderboardHandle(FSteamLeaderboard InHandle)
Definition LeaderboardData.h:78