When modifying mod options that are past the initial scroll view, the changes made to that option are not saved properly. After going through code (in file scripts\screens\redux\modconfigurationscreen.lua), currently it looks like the idx in the spinner's OnChanged call is used to index self.options based on the current widget view index, rather than the absolute index of the option being changed. A fix I did was store the idx from the ApplyDataToWidget function to the widget and load that idx inside widget.opt.spinner.OnChange to store the selected value to the correct mod option index.
Below is code a snippet:
-- file: scripts\screens\redux\modconfigurationscreen.lua local ModConfigurationScreen = Class(Screen, function(self, modname, client_config) -- ... local function ScrollWidgetsCtor(context, idx) -- ... widget:SetOnGainFocus(function(_) self.options_scroll_list:OnWidgetFocus(widget) widget:ApplyDescription() end) widget.index = idx -- Added widget.opt.spinner.OnChanged = function( _, data ) self.options[widget.index].value = data -- Changed from: self.options[idx].value = data widget.opt.data.selected_value = data widget.opt.spinner:SetHasModification(widget.opt.data.selected_value ~= widget.opt.data.initial_value) widget:ApplyDescription() self:MakeDirty() end widget.focus_forward = widget.opt return widget end local function ApplyDataToWidget(context, widget, data, idx) widget.opt.data = data if data then widget.index = idx -- Added -- ... end -- ... end -- ... end)
Steps to Reproduce
Install a mod with more than 12 options, open the mod's option configuration screen, scroll down, change the value of one of the options towards the end of the list, click apply, reopen the mod option list and notice that the change was not saved for the option.
Install a mod with more than 12 options, open the mod's option configuration screen, scroll down, change the value of one of the options towards the end of the list, click apply, reopen the mod option list and notice that the change was not saved for the option.
- 2
- 2
A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now