Bah. option panel fix

Wobin [05-23-14 - 17:24]
Bah. option panel fix
Filename
GuildChat.lua
diff --git a/GuildChat.lua b/GuildChat.lua
index 850bba3..8080141 100644
--- a/GuildChat.lua
+++ b/GuildChat.lua
@@ -63,17 +63,6 @@ end

 function GuildChat:Register()
 	LC:registerName(function(...) return GuildChat:GetName(...) end)
-
-	local panel = LAM:CreateControlPanel("GuildChatMenu", "Guild Chat")
-
-	LAM:AddHeader(panel, "GuildChatOptions", "Chat Options")
-	LAM:AddDropdown(panel, "charName", "Set the name to be ",
-						"Guild Chat can display Account or Character name",
-						{"account", "character"}, function() return GuildChat.settings.characterName end,
-						function(valueString) GuildChat.settings.characterName = valueString end)
-	LAM:AddCheckbox(panel, "showGuildRank", "Show Guild Rank", "Include a rank indicator",
-						function() return GuildChat.settings.guildRank end,
-						function(value) GuildChat.settings.guildRank = not GuildChat.settings.guildRank end)
 end

 function GuildChat:Loaded(...)
@@ -86,6 +75,16 @@ function GuildChat:Loaded(...)
 	}

 	GuildChat.settings = ZO_SavedVars:NewAccountWide('GuildChat_Settings', 2, nil, defaults)
+	local panel = LAM:CreateControlPanel("GuildChatMenu", "Guild Chat")
+
+	LAM:AddHeader(panel, "GuildChatOptions", "Chat Options")
+	LAM:AddDropdown(panel, "charName", "Set the name to be ",
+						"Guild Chat can display Account or Character name",
+						{"account", "character"}, function() return GuildChat.settings.characterName end,
+						function(valueString) GuildChat.settings.characterName = valueString end)
+	LAM:AddCheckbox(panel, "showGuildRank", "Show Guild Rank", "Include a rank indicator",
+						function() return GuildChat.settings.guildRank end,
+						function(value) GuildChat.settings.guildRank = not GuildChat.settings.guildRank end)
 end

 EVENT_MANAGER:RegisterForEvent("GuildChatLoaded", EVENT_ADD_ON_LOADED, function(...) GuildChat:Loaded(...) end)