From 5cba1f9324d936c5279aed67c773ee5faf2572b8 Mon Sep 17 00:00:00 2001 From: TjgL Date: Sun, 16 Feb 2025 16:05:21 +0100 Subject: [PATCH] Fixed compilation error --- Content/Legumix/MainMenu/UI/WBP_MainMenu.uasset | 4 ++-- Source/LegumeMix/Private/LMGameInstance.cpp | 6 +++--- Source/LegumeMix/Public/LMGameInstance.h | 4 ++-- Source/LegumeMix/Public/LMSaveGame.h | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Content/Legumix/MainMenu/UI/WBP_MainMenu.uasset b/Content/Legumix/MainMenu/UI/WBP_MainMenu.uasset index 9aa6082..c3f571a 100644 --- a/Content/Legumix/MainMenu/UI/WBP_MainMenu.uasset +++ b/Content/Legumix/MainMenu/UI/WBP_MainMenu.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:951c589ac9a19014db269c59d93a0a68ce5fb3c8cb32b0729152755905cf2741 -size 47441 +oid sha256:a5a818fea1e9fd2c9ab2805db0e16b903f3f4db8fb87b31d4fcd2b34674efc00 +size 54633 diff --git a/Source/LegumeMix/Private/LMGameInstance.cpp b/Source/LegumeMix/Private/LMGameInstance.cpp index 180c641..ca97c1d 100644 --- a/Source/LegumeMix/Private/LMGameInstance.cpp +++ b/Source/LegumeMix/Private/LMGameInstance.cpp @@ -28,15 +28,15 @@ void ULMGameInstance::AsyncSaveSettings() UGameplayStatics::AsyncSaveGameToSlot(SaveGame, SaveGameSlot, UserIndex, SavedDelegate); } -void ULMGameInstance::SettingsSaved_Implementation(const FString& SlotName, const int32 UserIndex, bool bSuccess) +void ULMGameInstance::SettingsSaved_Implementation(const FString& SlotName, const int32 Index, bool bSuccess) { if (!bSuccess) { - UE_LOG(LogTemp, Error, TEXT("Failed to save game settings %s with user %i."), *SlotName, UserIndex); + UE_LOG(LogTemp, Error, TEXT("Failed to save game settings %s with user %i."), *SlotName, Index); } else { - UE_LOG(LogTemp, Display, TEXT("Successfully saved game settings %s for user %i"), *SlotName, UserIndex); + UE_LOG(LogTemp, Display, TEXT("Successfully saved game settings %s for user %i"), *SlotName, Index); } } diff --git a/Source/LegumeMix/Public/LMGameInstance.h b/Source/LegumeMix/Public/LMGameInstance.h index d4b2bf6..fd400cb 100644 --- a/Source/LegumeMix/Public/LMGameInstance.h +++ b/Source/LegumeMix/Public/LMGameInstance.h @@ -30,11 +30,11 @@ public: /** * Callback called when a save is finalized. * @param SlotName The slot that was saved. - * @param UserIndex The user index assigned to the slot. + * @param Index The user index assigned to the slot. * @param bSuccess Whether the save succeeded or not. */ UFUNCTION(BlueprintNativeEvent, Category=Legumix) - void SettingsSaved(const FString& SlotName, int32 UserIndex, bool bSuccess); + void SettingsSaved(const FString& SlotName, int32 Index, bool bSuccess); /** * Load the save settings. diff --git a/Source/LegumeMix/Public/LMSaveGame.h b/Source/LegumeMix/Public/LMSaveGame.h index e128579..2e8c2cc 100644 --- a/Source/LegumeMix/Public/LMSaveGame.h +++ b/Source/LegumeMix/Public/LMSaveGame.h @@ -13,4 +13,18 @@ UCLASS() class LEGUMEMIX_API ULMSaveGame : public USaveGame { GENERATED_BODY() + +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Graphics") + FVector2D ScreenResolution; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio") + int MasterAudio; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio") + int MusicAudio; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Audio") + int FxAudio; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Legumix|Controls") + float MouseSensitivity; };