Space Plunder
Loading...
Searching...
No Matches
IndicateAchievementProgress.h
Go to the documentation of this file.
1// Copyright 2021 Artur 'NijoMeisteR' Dworaczek. All Rights Reserved.
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 "Kismet/BlueprintAsyncActionBase.h"
10#include "SteamRequests.h"
11#pragma push_macro("ARRAY_COUNT")
12#undef ARRAY_COUNT
13
14#if USING_CODE_ANALYSIS
15MSVC_PRAGMA(warning(push))
16MSVC_PRAGMA(warning(disable : ALL_CODE_ANALYSIS_WARNINGS))
17#endif
18
19#include "OnlineSubsystemSteam.h"
20#include <steam/steam_api.h>
21
22#if USING_CODE_ANALYSIS
23MSVC_PRAGMA(warning(pop))
24#endif
25
26
27#pragma pop_macro("ARRAY_COUNT")
28#include "IndicateAchievementProgress.generated.h"
29
31DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseIndicateAchievementProgressDelegate, int32, SteamErrorOutput);
32
34UCLASS()
35class STATSINTEGRATION_API UIndicateAchievementProgress : public UBlueprintAsyncActionBase
36{
37 GENERATED_BODY()
38
39public:
40 UPROPERTY(BlueprintAssignable)
41 FResponseIndicateAchievementProgressDelegate onSuccess;
42
43 UPROPERTY(BlueprintAssignable)
44 FResponseIndicateAchievementProgressDelegate onFailure;
45
46 /* Shows the user a pop-up notification with the current progress of an achievement. Calling this function will NOT set the progress or unlock the achievement, the game must do that manually by calling Set Stat / Set Achievement! */
47 UFUNCTION(BlueprintCallable, meta = (BlueprintInternalUseOnly = "true"), Category = "Simple Steam Stats & Achievements")
48 static UIndicateAchievementProgress* IndicateUserAchievementProgress(FString AchievementAPIName, int32 CurrentProgress, int32 MaxProgress);
49
50 UPROPERTY()
51 FString achievementAPIName;
52
53 UPROPERTY()
54 int32 currentProgress;
55
56 UPROPERTY()
57 int32 maxProgress;
58private:
59 bool bFetchedStatsOrAchievements;
60 FOnlineSubsystemSteam* SteamSubsystem;
61
62 virtual void Activate() override;
63
64 void UnregisterAllCallbacks();
65
66 STEAM_CALLBACK_MANUAL(UIndicateAchievementProgress, OnUserStatsStored, UserStatsStored_t, UserStatsStored);
67 STEAM_CALLBACK_MANUAL(UIndicateAchievementProgress, OnUserAchievementsStored, UserAchievementStored_t, UserAchievementsStored);
68};
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FResponseIndicateAchievementProgressDelegate, int32, SteamErrorOutput)
Definition IndicateAchievementProgress.h:36