confused yet? i am
okay so heres the deal... in one file it creates the variable based on what resolution is set. it only does this once per first use of the UI, now then another file uses that variable to chose layouts. well for some reason the other file cant pick out the variables. also the addon = {} is also in another file... is that maybe the problem? do i need to make the variables global somehow? the file that is supposed to find the variables for the layouts lil chunk to do so looks like this,
lua Code:
local GPartyMainEvents = CreateFrame("Frame", nil, UIParent)
GPartyMainEvents:RegisterEvent("VARIABLES_LOADED")
GrimUI.GPartyMainEvents = GPartyMainEvents
GPartyMainEvents:SetScript("OnEvent", function(self)
if GrimUIData.GrimResolution == "1" then
GrimLayout1()
elseif GrimUIData.GrimResolution == "2" then
GrimLayout2()
else
GrimLayout1()
end
end)