Fixed compilation error

This commit is contained in:
TjgL 2025-02-16 16:05:21 +01:00
parent 46247b0da4
commit 5cba1f9324
4 changed files with 21 additions and 7 deletions

Binary file not shown.

View File

@ -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);
}
}

View File

@ -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.

View File

@ -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;
};