ESOUI SVN TaosGroupUltimate

[/] [trunk/] [TaosGroupUltimate/] [TaosGroupUltimate.lua] - Rev 27

Go to most recent revision | Compare with Previous | Blame | View Log

--[[
        Addon: Taos Group Ultimate
        Author: TProg Taonnor
        Created by @Taonnor
]]--

--[[
        Global variables
]]--
local MAJOR = "1"
local MINOR = "0"
local PATCH = "3"

local ISMOCKED = false

--[[
        Class TaosGroupUltimate
]]--
TaosGroupUltimate = TaosGroupUltimate or {}

--[[
        Class Members
]]--
TaosGroupUltimate.Name = "TaosGroupUltimate"

--[[
        TaosGroupUltimate:initialize initializes addon
]]--
function TaosGroupUltimate:initialize()
    -- Initialize logging
    DebugLogger.Initialize()
    --logTrace("TaosGroupUltimate:initialize")

    -- Initialize logic
    SettingsHandler.Initialize()
    GroupHandler.Initialize()
    MapPingHandler.Initialize(ISMOCKED)
    UltimateGroupHandler.Initialize()
    CommandsHandler.Initialize()

    -- Initialize ui
    SettingsWindow.Initialize(MAJOR, MINOR, PATCH)
    UltimateGroupMenu.Initialize()
    GroupUltimateSelector.Initialize(SettingsHandler.SavedVariables.Movable, 
                                     SettingsHandler.SavedVariables.SelectorPosX, 
                                     SettingsHandler.SavedVariables.SelectorPosY,
                                     SettingsHandler.SavedVariables.StaticUltimateID)
    SimpleList.Initialize(SettingsHandler.SavedVariables.Movable, 
                          SettingsHandler.SavedVariables.PosX, 
                          SettingsHandler.SavedVariables.PosY)
    SwimlaneList.Initialize(SettingsHandler.SavedVariables.Movable, 
                            SettingsHandler.SavedVariables.PosX, 
                            SettingsHandler.SavedVariables.PosY,
                            ISMOCKED)
    CompactSwimlaneList.Initialize(SettingsHandler.SavedVariables.Movable, 
                                   SettingsHandler.SavedVariables.PosX, 
                                   SettingsHandler.SavedVariables.PosY,
                                   ISMOCKED)

    logTrace("TaosGroupUltimate:initialized")
end

--[[
        OnAddOnLoaded if TaosGroupUltimate is loaded, initialize
]]--
local function OnAddOnLoaded(eventCode, addOnName)
        if addOnName == TaosGroupUltimate.Name then

        -- Unregister Loaded Callback
        EVENT_MANAGER:UnregisterForEvent(TaosGroupUltimate.Name, EVENT_ADD_ON_LOADED)

        -- Initialize
                TaosGroupUltimate:initialize()
        end
end

-- Register Loaded Callback
EVENT_MANAGER:RegisterForEvent(TaosGroupUltimate.Name, EVENT_ADD_ON_LOADED, OnAddOnLoaded);

Go to most recent revision | Compare with Previous | Blame