View Single Post
04/29/16, 10:29 AM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,579
I added this code which seems to solve the problem. Not really happy with it, but at least it seems to work now.
Lua Code:
  1. SaveSettings() -- save and restore the settings when we leave an area through a loading screen, otherwise they may get messed up
  2.     RegisterForEvent(EVENT_PLAYER_ACTIVATED, function()
  3.         if(not GetGuiHidden(INGAME_GUI_NAME)) then
  4.             ApplyCustomSettings(savedSettings)
  5.         else
  6.             ApplyCustomSettings(DESIRED_SETTINGS)
  7.         end
  8.     end)
  9.     RegisterForEvent(EVENT_PLAYER_DEACTIVATED, function()
  10.         if(not GetGuiHidden(INGAME_GUI_NAME)) then
  11.             SaveSettings()
  12.         end
  13.     end)
  Reply With Quote