Skip to content

Commit

Permalink
rebirth delay playerConfig options saving in settings
Browse files Browse the repository at this point in the history
themeConfig options still save immediately because they are needed
  • Loading branch information
poco0317 committed May 26, 2024
1 parent 77a8c05 commit 6b79043
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2851,6 +2851,8 @@ local function rightFrame()
local modsToApplyAtExit = {}

local function checkModsToApply()
-- force save playerConfig
playerConfig:save()
local setGraphics = false
local setGame = nil
local setTheme = nil
Expand Down Expand Up @@ -2912,6 +2914,11 @@ local function rightFrame()
self:diffusealpha(0)
self:x(offscreenX)
end,
EndCommand = function(self)
-- apply options when exiting screen
-- sometimes, this throws you to the main menu
checkModsToApply()
end,
ShowRightCommand = function(self)
-- move on screen from right and go visible
self:finishtweening()
Expand Down Expand Up @@ -3221,7 +3228,8 @@ local function rightFrame()
local function setdataPLAYER(propertyname, val)
playerConfig:get_data()[propertyname] = val
playerConfig:set_dirty()
playerConfig:save()
-- save playerConfig when closing settings
-- playerConfig:save()
end
local function themeoption(category, propertyname)
return {get = getdataTHEME(category, propertyname), set = function(x) setdataTHEME(category, propertyname, x) end}
Expand Down

0 comments on commit 6b79043

Please sign in to comment.