Skip to content

Commit 0405455

Browse files
Add 'Reset to Defaults' button for mod configs (#364)
* Add 'Reset to Defaults' button for mod configs - 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 * Improved Reset to Default Functionality - 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 * Fix UConfigPropertyClass Reset to Default Crash * Disable reset button with tooltip when settings are default - Mod reset button now disables and shows a tooltip if all settings are set to their defaults. - Updated to latest dev commit * Update config property editor tooltips. Mark bParentSectionAllowsUserReset as Transient * Prevent DefaultValue from appearing in the editor. Update editor tooltips. Change display name of ArrayProperty `DefaultValue` to `New Value Template` * Unset 'Hidden' on ExampleMod root config property (how in the world has it been showing all this time?!) * Fix enum default value display to use name instead of integer * Add section reset and collapse buttons * Tooltip for expand/collapse section button * Fix example array elements requiring world reload, add name to first element as a demo of the tooltip showing it * Change array element tooltip to display position#, not index * Switch confirm messages to format text instead of string append for i18n * Fix extra space at the end of "Nested Horizontal" section name * Fix array tooltip, improve array default value validator * Improve detection for resettable child properties in sections * Add collapse/expand button to array widgets * Improve array reset button * Config reset button to use `Update Values` instead of `Custom Construct` This fixes integer enums not resetting properly and also aligns better with the overall design flow * Consistent phrasing: "options". Add a tooltip for when the button is enabled. Hide default value when option is set to the default value. Expand array widget if collapsed on add/remove element. * Add comments for redundant tooltip cases * Add tooltip for when only hidden config options remain resettable * Add tooltip for config section with some non-default options that can't be reset * Improve mod/section reset behavior and clarify related tooltips - 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 * Migrate Value to DefaultValue * Show border when config property section is collapsed --------- Co-authored-by: Rob B <computerguy440+gh@gmail.com>
1 parent 2ea6e03 commit 0405455

43 files changed

Lines changed: 496 additions & 78 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1.62 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)