Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make configuration texts localizable #332

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Mods/SML/Source/SML/Public/Configuration/ConfigProperty.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ class SML_API UConfigProperty : public UObject {
public:
/** Display name of this property as it is visible to the user */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Configuration Property")
FString DisplayName;
FText DisplayName;

/** Tooltip visible to user hovering over this property */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Configuration Property", meta = (MultiLine = true))
FString Tooltip;
FText Tooltip;

/** Whenever this value is only editable from main menu and disabled for editing in pause menu */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Configuration Property")
uint8 bRequiresWorldReload: 1;

/** Whenever this value should be hidden in Widgets ( No User Input ) */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Configuration Property")
uint8 bHidden : 1;
uint8 bHidden : 1;

/** Describes value of this property for debugging purposes */
UFUNCTION(BlueprintPure, BlueprintNativeEvent)
Expand Down
6 changes: 3 additions & 3 deletions Mods/SML/Source/SML/Public/Configuration/ModConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ class SML_API UModConfiguration : public UObject {

/** Display name of this configuration, as it will be visible to user */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
FString DisplayName;
FText DisplayName;

/** Description of this configuration, can be empty */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
FString Description;
FText Description;

/** Root property of this configuration describing its values */
UPROPERTY(EditDefaultsOnly, Instanced, BlueprintReadOnly)
UConfigPropertySection* RootSection;

/** Custom Widget - placed at the Bottom of the Mod Config Widgets*/
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
TSubclassOf<UUserWidget> CustomWidget;
TSubclassOf<UUserWidget> CustomWidget;

#if WITH_EDITOR
virtual EDataValidationResult IsDataValid(TArray<FText>& ValidationErrors) override;
Expand Down