Skip to content

Conversation

ryan-skabelund
Copy link

  • Added a 'Reset to Defaults' button to each mod's config page
  • Added a reset to default function to each ConfigProperty (C++)
  • Properties requiring a world reload when in-game do not reset
  • Fixed text flicker issue in textbox widgets during construction (notably when resetting, values appeared left-aligned briefly before centering).
  • Adjusted section widget spacing slightly for more consistent layout
  • Converted indentation to tabs for consistency

- Added a 'Reset to Defaults' button to each mod's config page
- Added a reset to default function to each ConfigProperty (C++)
- Properties requiring a world reload when in-game do not reset
- Fixed text flicker issue in textbox widgets during construction (notably when resetting, values appeared left-aligned briefly before centering).
- Adjusted section widget spacing slightly for more consistent layout
- Returns a bool from every ResetToDefault() to signal success or failure
- Simplified ResetToDefault() so it no longer requires a default property argument
- Added an Allow User Reset toggle on each config property
- Added IsSetToDefaultValue() and GetDefaultValueAsString() in UConfigProperty
- Added per-option reset buttons with tooltips showing default values and why reset is disabled if it is
- Moved the Reset to Defaults button to the bottom right corner to match the game options button
- Added confirmation popups. Shift+click skips confirmation
- Mod reset button now disables and shows a tooltip if all settings are set to their defaults.
- Updated to latest dev commit
@ryan-skabelund ryan-skabelund force-pushed the add-reset-config-button branch from 4f9e477 to b7af332 Compare August 1, 2025 14:24
@ryan-skabelund ryan-skabelund force-pushed the add-reset-config-button branch from eae368c to 601b096 Compare August 3, 2025 09:57
budak7273 and others added 6 commits August 5, 2025 23:57
…enabled. Hide default value when option is set to the default value. Expand array widget if collapsed on add/remove element.
- Clarified disabled mod/section tooltip when options require a world reload while in-game
- Added array expansion on mod/section reset
- Added section expansion on mod/section reset
- Replaced 'Custom Construct' with 'Update Value' for mod/section resets
Copy link
Member

@mircearoata mircearoata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Copying the Value to DefaultValue on load feels like the wrong way around to do it. It would make more sense for Value to be transient and DefaultValue to be the one set in the editor. The data would have to be migrated to the other field in PostLoad (a core redirect wouldn't work because it would hide the Value property from BP scripts)
  • !bAllowUserReset || !bParentSectionAllowsUserReset and bAllowUserReset && bParentSectionAllowsUserReset are used quite often both in cpp and in BP, so it would make sense to add a BlueprintCallable FORCEINLINE AllowsReset function returning bAllowUserReset && bParentSectionAllowsUserReset

}
// Set default values to inherit Allow User Reset
for (UConfigProperty* Property : DefaultValues) {
if (Property && !bAllowUserReset || !bParentSectionAllowsUserReset) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (Property && !bAllowUserReset || !bParentSectionAllowsUserReset) {
if (Property && (!bAllowUserReset || !bParentSectionAllowsUserReset)) {


/** If true, this property can be reset by the user from the Config Widget. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Configuration Property")
bool bAllowUserReset;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set to true in all config property BPs, so it makes sense to just make it true here by default.

Suggested change
bool bAllowUserReset;
bool bAllowUserReset = true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants