07-17-11, 10:20 AM | #1 |
Chatframes not saving position on reload
Greetings, I realize the title might be a bit missguiding, but it does actually have to do with lua
![]() so yeah basicly I'm struggling with getting my chatframes saved when using "my" lua file, if I remove reloadui from it etc it works fine until i reload(haven't tried loging out yet tho.) then it resets position and size back to original. so yeah was hoping perhaps you awesome people here on wowinterface could help me, as I've spent the last 4 hours googling search looking at others but not been able to find a solution. Thanks in advance! Code:
local fontsize = 11 local function fixchat() -- Setup Basic InGame settings FCF_ResetChatWindows() ChatFrame1:ClearAllPoints() ChatFrame1:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 90, 90) ChatFrame1:SetWidth(400) ChatFrame1:SetHeight(180) ChatFrame1:SetFrameLevel(20) ChatFrame1:SetUserPlaced(true) FCF_SetWindowName(ChatFrame2, "Combat") FCF_OpenNewWindow("RP") FCF_OpenNewWindow("Spam") FCF_OpenNewWindow("Loot") -- Font Size -- FCF_SetChatWindowFontSize(self, ChatFrame1, fontsize) FCF_SetChatWindowFontSize(self, ChatFrame2, fontsize) FCF_SetChatWindowFontSize(self, ChatFrame3, fontsize) FCF_SetChatWindowFontSize(self, ChatFrame4, fontsize) FCF_SetChatWindowFontSize(self, ChatFrame5, fontsize) -- Chat Window Alpha -- FCF_SetWindowAlpha(ChatFrame1, 0) FCF_SetWindowAlpha(ChatFrame2, 0) FCF_SetWindowAlpha(ChatFrame3, 0) FCF_SetWindowAlpha(ChatFrame4, 0) FCF_SetWindowAlpha(ChatFrame5, 0) -- Show class colors ToggleChatColorNamesByClassGroup(true, "SAY") ToggleChatColorNamesByClassGroup(true, "EMOTE") ToggleChatColorNamesByClassGroup(true, "YELL") ToggleChatColorNamesByClassGroup(true, "GUILD") ToggleChatColorNamesByClassGroup(true, "OFFICER") ToggleChatColorNamesByClassGroup(true, "GUILD_ACHIEVEMENT") ToggleChatColorNamesByClassGroup(true, "ACHIEVEMENT") ToggleChatColorNamesByClassGroup(true, "WHISPER") ToggleChatColorNamesByClassGroup(true, "PARTY") ToggleChatColorNamesByClassGroup(true, "PARTY_LEADER") ToggleChatColorNamesByClassGroup(true, "RAID") ToggleChatColorNamesByClassGroup(true, "RAID_LEADER") ToggleChatColorNamesByClassGroup(true, "RAID_WARNING") ToggleChatColorNamesByClassGroup(true, "BATTLEGROUND") ToggleChatColorNamesByClassGroup(true, "BATTLEGROUND_LEADER") ToggleChatColorNamesByClassGroup(true, "CHANNEL1") ToggleChatColorNamesByClassGroup(true, "CHANNEL2") ToggleChatColorNamesByClassGroup(true, "CHANNEL3") ToggleChatColorNamesByClassGroup(true, "CHANNEL4") -- Resets all the chat channels ChatFrame_RemoveAllMessageGroups(ChatFrame1) ChatFrame_RemoveAllChannels(ChatFrame1) ChatFrame_RemoveAllMessageGroups(ChatFrame2) ChatFrame_RemoveAllChannels(ChatFrame2) ChatFrame_RemoveAllMessageGroups(ChatFrame3) ChatFrame_RemoveAllChannels(ChatFrame3) ChatFrame_RemoveAllMessageGroups(ChatFrame4) ChatFrame_RemoveAllChannels(ChatFrame4) ChatFrame_RemoveAllMessageGroups(ChatFrame5) ChatFrame_RemoveAllChannels(ChatFrame5) ChatFrame_RemoveAllMessageGroups(ChatFrame6) ChatFrame_RemoveAllChannels(ChatFrame6) -- Setup 'General' Chat -- ChatFrame_RemoveChannel(ChatFrame1,"General") ChatFrame_RemoveChannel(ChatFrame1, "Trade") ChatFrame_RemoveChannel(ChatFrame1, "LocalDefense") ChatFrame_RemoveChannel(ChatFrame1, "LookingForGroup") ChatFrame_AddMessageGroup(ChatFrame1, "EMOTE") ChatFrame_AddMessageGroup(ChatFrame1, "SAY") ChatFrame_AddMessageGroup(ChatFrame1, "YELL") ChatFrame_AddMessageGroup(ChatFrame1, "GUILD") ChatFrame_AddMessageGroup(ChatFrame1, "OFFICER") ChatFrame_AddMessageGroup(ChatFrame1, "GUILD_ACHIEVEMENT") ChatFrame_AddMessageGroup(ChatFrame1, "WHISPER") ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_SAY") ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_EMOTE") ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_YELL") ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_WHISPER") ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_BOSS_EMOTE") ChatFrame_AddMessageGroup(ChatFrame1, "MONSTER_BOSS_WHISPER") ChatFrame_AddMessageGroup(ChatFrame1, "PARTY") ChatFrame_AddMessageGroup(ChatFrame1, "PARTY_LEADER") ChatFrame_AddMessageGroup(ChatFrame1, "RAID") ChatFrame_AddMessageGroup(ChatFrame1, "RAID_LEADER") ChatFrame_AddMessageGroup(ChatFrame1, "RAID_WARNING") ChatFrame_AddMessageGroup(ChatFrame1, "BATTLEGROUND") ChatFrame_AddMessageGroup(ChatFrame1, "BATTLEGROUND_LEADER") ChatFrame_AddMessageGroup(ChatFrame1, "BG_HORDE") ChatFrame_AddMessageGroup(ChatFrame1, "BG_ALLIANCE") ChatFrame_AddMessageGroup(ChatFrame1, "BG_NEUTRAL") ChatFrame_AddMessageGroup(ChatFrame1, "SYSTEM") ChatFrame_AddMessageGroup(ChatFrame1, "ERRORS") ChatFrame_AddMessageGroup(ChatFrame1, "AFK") ChatFrame_AddMessageGroup(ChatFrame1, "DND") ChatFrame_AddMessageGroup(ChatFrame1, "IGNORED") ChatFrame_AddMessageGroup(ChatFrame1, "ACHIEVEMENT") ChatFrame_AddMessageGroup(ChatFrame1, "BN_WHISPER") ChatFrame_AddMessageGroup(ChatFrame1, "BN_CONVERSATION") -- Setup the 'RP' Chat -- ChatFrame_AddMessageGroup(ChatFrame3, "EMOTE") ChatFrame_AddMessageGroup(ChatFrame3, "SAY") ChatFrame_AddMessageGroup(ChatFrame3, "YELL") ChatFrame_AddMessageGroup(ChatFrame3, "GUILD") ChatFrame_AddMessageGroup(ChatFrame3, "OFFICER") ChatFrame_AddMessageGroup(ChatFrame3, "WHISPER") ChatFrame_AddMessageGroup(ChatFrame3, "PARTY") ChatFrame_AddMessageGroup(ChatFrame3, "PARTY_LEADER") ChatFrame_AddMessageGroup(ChatFrame3, "RAID") ChatFrame_AddMessageGroup(ChatFrame3, "RAID_LEADER") ChatFrame_AddMessageGroup(ChatFrame3, "RAID_WARNING") ChatFrame_AddMessageGroup(ChatFrame3, "BATTLEGROUND") ChatFrame_AddMessageGroup(ChatFrame3, "BATTLEGROUND_LEADER") ChatFrame_AddMessageGroup(ChatFrame3, "BG_HORDE") ChatFrame_AddMessageGroup(ChatFrame3, "BG_ALLIANCE") ChatFrame_AddMessageGroup(ChatFrame3, "BG_NEUTRAL") ChatFrame_AddMessageGroup(ChatFrame3, "SYSTEM") ChatFrame_AddMessageGroup(ChatFrame3, "ERRORS") ChatFrame_AddMessageGroup(ChatFrame3, "AFK") ChatFrame_AddMessageGroup(ChatFrame3, "DND") ChatFrame_AddMessageGroup(ChatFrame3, "IGNORED") -- Setup the 'spam' Chat -- ChatFrame_AddChannel(ChatFrame4, "Trade") ChatFrame_AddChannel(ChatFrame4, "General") ChatFrame_AddChannel(ChatFrame4, "LocalDefense") ChatFrame_AddChannel(ChatFrame4, "LookingForGroup") -- Setup the 'Loot' Chat -- ChatFrame_AddMessageGroup(ChatFrame5, "LOOT") ChatFrame_AddMessageGroup(ChatFrame5, "MONEY") -- Setup General, Trade, and LFG colors -- ChangeChatColor("CHANNEL1", 0/255, 153/255, 204/255) ChangeChatColor("CHANNEL2", 0/255, 153/255, 204/255) ChangeChatColor("CHANNEL4", 0/255, 153/255, 204/255) ReloadUI() end SLASH_FIXCHAT1 = "/fixchat" SlashCmdList["FIXCHAT"] = function() fixchat() ReloadUI() end
__________________
![]() ![]() |
|
![]() |
07-17-11, 03:27 PM | #2 |
Try this after you move/resize a chatframe.
Code:
FCF_SavePositionAndDimensions(ChatFrame1) |
|
![]() |
07-17-11, 03:51 PM | #3 |
ahh cheers thanks man!
feel a bit stupid right now for not looking more into the FCF options >__< thanks a lot that worked perfectly ;-)
__________________
![]() ![]() |
|
![]() |
WoWInterface » Developer Discussions » Lua/XML Help » Chatframes not saving position on reload |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
![]() |
![]() |
![]() |
|
|