diff --git a/TaosGroupTools/TaosGroupTools.lua b/TaosGroupTools/TaosGroupTools.lua index 864ea86..e82ccfa 100644 --- a/TaosGroupTools/TaosGroupTools.lua +++ b/TaosGroupTools/TaosGroupTools.lua @@ -8,27 +8,27 @@ Global variables ]]-- -- Callbacks -TGU_MAP_PING_CHANGED = "TGU-MapPingChanged" -TGU_PLAYER_DATA_CHANGED = "TGU-PlayerDataChanged" -TGU_STYLE_CHANGED = "TGU-StyleChanged" -TGU_MOVABLE_CHANGED = "TGU-MovableChanged" -TGU_IS_ZONE_CHANGED = "TGU-IsZoneChanged" -TGU_STATIC_ULTIMATE_ID_CHANGED = "TGU-StaticUltimateIDChanged" -TGU_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED = "TGU-SwimlaneUltimateGroupIdChanged" -TGU_SHOW_ULTIMATE_GROUP_MENU = "TGU-ShowUltimateGroupMenu" -TGU_SET_ULTIMATE_GROUP = "TGU-SetUltimateGroup" +TGT_MAP_PING_CHANGED = "TGT-MapPingChanged" +TGT_PLAYER_DATA_CHANGED = "TGT-PlayerDataChanged" +TGT_STYLE_CHANGED = "TGT-StyleChanged" +TGT_MOVABLE_CHANGED = "TGT-MovableChanged" +TGT_IS_ZONE_CHANGED = "TGT-IsZoneChanged" +TGT_STATIC_ULTIMATE_ID_CHANGED = "TGT-StaticUltimateIDChanged" +TGT_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED = "TGT-SwimlaneUltimateGroupIdChanged" +TGT_SHOW_ULTIMATE_GROUP_MENU = "TGT-ShowUltimateGroupMenu" +TGT_SET_ULTIMATE_GROUP = "TGT-SetUltimateGroup" --[[ Local variables ]]-- -local MAJOR = "1" -local MINOR = "5" -local PATCH = "1" +local MAJOR = "0" +local MINOR = "1" +local PATCH = "0" local ISMOCKED = false -local LOG_NAME = "TGU-DebugLogger" -local LOG_COMMAND = "/tgulogs" +local LOG_NAME = "TGT-DebugLogger" +local LOG_COMMAND = "/tgtlogs" local TRACE_ACTIVE = false local DEBUG_ACTIVE = false local ERROR_ACTIVE = true @@ -36,61 +36,61 @@ local DIRECT_PRINT = true local CATCH_LUA_ERRORS = false --[[ - Table TaosGroupUltimate + Table TaosGroupTools ]]-- -TaosGroupUltimate = {} -TaosGroupUltimate.__index = TaosGroupUltimate +TaosGroupTools = {} +TaosGroupTools.__index = TaosGroupTools --[[ Table Members ]]-- -TaosGroupUltimate.Name = "TaosGroupTools" +TaosGroupTools.Name = "TaosGroupTools" --[[ - TaosGroupUltimate:initialize initializes addon + TaosGroupTools:initialize initializes addon ]]-- -function TaosGroupUltimate:initialize() +function TaosGroupTools:initialize() -- Initialize logging local logger = TaosDebugLogger(LOG_NAME, LOG_COMMAND, TRACE_ACTIVE, DEBUG_ACTIVE, ERROR_ACTIVE, DIRECT_PRINT, CATCH_LUA_ERRORS) - logger:logTrace("TaosGroupUltimate:initialize") + logger:logTrace("TaosGroupTools:initialize") -- Initialize settings - TGU_SettingsHandler.Initialize(logger) + TGT_SettingsHandler.Initialize(logger) -- Initialize communication - TGU_Communicator.Initialize(logger, ISMOCKED) + TGT_Communicator.Initialize(logger, ISMOCKED) -- Initialize logic - TGU_MapPingHandler.Initialize(logger, ISMOCKED) - TGU_UltimateGroupHandler.Initialize(logger) - TGU_CommandsHandler.Initialize(logger) + TGT_MapPingHandler.Initialize(logger, ISMOCKED) + TGT_UltimateGroupHandler.Initialize(logger) + TGT_CommandsHandler.Initialize(logger) -- Initialize ui - TGU_SettingsWindow.Initialize(logger, MAJOR, MINOR, PATCH) + TGT_SettingsWindow.Initialize(logger, MAJOR, MINOR, PATCH) - TGU_UltimateGroupMenu.Initialize(logger) - TGU_GroupUltimateSelector.Initialize(logger) + TGT_UltimateGroupMenu.Initialize(logger) + TGT_GroupUltimateSelector.Initialize(logger) - TGU_SimpleList.Initialize(logger, ISMOCKED) - TGU_SwimlaneList.Initialize(logger, ISMOCKED) - TGU_CompactSwimlaneList.Initialize(logger, ISMOCKED) + TGT_SimpleList.Initialize(logger, ISMOCKED) + TGT_SwimlaneList.Initialize(logger, ISMOCKED) + TGT_CompactSwimlaneList.Initialize(logger, ISMOCKED) - logger:logTrace("TaosGroupUltimate:initialized") + logger:logTrace("TaosGroupTools:initialized") end --[[ - OnAddOnLoaded if TaosGroupUltimate is loaded, initialize + OnAddOnLoaded if TaosGroupTools is loaded, initialize ]]-- local function OnAddOnLoaded(eventCode, addOnName) - if addOnName == TaosGroupUltimate.Name then + if addOnName == TaosGroupTools.Name then -- Unregister Loaded Callback - EVENT_MANAGER:UnregisterForEvent(TaosGroupUltimate.Name, EVENT_ADD_ON_LOADED) + EVENT_MANAGER:UnregisterForEvent(TaosGroupTools.Name, EVENT_ADD_ON_LOADED) -- Initialize - TaosGroupUltimate:initialize() + TaosGroupTools:initialize() end end -- Register Loaded Callback -EVENT_MANAGER:RegisterForEvent(TaosGroupUltimate.Name, EVENT_ADD_ON_LOADED, OnAddOnLoaded); \ No newline at end of file +EVENT_MANAGER:RegisterForEvent(TaosGroupTools.Name, EVENT_ADD_ON_LOADED, OnAddOnLoaded); \ No newline at end of file diff --git a/TaosGroupTools/TaosGroupTools.txt b/TaosGroupTools/TaosGroupTools.txt index 2b5dfd9..980e369 100644 --- a/TaosGroupTools/TaosGroupTools.txt +++ b/TaosGroupTools/TaosGroupTools.txt @@ -50,4 +50,4 @@ ui/CompactSwimlaneList.xml ui/CompactSwimlaneList.lua ui/UltimateGroupMenu.lua -TaosGroupUltimate.lua \ No newline at end of file +TaosGroupTools.lua \ No newline at end of file diff --git a/TaosGroupTools/communication/Communicator.lua b/TaosGroupTools/communication/Communicator.lua index f583ed1..41f8c1a 100644 --- a/TaosGroupTools/communication/Communicator.lua +++ b/TaosGroupTools/communication/Communicator.lua @@ -25,23 +25,23 @@ local ABILITY_COEFFICIENT = 100 local ULTIMATE_COEFFICIENT = 1000 --[[ - Table TGU_Communicator + Table TGT_Communicator ]]-- -TGU_Communicator = {} -TGU_Communicator.__index = TGU_Communicator +TGT_Communicator = {} +TGT_Communicator.__index = TGT_Communicator --[[ Table Members ]]-- -TGU_Communicator.Name = "TGU-Communicator" -TGU_Communicator.IsMocked = false +TGT_Communicator.Name = "TGT-Communicator" +TGT_Communicator.IsMocked = false --[[ Called on map ping from LibMapPing ]]-- -function TGU_Communicator.OnMapPing(pingType, pingTag, offsetX, offsetY, isLocalPlayerOwner) +function TGT_Communicator.OnMapPing(pingType, pingTag, offsetX, offsetY, isLocalPlayerOwner) if (LOG_ACTIVE) then - _logger:logTrace("TGU_Communicator.OnMapPing") + _logger:logTrace("TGT_Communicator.OnMapPing") _logger:logDebug("pingTag; offsetX; offsetY", pingTag, offsetX, offsetY) end @@ -59,19 +59,19 @@ function TGU_Communicator.OnMapPing(pingType, pingTag, offsetX, offsetY, isLocal LMP:SuppressPing(pingType, pingTag) if (LMP:IsPositionOnMap(offsetX, offsetY) and - TGU_Communicator.IsPossiblePing(offsetX, offsetY)) then + TGT_Communicator.IsPossiblePing(offsetX, offsetY)) then - local abilityPing = TGU_Communicator.GetAbilityPing(offsetX) - local relativeUltimate = TGU_Communicator.GetRelativeUltimate(offsetY) + local abilityPing = TGT_Communicator.GetAbilityPing(offsetX) + local relativeUltimate = TGT_Communicator.GetRelativeUltimate(offsetY) if (LOG_ACTIVE) then _logger:logDebug("pingTag; abilityPing; relativeUltimate", pingTag, abilityPing, relativeUltimate) end if (abilityPing ~= -1 and relativeUltimate ~= -1) then - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, pingTag, abilityPing, relativeUltimate) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, pingTag, abilityPing, relativeUltimate) else - _logger:logError("TGU_Communicator.OnMapPing, Ping invalid abilityPing: " .. tostring(abilityPing) .. "; relativeUltimate: " .. tostring(relativeUltimate)) + _logger:logError("TGT_Communicator.OnMapPing, Ping invalid abilityPing: " .. tostring(abilityPing) .. "; relativeUltimate: " .. tostring(relativeUltimate)) end end end @@ -80,17 +80,17 @@ end --[[ Called on map ping from LibMapPing ]]-- -function TGU_Communicator.OnMapPingFinished(pingType, pingTag, offsetX, offsetY, isLocalPlayerOwner) +function TGT_Communicator.OnMapPingFinished(pingType, pingTag, offsetX, offsetY, isLocalPlayerOwner) offsetX, offsetY = LMP:GetMapPing(pingType, pingTag) -- load from LMP, because offsetX, offsetY from PING_EVENT_REMOVED are 0,0 if (LOG_ACTIVE) then - _logger:logTrace("TGU_Communicator.OnMapPingFinished") + _logger:logTrace("TGT_Communicator.OnMapPingFinished") --_logger:logDebug("pingType; pingTag; offsetX; offsetY", pingType, pingTag, offsetX, offsetY) end if (pingType == MAP_PIN_TYPE_PING and LMP:IsPositionOnMap(offsetX, offsetY) and - TGU_Communicator.IsPossiblePing(offsetX, offsetY)) then + TGT_Communicator.IsPossiblePing(offsetX, offsetY)) then if (LOG_ACTIVE) then _logger:logDebug("UnsuppressPing ->", pingType, pingTag) @@ -103,9 +103,9 @@ end --[[ Called on refresh of timer ]]-- -function TGU_Communicator.SendData(abilityGroup) +function TGT_Communicator.SendData(abilityGroup) if (LOG_ACTIVE) then - _logger:logTrace("TGU_Communicator.SendData") + _logger:logTrace("TGT_Communicator.SendData") --_logger:logDebug("abilityGroup", abilityGroup) end @@ -114,8 +114,8 @@ function TGU_Communicator.SendData(abilityGroup) local abilityCost = math.max(1, GetAbilityCost(abilityGroup.GroupAbilityId)) -- Mocked - if (TGU_Communicator.IsMocked) then - TGU_Communicator.SendFakePings() + if (TGT_Communicator.IsMocked) then + TGT_Communicator.SendFakePings() -- Standard communication else local relativeUltimate = math.floor((current / abilityCost) * 100) @@ -138,7 +138,7 @@ function TGU_Communicator.SendData(abilityGroup) --_logger:logDebug("ultimatePing", ultimatePing) end - LGPS:PushCurrentMap() + LGPS:PushCurrentMap() SetMapToMapListIndex(GetUnitZoneIndex("player")) LMP:SetMapPing(MAP_PIN_TYPE_PING, MAP_TYPE_LOCATION_CENTERED, abilityPing, ultimatePing) @@ -146,16 +146,16 @@ function TGU_Communicator.SendData(abilityGroup) LGPS:PopCurrentMap() end else - _logger:logError("TGU_Communicator.SendData, abilityGroup is nil.") + _logger:logError("TGT_Communicator.SendData, abilityGroup is nil.") end end --[[ Check if map ping is in possible range ]]-- -function TGU_Communicator.IsPossiblePing(offsetX, offsetY) +function TGT_Communicator.IsPossiblePing(offsetX, offsetY) if (LOG_ACTIVE) then - --_logger:logTrace("TGU_Communicator.IsPossiblePing") + --_logger:logTrace("TGT_Communicator.IsPossiblePing") --_logger:logDebug("offsetX; offsetY", offsetX, offsetY) end @@ -173,9 +173,9 @@ end --[[ Gets ability ID ]]-- -function TGU_Communicator.GetAbilityPing(offset) +function TGT_Communicator.GetAbilityPing(offset) if (LOG_ACTIVE) then - --_logger:logTrace("TGU_Communicator.GetAbilityPing") + --_logger:logTrace("TGT_Communicator.GetAbilityPing") --_logger:logDebug("offset", offset) end @@ -196,9 +196,9 @@ end --[[ Gets relative ultimate ]]-- -function TGU_Communicator.GetRelativeUltimate(offset) +function TGT_Communicator.GetRelativeUltimate(offset) if (LOG_ACTIVE) then - --_logger:logTrace("TGU_Communicator.GetRelativeUltimate") + --_logger:logTrace("TGT_Communicator.GetRelativeUltimate") --_logger:logDebug("offset", offset) end @@ -222,52 +222,52 @@ end --[[ Sends fake pings for all group members ]]-- -function TGU_Communicator.SendFakePings() - if (LOG_ACTIVE) then _logger:logTrace("TGU_Communicator.SendFakePings") end +function TGT_Communicator.SendFakePings() + if (LOG_ACTIVE) then _logger:logTrace("TGT_Communicator.SendFakePings") end - local ultimateGroups = TGU_UltimateGroupHandler.GetUltimateGroups() + local ultimateGroups = TGT_UltimateGroupHandler.GetUltimateGroups() -- Directly send to test only UI - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group1", ultimateGroups[1].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group2", ultimateGroups[1].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group3", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group4", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group5", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group6", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group7", ultimateGroups[6].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group8", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group9", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group10", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group11", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group12", ultimateGroups[6].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group13", ultimateGroups[16].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group14", ultimateGroups[16].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group15", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group16", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group17", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group18", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group19", ultimateGroups[13].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group20", ultimateGroups[13].GroupAbilityPing, 100) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group21", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group22", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group23", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) - CALLBACK_MANAGER:FireCallbacks(TGU_MAP_PING_CHANGED, "group24", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group1", ultimateGroups[1].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group2", ultimateGroups[1].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group3", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group4", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group5", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group6", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group7", ultimateGroups[6].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group8", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group9", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group10", ultimateGroups[6].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group11", ultimateGroups[1].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group12", ultimateGroups[6].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group13", ultimateGroups[16].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group14", ultimateGroups[16].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group15", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group16", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group17", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group18", ultimateGroups[16].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group19", ultimateGroups[13].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group20", ultimateGroups[13].GroupAbilityPing, 100) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group21", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group22", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group23", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) + CALLBACK_MANAGER:FireCallbacks(TGT_MAP_PING_CHANGED, "group24", ultimateGroups[13].GroupAbilityPing, math.random(90, 100)) end --[[ - Initialize initializes TGU_Communicator + Initialize initializes TGT_Communicator ]]-- -function TGU_Communicator.Initialize(logger, isMocked) +function TGT_Communicator.Initialize(logger, isMocked) if (LOG_ACTIVE) then - logger:logTrace("TGU_Communicator.Initialize") + logger:logTrace("TGT_Communicator.Initialize") logger:logDebug("isMocked", isMocked) end _logger = logger - TGU_Communicator.IsMocked = isMocked + TGT_Communicator.IsMocked = isMocked -- Register events - LMP:RegisterCallback("BeforePingAdded", TGU_Communicator.OnMapPing) - LMP:RegisterCallback("AfterPingRemoved", TGU_Communicator.OnMapPingFinished) + LMP:RegisterCallback("BeforePingAdded", TGT_Communicator.OnMapPing) + LMP:RegisterCallback("AfterPingRemoved", TGT_Communicator.OnMapPingFinished) end \ No newline at end of file diff --git a/TaosGroupTools/i18n/de.lua b/TaosGroupTools/i18n/de.lua index 7f1f34f..e3554c1 100644 --- a/TaosGroupTools/i18n/de.lua +++ b/TaosGroupTools/i18n/de.lua @@ -2,47 +2,47 @@ -- Options local strings = { - TGU_OPTIONS_HEADER = "Optionen", - TGU_OPTIONS_DRAG_LABEL = "Elemente verschieben", - TGU_OPTIONS_DRAG_TOOLTIP = "Wenn die Option aktiviert ist, können alle Elemente verschoben werden.", - TGU_OPTIONS_ONLY_AVA_LABEL = "Nur im AvA Gebiet anzeigen", - TGU_OPTIONS_ONLY_AVA_TOOLTIP = "Wenn die Option aktiviert ist, sind alle Elemente nur in Cyrodiil (AvA) sichtbar.", - TGU_OPTIONS_USE_SORTING_LABEL = "Listen nach Ulti-Fortschritt sortieren", - TGU_OPTIONS_USE_SORTING_TOOLTIP = "Wenn die Option aktiviert ist, werden alle Listen nach Ulti-Fortschritt sortiert (Volle Ultis oben).", - TGU_OPTIONS_STYLE_LABEL = "Style auswählen", - TGU_OPTIONS_STYLE_TOOLTIP = "Wähle den gewünschten Style aus. Simple-Liste, Schwimmbahn-Liste oder Kompakte Schwimmbahn-Liste", - TGU_OPTIONS_STYLE_SIMPLE = "Simple-Liste", - TGU_OPTIONS_STYLE_SWIM = "Schwimmbahn-Liste", - TGU_OPTIONS_STYLE_SHORT_SWIM = "Kompakte Schwimmbahn-Liste", - TGU_DESCRIPTIONS_NEGATE = "Magienegation Ultimates der Zauberer Klasse", - TGU_DESCRIPTIONS_ATRO = "Atronach Ultimates der Zauberer Klasse", - TGU_DESCRIPTIONS_OVER = "Überladung Ultimates der Zauberer Klasse", - TGU_DESCRIPTIONS_SWEEP = "Schwung Ultimates der Templer Klasse", - TGU_DESCRIPTIONS_NOVA = "Nova Ultimates der Templer Klasse", - TGU_DESCRIPTIONS_TPHEAL = "Heil Ultimates der Templer Klasse", - TGU_DESCRIPTIONS_STAND = "Standarten Ultimates der Drachenritter Klasse", - TGU_DESCRIPTIONS_LEAP = "Drachensprung Ultimates der Drachenritter Klasse", - TGU_DESCRIPTIONS_MAGMA = "Magma Ultimates der Drachenritter Klasse", - TGU_DESCRIPTIONS_STROKE = "Todesstoß Ultimates der Nachtklingen Klasse", - TGU_DESCRIPTIONS_VEIL = "Schleier Ultimates der Nachtklingen Klasse", - TGU_DESCRIPTIONS_NBSOUL = "Seelenfetzen Ultimates der Nachtklingen Klasse", - TGU_DESCRIPTIONS_FREEZE = "Sturm Ultimates der Hüter Klasse", - TGU_DESCRIPTIONS_WDHEAL = "Hain Ultimates der Hüter Klasse", - TGU_DESCRIPTIONS_ICE = "Frost Ultimates des Zerstörungsstabes", - TGU_DESCRIPTIONS_FIRE = "Feuer Ultimates des Zerstörungsstabes", - TGU_DESCRIPTIONS_LIGHT = "Blitz Ultimates des Zerstörungsstabes", - TGU_DESCRIPTIONS_STHEAL = "Heil Ultimates des Heilstabes", - TGU_DESCRIPTIONS_BERSERK = "Berserker Ultimates des Zweihänders", - TGU_DESCRIPTIONS_SHIELD = "Schild Ultimates von Einhand und Schild", - TGU_DESCRIPTIONS_DUAL = "Zerfleischen Ultimates von Zwei Waffen", - TGU_DESCRIPTIONS_BOW = "Schnellfeuer Ultimates von Bogen", - TGU_DESCRIPTIONS_SOUL = "Seelenschlag Ultimates aus der Seelenmagie Linie", - TGU_DESCRIPTIONS_WERE = "Werwolfverwandlung Ultimates aus der Werwolf Linie", - TGU_DESCRIPTIONS_VAMP = "Schwarm Ultimates aus der Vampir Linie", - TGU_DESCRIPTIONS_METEOR = "Meteor Ultimates aus der Magiergilde", - TGU_DESCRIPTIONS_DAWN = "Dämmerbrecher Ultimates aus der Kriegergilde", - TGU_DESCRIPTIONS_BARRIER = "Barriere Ultimates aus der Unterstützung Linie", - TGU_DESCRIPTIONS_HORN = "Kriegshorn Ultimates aus der Sturmangriff Linie" + TGT_OPTIONS_HEADER = "Optionen", + TGT_OPTIONS_DRAG_LABEL = "Elemente verschieben", + TGT_OPTIONS_DRAG_TOOLTIP = "Wenn die Option aktiviert ist, können alle Elemente verschoben werden.", + TGT_OPTIONS_ONLY_AVA_LABEL = "Nur im AvA Gebiet anzeigen", + TGT_OPTIONS_ONLY_AVA_TOOLTIP = "Wenn die Option aktiviert ist, sind alle Elemente nur in Cyrodiil (AvA) sichtbar.", + TGT_OPTIONS_USE_SORTING_LABEL = "Listen nach Ulti-Fortschritt sortieren", + TGT_OPTIONS_USE_SORTING_TOOLTIP = "Wenn die Option aktiviert ist, werden alle Listen nach Ulti-Fortschritt sortiert (Volle Ultis oben).", + TGT_OPTIONS_STYLE_LABEL = "Style auswählen", + TGT_OPTIONS_STYLE_TOOLTIP = "Wähle den gewünschten Style aus. Simple-Liste, Schwimmbahn-Liste oder Kompakte Schwimmbahn-Liste", + TGT_OPTIONS_STYLE_SIMPLE = "Simple-Liste", + TGT_OPTIONS_STYLE_SWIM = "Schwimmbahn-Liste", + TGT_OPTIONS_STYLE_SHORT_SWIM = "Kompakte Schwimmbahn-Liste", + TGT_DESCRIPTIONS_NEGATE = "Magienegation Ultimates der Zauberer Klasse", + TGT_DESCRIPTIONS_ATRO = "Atronach Ultimates der Zauberer Klasse", + TGT_DESCRIPTIONS_OVER = "Überladung Ultimates der Zauberer Klasse", + TGT_DESCRIPTIONS_SWEEP = "Schwung Ultimates der Templer Klasse", + TGT_DESCRIPTIONS_NOVA = "Nova Ultimates der Templer Klasse", + TGT_DESCRIPTIONS_TPHEAL = "Heil Ultimates der Templer Klasse", + TGT_DESCRIPTIONS_STAND = "Standarten Ultimates der Drachenritter Klasse", + TGT_DESCRIPTIONS_LEAP = "Drachensprung Ultimates der Drachenritter Klasse", + TGT_DESCRIPTIONS_MAGMA = "Magma Ultimates der Drachenritter Klasse", + TGT_DESCRIPTIONS_STROKE = "Todesstoß Ultimates der Nachtklingen Klasse", + TGT_DESCRIPTIONS_VEIL = "Schleier Ultimates der Nachtklingen Klasse", + TGT_DESCRIPTIONS_NBSOUL = "Seelenfetzen Ultimates der Nachtklingen Klasse", + TGT_DESCRIPTIONS_FREEZE = "Sturm Ultimates der Hüter Klasse", + TGT_DESCRIPTIONS_WDHEAL = "Hain Ultimates der Hüter Klasse", + TGT_DESCRIPTIONS_ICE = "Frost Ultimates des Zerstörungsstabes", + TGT_DESCRIPTIONS_FIRE = "Feuer Ultimates des Zerstörungsstabes", + TGT_DESCRIPTIONS_LIGHT = "Blitz Ultimates des Zerstörungsstabes", + TGT_DESCRIPTIONS_STHEAL = "Heil Ultimates des Heilstabes", + TGT_DESCRIPTIONS_BERSERK = "Berserker Ultimates des Zweihänders", + TGT_DESCRIPTIONS_SHIELD = "Schild Ultimates von Einhand und Schild", + TGT_DESCRIPTIONS_DUAL = "Zerfleischen Ultimates von Zwei Waffen", + TGT_DESCRIPTIONS_BOW = "Schnellfeuer Ultimates von Bogen", + TGT_DESCRIPTIONS_SOUL = "Seelenschlag Ultimates aus der Seelenmagie Linie", + TGT_DESCRIPTIONS_WERE = "Werwolfverwandlung Ultimates aus der Werwolf Linie", + TGT_DESCRIPTIONS_VAMP = "Schwarm Ultimates aus der Vampir Linie", + TGT_DESCRIPTIONS_METEOR = "Meteor Ultimates aus der Magiergilde", + TGT_DESCRIPTIONS_DAWN = "Dämmerbrecher Ultimates aus der Kriegergilde", + TGT_DESCRIPTIONS_BARRIER = "Barriere Ultimates aus der Unterstützung Linie", + TGT_DESCRIPTIONS_HORN = "Kriegshorn Ultimates aus der Sturmangriff Linie" } for stringId, stringValue in pairs(strings) do diff --git a/TaosGroupTools/i18n/en.lua b/TaosGroupTools/i18n/en.lua index 8a216bc..ecff3d5 100644 --- a/TaosGroupTools/i18n/en.lua +++ b/TaosGroupTools/i18n/en.lua @@ -2,47 +2,47 @@ -- Options local strings = { - TGU_OPTIONS_HEADER = "Options", - TGU_OPTIONS_DRAG_LABEL = "Drag elements", - TGU_OPTIONS_DRAG_TOOLTIP = "If activated, you can drag all elements.", - TGU_OPTIONS_ONLY_AVA_LABEL = "Show only in AvA", - TGU_OPTIONS_ONLY_AVA_TOOLTIP = "If activated, all elements will only be visible in Cyrodiil (AvA).", - TGU_OPTIONS_USE_SORTING_LABEL = "Sort lists by ultimate progress", - TGU_OPTIONS_USE_SORTING_TOOLTIP = "If activated, all lists will be sorted by ultimate progress (Maximum on top).", - TGU_OPTIONS_STYLE_LABEL = "Choose style", - TGU_OPTIONS_STYLE_TOOLTIP = "Choose your style. Simple-List, Swimlane-List or Compact Swimlane-List", - TGU_OPTIONS_STYLE_SIMPLE = "Simple-List", - TGU_OPTIONS_STYLE_SWIM = "Swimlane-List", - TGU_OPTIONS_STYLE_SHORT_SWIM = "Compact Swimlane-List", - TGU_DESCRIPTIONS_NEGATE = "Negate ultimates from Sorcerer class", - TGU_DESCRIPTIONS_ATRO = "Atronach ultimates from Sorcerer class", - TGU_DESCRIPTIONS_OVER = "Overload ultimates from Sorcerer class", - TGU_DESCRIPTIONS_SWEEP = "Sweep ultimates from Templar class", - TGU_DESCRIPTIONS_NOVA = "Nova ultimates from Templar class", - TGU_DESCRIPTIONS_TPHEAL = "Heal ultimates from Templar class", - TGU_DESCRIPTIONS_STAND = "Standard ultimates from Dragonknight class", - TGU_DESCRIPTIONS_LEAP = "Leap ultimates from Dragonknight class", - TGU_DESCRIPTIONS_MAGMA = "Magma ultimates from Dragonknight class", - TGU_DESCRIPTIONS_STROKE = "Death Stroke ultimates from Nightblade class", - TGU_DESCRIPTIONS_VEIL = "Veil of Blades ultimates from Nightblade class", - TGU_DESCRIPTIONS_NBSOUL = "Soul ultimates from Nightblade class", - TGU_DESCRIPTIONS_FREEZE = "Storm ultimates from Warden class", - TGU_DESCRIPTIONS_WDHEAL = "Heal ultimates from Warden class", - TGU_DESCRIPTIONS_ICE = "Ice ultimates from Destruction Staff weapon", - TGU_DESCRIPTIONS_FIRE = "Fire ultimates from Destruction Staff weapon", - TGU_DESCRIPTIONS_LIGHT = "Lightning ultimates from Destruction Staff weapon", - TGU_DESCRIPTIONS_STHEAL = "Heal ultimates from Healing Staff weapon", - TGU_DESCRIPTIONS_BERSERK = "Berserker ultimates from Twohand weapon", - TGU_DESCRIPTIONS_SHIELD = "Shield ultimates from One hand and Shield weapon", - TGU_DESCRIPTIONS_DUAL = "Dual wield ultimates from Dual Wield weapons", - TGU_DESCRIPTIONS_BOW = "Bow ultimates from Bow weapon", - TGU_DESCRIPTIONS_SOUL = "Soul ultimates from Soul Magic skill line", - TGU_DESCRIPTIONS_WERE = "Werewolf ultimates from Werewolf skill line", - TGU_DESCRIPTIONS_VAMP = "Vamp ultimates from Vampire skill line", - TGU_DESCRIPTIONS_METEOR = "Meteor ultimates from Mages guild", - TGU_DESCRIPTIONS_DAWN = "Dawnbreaker ultimates from Fighters guild", - TGU_DESCRIPTIONS_BARRIER = "Barrier ultimates from Support alliance skill line", - TGU_DESCRIPTIONS_HORN = "Horn ultimates from Assoult alliance skill line" + TGT_OPTIONS_HEADER = "Options", + TGT_OPTIONS_DRAG_LABEL = "Drag elements", + TGT_OPTIONS_DRAG_TOOLTIP = "If activated, you can drag all elements.", + TGT_OPTIONS_ONLY_AVA_LABEL = "Show only in AvA", + TGT_OPTIONS_ONLY_AVA_TOOLTIP = "If activated, all elements will only be visible in Cyrodiil (AvA).", + TGT_OPTIONS_USE_SORTING_LABEL = "Sort lists by ultimate progress", + TGT_OPTIONS_USE_SORTING_TOOLTIP = "If activated, all lists will be sorted by ultimate progress (Maximum on top).", + TGT_OPTIONS_STYLE_LABEL = "Choose style", + TGT_OPTIONS_STYLE_TOOLTIP = "Choose your style. Simple-List, Swimlane-List or Compact Swimlane-List", + TGT_OPTIONS_STYLE_SIMPLE = "Simple-List", + TGT_OPTIONS_STYLE_SWIM = "Swimlane-List", + TGT_OPTIONS_STYLE_SHORT_SWIM = "Compact Swimlane-List", + TGT_DESCRIPTIONS_NEGATE = "Negate ultimates from Sorcerer class", + TGT_DESCRIPTIONS_ATRO = "Atronach ultimates from Sorcerer class", + TGT_DESCRIPTIONS_OVER = "Overload ultimates from Sorcerer class", + TGT_DESCRIPTIONS_SWEEP = "Sweep ultimates from Templar class", + TGT_DESCRIPTIONS_NOVA = "Nova ultimates from Templar class", + TGT_DESCRIPTIONS_TPHEAL = "Heal ultimates from Templar class", + TGT_DESCRIPTIONS_STAND = "Standard ultimates from Dragonknight class", + TGT_DESCRIPTIONS_LEAP = "Leap ultimates from Dragonknight class", + TGT_DESCRIPTIONS_MAGMA = "Magma ultimates from Dragonknight class", + TGT_DESCRIPTIONS_STROKE = "Death Stroke ultimates from Nightblade class", + TGT_DESCRIPTIONS_VEIL = "Veil of Blades ultimates from Nightblade class", + TGT_DESCRIPTIONS_NBSOUL = "Soul ultimates from Nightblade class", + TGT_DESCRIPTIONS_FREEZE = "Storm ultimates from Warden class", + TGT_DESCRIPTIONS_WDHEAL = "Heal ultimates from Warden class", + TGT_DESCRIPTIONS_ICE = "Ice ultimates from Destruction Staff weapon", + TGT_DESCRIPTIONS_FIRE = "Fire ultimates from Destruction Staff weapon", + TGT_DESCRIPTIONS_LIGHT = "Lightning ultimates from Destruction Staff weapon", + TGT_DESCRIPTIONS_STHEAL = "Heal ultimates from Healing Staff weapon", + TGT_DESCRIPTIONS_BERSERK = "Berserker ultimates from Twohand weapon", + TGT_DESCRIPTIONS_SHIELD = "Shield ultimates from One hand and Shield weapon", + TGT_DESCRIPTIONS_DUAL = "Dual wield ultimates from Dual Wield weapons", + TGT_DESCRIPTIONS_BOW = "Bow ultimates from Bow weapon", + TGT_DESCRIPTIONS_SOUL = "Soul ultimates from Soul Magic skill line", + TGT_DESCRIPTIONS_WERE = "Werewolf ultimates from Werewolf skill line", + TGT_DESCRIPTIONS_VAMP = "Vamp ultimates from Vampire skill line", + TGT_DESCRIPTIONS_METEOR = "Meteor ultimates from Mages guild", + TGT_DESCRIPTIONS_DAWN = "Dawnbreaker ultimates from Fighters guild", + TGT_DESCRIPTIONS_BARRIER = "Barrier ultimates from Support alliance skill line", + TGT_DESCRIPTIONS_HORN = "Horn ultimates from Assoult alliance skill line" } for stringId, stringValue in pairs(strings) do diff --git a/TaosGroupTools/i18n/fr.lua b/TaosGroupTools/i18n/fr.lua index f6f9002..558fb49 100644 --- a/TaosGroupTools/i18n/fr.lua +++ b/TaosGroupTools/i18n/fr.lua @@ -2,47 +2,47 @@ -- Options local strings = { - TGU_OPTIONS_HEADER = "Options", - TGU_OPTIONS_DRAG_LABEL = "Drag elements", - TGU_OPTIONS_DRAG_TOOLTIP = "If activated, you can drag all elements.", - TGU_OPTIONS_ONLY_AVA_LABEL = "Show only in AvA", - TGU_OPTIONS_ONLY_AVA_TOOLTIP = "If activated, all elements will only be visible in Cyrodiil (AvA).", - TGU_OPTIONS_USE_SORTING_LABEL = "Sort lists by ultimate progress", - TGU_OPTIONS_USE_SORTING_TOOLTIP = "If activated, all lists will be sorted by ultimate progress (Maximum on top).", - TGU_OPTIONS_STYLE_LABEL = "Choose style", - TGU_OPTIONS_STYLE_TOOLTIP = "Choose your style. Simple-List, Swimlane-List or Compact Swimlane-List", - TGU_OPTIONS_STYLE_SIMPLE = "Simple-List", - TGU_OPTIONS_STYLE_SWIM = "Swimlane-List", - TGU_OPTIONS_STYLE_SHORT_SWIM = "Compact Swimlane-List", - TGU_DESCRIPTIONS_NEGATE = "Negate ultimates from Sorcerer class", - TGU_DESCRIPTIONS_ATRO = "Atronach ultimates from Sorcerer class", - TGU_DESCRIPTIONS_OVER = "Overload ultimates from Sorcerer class", - TGU_DESCRIPTIONS_SWEEP = "Sweep ultimates from Templar class", - TGU_DESCRIPTIONS_NOVA = "Nova ultimates from Templar class", - TGU_DESCRIPTIONS_TPHEAL = "Heal ultimates from Templar class", - TGU_DESCRIPTIONS_STAND = "Standard ultimates from Dragonknight class", - TGU_DESCRIPTIONS_LEAP = "Leap ultimates from Dragonknight class", - TGU_DESCRIPTIONS_MAGMA = "Magma ultimates from Dragonknight class", - TGU_DESCRIPTIONS_STROKE = "Death Stroke ultimates from Nightblade class", - TGU_DESCRIPTIONS_VEIL = "Veil of Blades ultimates from Nightblade class", - TGU_DESCRIPTIONS_NBSOUL = "Soul ultimates from Nightblade class", - TGU_DESCRIPTIONS_FREEZE = "Storm ultimates from Warden class", - TGU_DESCRIPTIONS_WDHEAL = "Heal ultimates from Warden class", - TGU_DESCRIPTIONS_ICE = "Ice ultimates from Destruction Staff weapon", - TGU_DESCRIPTIONS_FIRE = "Fire ultimates from Destruction Staff weapon", - TGU_DESCRIPTIONS_LIGHT = "Lightning ultimates from Destruction Staff weapon", - TGU_DESCRIPTIONS_STHEAL = "Heal ultimates from Healing Staff weapon", - TGU_DESCRIPTIONS_BERSERK = "2H ultimates from 2H line", - TGU_DESCRIPTIONS_SHIELD = "Shield ultimates from shield line", - TGU_DESCRIPTIONS_DUAL = "Dual wield ultimates from dual wield line", - TGU_DESCRIPTIONS_BOW = "Bow ultimates from bow line", - TGU_DESCRIPTIONS_SOUL = "Soul magic ultimates from soul line", - TGU_DESCRIPTIONS_WERE = "Werewolf ultimates from werewolf line", - TGU_DESCRIPTIONS_VAMP = "Vamp ultimates from vamp line", - TGU_DESCRIPTIONS_METEOR = "Meteor ultimates from Mages guild", - TGU_DESCRIPTIONS_DAWN = "Dawnbreaker ultimates from Fighters guild", - TGU_DESCRIPTIONS_BARRIER = "Barrier ultimates from Support alliance skill line", - TGU_DESCRIPTIONS_HORN = "Horn ultimates from Assoult alliance skill line" + TGT_OPTIONS_HEADER = "Options", + TGT_OPTIONS_DRAG_LABEL = "Drag elements", + TGT_OPTIONS_DRAG_TOOLTIP = "If activated, you can drag all elements.", + TGT_OPTIONS_ONLY_AVA_LABEL = "Show only in AvA", + TGT_OPTIONS_ONLY_AVA_TOOLTIP = "If activated, all elements will only be visible in Cyrodiil (AvA).", + TGT_OPTIONS_USE_SORTING_LABEL = "Sort lists by ultimate progress", + TGT_OPTIONS_USE_SORTING_TOOLTIP = "If activated, all lists will be sorted by ultimate progress (Maximum on top).", + TGT_OPTIONS_STYLE_LABEL = "Choose style", + TGT_OPTIONS_STYLE_TOOLTIP = "Choose your style. Simple-List, Swimlane-List or Compact Swimlane-List", + TGT_OPTIONS_STYLE_SIMPLE = "Simple-List", + TGT_OPTIONS_STYLE_SWIM = "Swimlane-List", + TGT_OPTIONS_STYLE_SHORT_SWIM = "Compact Swimlane-List", + TGT_DESCRIPTIONS_NEGATE = "Negate ultimates from Sorcerer class", + TGT_DESCRIPTIONS_ATRO = "Atronach ultimates from Sorcerer class", + TGT_DESCRIPTIONS_OVER = "Overload ultimates from Sorcerer class", + TGT_DESCRIPTIONS_SWEEP = "Sweep ultimates from Templar class", + TGT_DESCRIPTIONS_NOVA = "Nova ultimates from Templar class", + TGT_DESCRIPTIONS_TPHEAL = "Heal ultimates from Templar class", + TGT_DESCRIPTIONS_STAND = "Standard ultimates from Dragonknight class", + TGT_DESCRIPTIONS_LEAP = "Leap ultimates from Dragonknight class", + TGT_DESCRIPTIONS_MAGMA = "Magma ultimates from Dragonknight class", + TGT_DESCRIPTIONS_STROKE = "Death Stroke ultimates from Nightblade class", + TGT_DESCRIPTIONS_VEIL = "Veil of Blades ultimates from Nightblade class", + TGT_DESCRIPTIONS_NBSOUL = "Soul ultimates from Nightblade class", + TGT_DESCRIPTIONS_FREEZE = "Storm ultimates from Warden class", + TGT_DESCRIPTIONS_WDHEAL = "Heal ultimates from Warden class", + TGT_DESCRIPTIONS_ICE = "Ice ultimates from Destruction Staff weapon", + TGT_DESCRIPTIONS_FIRE = "Fire ultimates from Destruction Staff weapon", + TGT_DESCRIPTIONS_LIGHT = "Lightning ultimates from Destruction Staff weapon", + TGT_DESCRIPTIONS_STHEAL = "Heal ultimates from Healing Staff weapon", + TGT_DESCRIPTIONS_BERSERK = "2H ultimates from 2H line", + TGT_DESCRIPTIONS_SHIELD = "Shield ultimates from shield line", + TGT_DESCRIPTIONS_DUAL = "Dual wield ultimates from dual wield line", + TGT_DESCRIPTIONS_BOW = "Bow ultimates from bow line", + TGT_DESCRIPTIONS_SOUL = "Soul magic ultimates from soul line", + TGT_DESCRIPTIONS_WERE = "Werewolf ultimates from werewolf line", + TGT_DESCRIPTIONS_VAMP = "Vamp ultimates from vamp line", + TGT_DESCRIPTIONS_METEOR = "Meteor ultimates from Mages guild", + TGT_DESCRIPTIONS_DAWN = "Dawnbreaker ultimates from Fighters guild", + TGT_DESCRIPTIONS_BARRIER = "Barrier ultimates from Support alliance skill line", + TGT_DESCRIPTIONS_HORN = "Horn ultimates from Assoult alliance skill line" } for stringId, stringValue in pairs(strings) do diff --git a/TaosGroupTools/logic/CommandsHandler.lua b/TaosGroupTools/logic/CommandsHandler.lua index 9f38004..3be2262 100644 --- a/TaosGroupTools/logic/CommandsHandler.lua +++ b/TaosGroupTools/logic/CommandsHandler.lua @@ -11,27 +11,27 @@ local LOG_ACTIVE = false local _logger = nil --[[ - Table TGU_CommandsHandler + Table TGT_CommandsHandler ]]-- -TGU_CommandsHandler = {} -TGU_CommandsHandler.__index = TGU_CommandsHandler +TGT_CommandsHandler = {} +TGT_CommandsHandler.__index = TGT_CommandsHandler --[[ Table Members ]]-- -TGU_CommandsHandler.Name = "TGU-CommandsHandler" +TGT_CommandsHandler.Name = "TGT-CommandsHandler" --[[ Called on /setgroupultimatestyle command ]]-- -function TGU_CommandsHandler.SetGroupUltimateStyleCommand(style) +function TGT_CommandsHandler.SetGroupUltimateStyleCommand(style) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CommandsHandler.SetGroupUltimateStyleCommand") + _logger:logTrace("TGT_CommandsHandler.SetGroupUltimateStyleCommand") _logger:logDebug("style", style) end if (style ~= nil and style ~= "") then - TGU_SettingsHandler.SetStyleSettings(style) + TGT_SettingsHandler.SetStyleSettings(style) else d("Invalid style: " .. tostring(style)) end @@ -40,17 +40,17 @@ end --[[ Called on /setultimateid command ]]-- -function TGU_CommandsHandler.SetUltimateIdCommand(groupName) +function TGT_CommandsHandler.SetUltimateIdCommand(groupName) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CommandsHandler.SetUltimateId") + _logger:logTrace("TGT_CommandsHandler.SetUltimateId") _logger:logDebug("groupName", groupName) end if (groupName ~= nil and groupName ~= "") then - local ultimateGroup = TGU_UltimateGroupHandler.GetUltimateGroupByGroupName(groupName) + local ultimateGroup = TGT_UltimateGroupHandler.GetUltimateGroupByGroupName(groupName) if (ultimateGroup ~= nil) then - TGU_SettingsHandler.SetStaticUltimateIDSettings(ultimateGroup.GroupAbilityId) + TGT_SettingsHandler.SetStaticUltimateIDSettings(ultimateGroup.GroupAbilityId) else d("Invalid group name: " .. tostring(groupName)) end @@ -62,9 +62,9 @@ end --[[ Called on /setswimlaneid command ]]-- -function TGU_CommandsHandler.SetSwimlaneIdCommand(option) +function TGT_CommandsHandler.SetSwimlaneIdCommand(option) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CommandsHandler.SetSwimlaneId") + _logger:logTrace("TGT_CommandsHandler.SetSwimlaneId") _logger:logDebug("option", option) end @@ -82,10 +82,10 @@ function TGU_CommandsHandler.SetSwimlaneIdCommand(option) if (arrayLength == 2) then local swimlane = tonumber(options[1]) local swimlaneGroup = options[2] - local ultimateGroup = TGU_UltimateGroupHandler.GetUltimateGroupByGroupName(swimlaneGroup) + local ultimateGroup = TGT_UltimateGroupHandler.GetUltimateGroupByGroupName(swimlaneGroup) if (swimlane ~= nil and ultimateGroup ~= nil and swimlane >= 1 and swimlane <= 6) then - TGU_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlane, ultimateGroup) + TGT_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlane, ultimateGroup) else d("Invalid options: " .. tostring(option)) end @@ -97,10 +97,10 @@ end --[[ Called on /getultimategroups command ]]-- -function TGU_CommandsHandler.GetUltimateGroupsCommand() - if (LOG_ACTIVE) then _logger:logTrace("TGU_CommandsHandler.GetUltimateGroupsCommand") end +function TGT_CommandsHandler.GetUltimateGroupsCommand() + if (LOG_ACTIVE) then _logger:logTrace("TGT_CommandsHandler.GetUltimateGroupsCommand") end - local ultimateGroups = TGU_UltimateGroupHandler.GetUltimateGroups() + local ultimateGroups = TGT_UltimateGroupHandler.GetUltimateGroups() d("Ultimate Groups:") @@ -110,11 +110,11 @@ function TGU_CommandsHandler.GetUltimateGroupsCommand() end --[[ - Initialize initializes TGU_CommandsHandler + Initialize initializes TGT_CommandsHandler ]]-- -function TGU_CommandsHandler.Initialize(logger) +function TGT_CommandsHandler.Initialize(logger) if (LOG_ACTIVE) then - logger:logTrace("TGU_CommandsHandler.Initialize") + logger:logTrace("TGT_CommandsHandler.Initialize") logger:logDebug("Commands active:") logger:logDebug("/setgroupultimatestyle <STYLEID> - Sets the style (0 = SimpleList, 1 = SwimlaneList).") logger:logDebug("/setultimateid <GROUPNAME> - Sets the static ultimate group; See /getultimategroups to get group names.") @@ -125,8 +125,8 @@ function TGU_CommandsHandler.Initialize(logger) _logger = logger -- Define commands - SLASH_COMMANDS["/setgroupultimatestyle"] = TGU_CommandsHandler.SetGroupUltimateStyleCommand - SLASH_COMMANDS["/setultimateid"] = TGU_CommandsHandler.SetUltimateIdCommand - SLASH_COMMANDS["/setswimlaneid"] = TGU_CommandsHandler.SetSwimlaneIdCommand - SLASH_COMMANDS["/getultimategroups"] = TGU_CommandsHandler.GetUltimateGroupsCommand + SLASH_COMMANDS["/setgroupultimatestyle"] = TGT_CommandsHandler.SetGroupUltimateStyleCommand + SLASH_COMMANDS["/setultimateid"] = TGT_CommandsHandler.SetUltimateIdCommand + SLASH_COMMANDS["/setswimlaneid"] = TGT_CommandsHandler.SetSwimlaneIdCommand + SLASH_COMMANDS["/getultimategroups"] = TGT_CommandsHandler.GetUltimateGroupsCommand end \ No newline at end of file diff --git a/TaosGroupTools/logic/MapPingHandler.lua b/TaosGroupTools/logic/MapPingHandler.lua index a3fadc2..e032488 100644 --- a/TaosGroupTools/logic/MapPingHandler.lua +++ b/TaosGroupTools/logic/MapPingHandler.lua @@ -13,31 +13,31 @@ local _logger = nil local REFRESHRATE = 2000 -- ms; RegisterForUpdate is in miliseconds --[[ - Table TGU_MapPingHandler + Table TGT_MapPingHandler ]]-- -TGU_MapPingHandler = {} -TGU_MapPingHandler.__index = TGU_MapPingHandler +TGT_MapPingHandler = {} +TGT_MapPingHandler.__index = TGT_MapPingHandler --[[ Table Members ]]-- -TGU_MapPingHandler.Name = "TGU-MapPingHandler" -TGU_MapPingHandler.IsMocked = false +TGT_MapPingHandler.Name = "TGT-MapPingHandler" +TGT_MapPingHandler.IsMocked = false --[[ Called on new data from Communication ]]-- -function TGU_MapPingHandler.OnData(pingTag, abilityPing, relativeUltimate) - if (LOG_ACTIVE) then _logger:logTrace("TGU_MapPingHandler.OnData") end +function TGT_MapPingHandler.OnData(pingTag, abilityPing, relativeUltimate) + if (LOG_ACTIVE) then _logger:logTrace("TGT_MapPingHandler.OnData") end - local ultimateGroup = TGU_UltimateGroupHandler.GetUltimateGroupByAbilityPing(abilityPing) + local ultimateGroup = TGT_UltimateGroupHandler.GetUltimateGroupByAbilityPing(abilityPing) if (ultimateGroup ~= nil and relativeUltimate ~= -1) then local player = {} local playerName = "" local isPlayerDead = false - if (TGU_MapPingHandler.IsMocked == false) then + if (TGT_MapPingHandler.IsMocked == false) then playerName = GetUnitName(pingTag) isPlayerDead = IsUnitDead(pingTag) else @@ -61,45 +61,45 @@ function TGU_MapPingHandler.OnData(pingTag, abilityPing, relativeUltimate) _logger:logDebug("player.RelativeUltimate", player.RelativeUltimate) end - CALLBACK_MANAGER:FireCallbacks(TGU_PLAYER_DATA_CHANGED, player) + CALLBACK_MANAGER:FireCallbacks(TGT_PLAYER_DATA_CHANGED, player) else - _logger:logError("TGU_MapPingHandler.OnMapPing, Ping invalid ultimateGroup: " .. tostring(ultimateGroup) .. "; relativeUltimate: " .. tostring(relativeUltimate)) + _logger:logError("TGT_MapPingHandler.OnMapPing, Ping invalid ultimateGroup: " .. tostring(ultimateGroup) .. "; relativeUltimate: " .. tostring(relativeUltimate)) end end --[[ Called on refresh of timer ]]-- -function TGU_MapPingHandler.OnTimedUpdate(eventCode) - if (LOG_ACTIVE) then _logger:logTrace("TGU_MapPingHandler.OnTimedUpdate") end +function TGT_MapPingHandler.OnTimedUpdate(eventCode) + if (LOG_ACTIVE) then _logger:logTrace("TGT_MapPingHandler.OnTimedUpdate") end - if (IsUnitGrouped("player") == false and TGU_MapPingHandler.IsMocked == false) then return end -- only if player is in group and system is not mocked + if (IsUnitGrouped("player") == false and TGT_MapPingHandler.IsMocked == false) then return end -- only if player is in group and system is not mocked - local abilityGroup = TGU_UltimateGroupHandler.GetUltimateGroupByAbilityId(TGU_SettingsHandler.SavedVariables.StaticUltimateID) + local abilityGroup = TGT_UltimateGroupHandler.GetUltimateGroupByAbilityId(TGT_SettingsHandler.SavedVariables.StaticUltimateID) if (abilityGroup ~= nil) then - TGU_Communicator.SendData(abilityGroup) + TGT_Communicator.SendData(abilityGroup) else - _logger:logError("TGU_MapPingHandler.OnTimedUpdate, abilityGroup is nil, change ultimate. StaticID: " .. tostring(TGU_SettingsHandler.SavedVariables.StaticUltimateID)) + _logger:logError("TGT_MapPingHandler.OnTimedUpdate, abilityGroup is nil, change ultimate. StaticID: " .. tostring(TGT_SettingsHandler.SavedVariables.StaticUltimateID)) end end --[[ - Initialize initializes TGU_MapPingHandler + Initialize initializes TGT_MapPingHandler ]]-- -function TGU_MapPingHandler.Initialize(logger, isMocked) +function TGT_MapPingHandler.Initialize(logger, isMocked) if (LOG_ACTIVE) then - logger:logTrace("TGU_MapPingHandler.Initialize") + logger:logTrace("TGT_MapPingHandler.Initialize") logger:logDebug("isMocked", isMocked) end _logger = logger - TGU_MapPingHandler.IsMocked = isMocked + TGT_MapPingHandler.IsMocked = isMocked -- Register callbacks - CALLBACK_MANAGER:RegisterCallback(TGU_MAP_PING_CHANGED, TGU_MapPingHandler.OnData) + CALLBACK_MANAGER:RegisterCallback(TGT_MAP_PING_CHANGED, TGT_MapPingHandler.OnData) -- Start timer - EVENT_MANAGER:RegisterForUpdate(TGU_MapPingHandler.Name, REFRESHRATE, TGU_MapPingHandler.OnTimedUpdate) + EVENT_MANAGER:RegisterForUpdate(TGT_MapPingHandler.Name, REFRESHRATE, TGT_MapPingHandler.OnTimedUpdate) end \ No newline at end of file diff --git a/TaosGroupTools/logic/SettingsHandler.lua b/TaosGroupTools/logic/SettingsHandler.lua index 2b0aec3..c9b3be5 100644 --- a/TaosGroupTools/logic/SettingsHandler.lua +++ b/TaosGroupTools/logic/SettingsHandler.lua @@ -13,18 +13,18 @@ local _logger = nil local SETTINGS_VERSION = 5 --[[ - Table TGU_SettingsHandler + Table TGT_SettingsHandler ]]-- -TGU_SettingsHandler = {} -TGU_SettingsHandler.__index = TGU_SettingsHandler +TGT_SettingsHandler = {} +TGT_SettingsHandler.__index = TGT_SettingsHandler --[[ Table Members ]]-- -TGU_SettingsHandler.Name = "TGU-SettingsHandler" -TGU_SettingsHandler.SettingsName = "TaosGroupUltimateSettings" -TGU_SettingsHandler.SavedVariables = nil -TGU_SettingsHandler.Default = +TGT_SettingsHandler.Name = "TGT-SettingsHandler" +TGT_SettingsHandler.SettingsName = "TaosGroupToolSettings" +TGT_SettingsHandler.SavedVariables = nil +TGT_SettingsHandler.Default = { ["PosX"] = 0, ["PosY"] = 0, @@ -47,104 +47,104 @@ TGU_SettingsHandler.Default = } --[[ - Sets SetStyleSettings and fires TGU-StyleChanged callbacks + Sets SetStyleSettings and fires TGT-StyleChanged callbacks ]]-- -function TGU_SettingsHandler.SetStyleSettings(style) +function TGT_SettingsHandler.SetStyleSettings(style) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.SetStyleSettings") + _logger:logTrace("TGT_SettingsHandler.SetStyleSettings") _logger:logDebug("style", style) end local numberStyle = tonumber(style) if (numberStyle == 1 or numberStyle == 2 or numberStyle == 3) then - TGU_SettingsHandler.SavedVariables.Style = numberStyle + TGT_SettingsHandler.SavedVariables.Style = numberStyle - CALLBACK_MANAGER:FireCallbacks(TGU_STYLE_CHANGED) + CALLBACK_MANAGER:FireCallbacks(TGT_STYLE_CHANGED) else - _logger:logError("TGU_SettingsHandler.SetStyleSettings, invalid style " .. tostring(style)) + _logger:logError("TGT_SettingsHandler.SetStyleSettings, invalid style " .. tostring(style)) end end --[[ - Sets MovableSettings and fires TGU-MovableChanged callbacks + Sets MovableSettings and fires TGT-MovableChanged callbacks ]]-- -function TGU_SettingsHandler.SetStaticUltimateIDSettings(staticUltimateID) +function TGT_SettingsHandler.SetStaticUltimateIDSettings(staticUltimateID) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.StaticUltimateIDSettings") + _logger:logTrace("TGT_SettingsHandler.StaticUltimateIDSettings") _logger:logDebug("staticUltimateID", staticUltimateID) end - TGU_SettingsHandler.SavedVariables.StaticUltimateID = staticUltimateID + TGT_SettingsHandler.SavedVariables.StaticUltimateID = staticUltimateID - CALLBACK_MANAGER:FireCallbacks(TGU_STATIC_ULTIMATE_ID_CHANGED, staticUltimateID) + CALLBACK_MANAGER:FireCallbacks(TGT_STATIC_ULTIMATE_ID_CHANGED, staticUltimateID) end --[[ - Sets MovableSettings and fires TGU-MovableChanged callbacks + Sets MovableSettings and fires TGT-MovableChanged callbacks ]]-- -function TGU_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlane, ultimateGroup) +function TGT_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlane, ultimateGroup) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.StaticUltimateIDSettings") + _logger:logTrace("TGT_SettingsHandler.StaticUltimateIDSettings") _logger:logDebug("swimlane", swimlane) _logger:logDebug("ultimateGroup", ultimateGroup) end - TGU_SettingsHandler.SavedVariables.SwimlaneUltimateGroupIds[swimlane] = ultimateGroup.GroupAbilityId + TGT_SettingsHandler.SavedVariables.SwimlaneUltimateGroupIds[swimlane] = ultimateGroup.GroupAbilityId - CALLBACK_MANAGER:FireCallbacks(TGU_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, swimlane, ultimateGroup) + CALLBACK_MANAGER:FireCallbacks(TGT_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, swimlane, ultimateGroup) end --[[ - Sets MovableSettings and fires TGU-MovableChanged callbacks + Sets MovableSettings and fires TGT-MovableChanged callbacks ]]-- -function TGU_SettingsHandler.SetMovableSettings(movable) +function TGT_SettingsHandler.SetMovableSettings(movable) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.SetMovableSettings") + _logger:logTrace("TGT_SettingsHandler.SetMovableSettings") _logger:logDebug("movable", movable) end - TGU_SettingsHandler.SavedVariables.Movable = movable + TGT_SettingsHandler.SavedVariables.Movable = movable - CALLBACK_MANAGER:FireCallbacks(TGU_MOVABLE_CHANGED, movable) + CALLBACK_MANAGER:FireCallbacks(TGT_MOVABLE_CHANGED, movable) end --[[ - Sets MovableSettings and fires TGU-MovableChanged callbacks + Sets MovableSettings and fires TGT-MovableChanged callbacks ]]-- -function TGU_SettingsHandler.SetOnlyAvaSettings(onlyAva) +function TGT_SettingsHandler.SetOnlyAvaSettings(onlyAva) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.SetOnlyAvaSettings") + _logger:logTrace("TGT_SettingsHandler.SetOnlyAvaSettings") _logger:logDebug("onlyAva", onlyAva) end - TGU_SettingsHandler.SavedVariables.OnlyAva = onlyAva + TGT_SettingsHandler.SavedVariables.OnlyAva = onlyAva - CALLBACK_MANAGER:FireCallbacks(TGU_IS_ZONE_CHANGED) + CALLBACK_MANAGER:FireCallbacks(TGT_IS_ZONE_CHANGED) end --[[ Sets IsSortingActive settings ]]-- -function TGU_SettingsHandler.SetIsSortingActiveSettings(isSortingActive) +function TGT_SettingsHandler.SetIsSortingActiveSettings(isSortingActive) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.SetIsLgsActiveSettings") + _logger:logTrace("TGT_SettingsHandler.SetIsLgsActiveSettings") _logger:logDebug("isSortingActive", isSortingActive) end - TGU_SettingsHandler.SavedVariables.IsSortingActive = isSortingActive + TGT_SettingsHandler.SavedVariables.IsSortingActive = isSortingActive end --[[ Gets SimpleList visible in connection with selected style ]]-- -function TGU_SettingsHandler.IsSimpleListVisible() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SettingsHandler.IsSimpleListVisible") end - if (TGU_SettingsHandler.SavedVariables ~= nil) then - if (LOG_ACTIVE) then _logger:logDebug("style", TGU_SettingsHandler.SavedVariables.Style) end - return tonumber(TGU_SettingsHandler.SavedVariables.Style) == 1 and TGU_SettingsHandler.IsControlsVisible() +function TGT_SettingsHandler.IsSimpleListVisible() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SettingsHandler.IsSimpleListVisible") end + if (TGT_SettingsHandler.SavedVariables ~= nil) then + if (LOG_ACTIVE) then _logger:logDebug("style", TGT_SettingsHandler.SavedVariables.Style) end + return tonumber(TGT_SettingsHandler.SavedVariables.Style) == 1 and TGT_SettingsHandler.IsControlsVisible() else - _logger:logError("TGU_SettingsHandler.SavedVariables is nil") + _logger:logError("TGT_SettingsHandler.SavedVariables is nil") return false end end @@ -152,13 +152,13 @@ end --[[ Gets SwimlaneList visible in connection with selected style ]]-- -function TGU_SettingsHandler.IsSwimlaneListVisible() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SettingsHandler.IsSwimlaneListVisible") end - if (TGU_SettingsHandler.SavedVariables ~= nil) then - if (LOG_ACTIVE) then _logger:logDebug("style", TGU_SettingsHandler.SavedVariables.Style) end - return tonumber(TGU_SettingsHandler.SavedVariables.Style) == 2 and TGU_SettingsHandler.IsControlsVisible() +function TGT_SettingsHandler.IsSwimlaneListVisible() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SettingsHandler.IsSwimlaneListVisible") end + if (TGT_SettingsHandler.SavedVariables ~= nil) then + if (LOG_ACTIVE) then _logger:logDebug("style", TGT_SettingsHandler.SavedVariables.Style) end + return tonumber(TGT_SettingsHandler.SavedVariables.Style) == 2 and TGT_SettingsHandler.IsControlsVisible() else - _logger:logError("TGU_SettingsHandler.SavedVariables is nil") + _logger:logError("TGT_SettingsHandler.SavedVariables is nil") return false end end @@ -166,13 +166,13 @@ end --[[ Gets CompactSwimlaneList visible in connection with selected style ]]-- -function TGU_SettingsHandler.IsCompactSwimlaneListVisible() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SettingsHandler.IsCompactSwimlaneListVisible") end - if (TGU_SettingsHandler.SavedVariables ~= nil) then - if (LOG_ACTIVE) then _logger:logDebug("style", TGU_SettingsHandler.SavedVariables.Style) end - return tonumber(TGU_SettingsHandler.SavedVariables.Style) == 3 and TGU_SettingsHandler.IsControlsVisible() +function TGT_SettingsHandler.IsCompactSwimlaneListVisible() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SettingsHandler.IsCompactSwimlaneListVisible") end + if (TGT_SettingsHandler.SavedVariables ~= nil) then + if (LOG_ACTIVE) then _logger:logDebug("style", TGT_SettingsHandler.SavedVariables.Style) end + return tonumber(TGT_SettingsHandler.SavedVariables.Style) == 3 and TGT_SettingsHandler.IsControlsVisible() else - _logger:logError("TGU_SettingsHandler.SavedVariables is nil") + _logger:logError("TGT_SettingsHandler.SavedVariables is nil") return false end end @@ -180,18 +180,18 @@ end --[[ Gets CompactSwimlaneList visible in connection with selected style ]]-- -function TGU_SettingsHandler.IsControlsVisible() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SettingsHandler.IsControlsVisible") end - if (TGU_SettingsHandler.SavedVariables ~= nil) then - if (LOG_ACTIVE) then _logger:logDebug("onlyAvA", TGU_SettingsHandler.SavedVariables.OnlyAva) end - if (TGU_SettingsHandler.SavedVariables.OnlyAva) then +function TGT_SettingsHandler.IsControlsVisible() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SettingsHandler.IsControlsVisible") end + if (TGT_SettingsHandler.SavedVariables ~= nil) then + if (LOG_ACTIVE) then _logger:logDebug("onlyAvA", TGT_SettingsHandler.SavedVariables.OnlyAva) end + if (TGT_SettingsHandler.SavedVariables.OnlyAva) then _logger:logDebug("isPlayerInAvAWorld", IsPlayerInAvAWorld()) return IsPlayerInAvAWorld() else return true end else - _logger:logError("TGU_SettingsHandler.SavedVariables is nil") + _logger:logError("TGT_SettingsHandler.SavedVariables is nil") return false end end @@ -199,24 +199,24 @@ end --[[ OnPlayerActivated sends IsZoneChanged event ]]-- -function TGU_SettingsHandler.OnPlayerActivated(eventCode) +function TGT_SettingsHandler.OnPlayerActivated(eventCode) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SettingsHandler.OnPlayerActivated") + _logger:logTrace("TGT_SettingsHandler.OnPlayerActivated") end - CALLBACK_MANAGER:FireCallbacks(TGU_IS_ZONE_CHANGED) + CALLBACK_MANAGER:FireCallbacks(TGT_IS_ZONE_CHANGED) end --[[ Initialize loads SavedVariables ]]-- -function TGU_SettingsHandler.Initialize(logger) - if (LOG_ACTIVE) then logger:logTrace("TGU_SettingsHandler.Initialize") end +function TGT_SettingsHandler.Initialize(logger) + if (LOG_ACTIVE) then logger:logTrace("TGT_SettingsHandler.Initialize") end _logger = logger - TGU_SettingsHandler.SavedVariables = ZO_SavedVars:NewAccountWide(TGU_SettingsHandler.SettingsName, SETTINGS_VERSION, nil, TGU_SettingsHandler.Default) + TGT_SettingsHandler.SavedVariables = ZO_SavedVars:NewAccountWide(TGT_SettingsHandler.SettingsName, SETTINGS_VERSION, nil, TGT_SettingsHandler.Default) -- Register - EVENT_MANAGER:RegisterForEvent(TGU_SettingsHandler.Name, EVENT_PLAYER_ACTIVATED, TGU_SettingsHandler.OnPlayerActivated) + EVENT_MANAGER:RegisterForEvent(TGT_SettingsHandler.Name, EVENT_PLAYER_ACTIVATED, TGT_SettingsHandler.OnPlayerActivated) end \ No newline at end of file diff --git a/TaosGroupTools/logic/UltimateGroupHandler.lua b/TaosGroupTools/logic/UltimateGroupHandler.lua index 750914f..fb55c34 100644 --- a/TaosGroupTools/logic/UltimateGroupHandler.lua +++ b/TaosGroupTools/logic/UltimateGroupHandler.lua @@ -11,27 +11,27 @@ local LOG_ACTIVE = false local _logger = nil --[[ - Table TGU_UltimateGroupHandler + Table TGT_UltimateGroupHandler ]]-- -TGU_UltimateGroupHandler = {} -TGU_UltimateGroupHandler.__index = TGU_UltimateGroupHandler +TGT_UltimateGroupHandler = {} +TGT_UltimateGroupHandler.__index = TGT_UltimateGroupHandler --[[ Table Members ]]-- -TGU_UltimateGroupHandler.Name = "TGU-UltimateGroupHandler" -TGU_UltimateGroupHandler.UltimateGroups = nil +TGT_UltimateGroupHandler.Name = "TGT-UltimateGroupHandler" +TGT_UltimateGroupHandler.UltimateGroups = nil --[[ GetUltimateGroupByAbilityPing gets the ultimate group from given ability ping ]]-- -function TGU_UltimateGroupHandler.GetUltimateGroupByAbilityPing(abilityPing) +function TGT_UltimateGroupHandler.GetUltimateGroupByAbilityPing(abilityPing) if (LOG_ACTIVE) then - _logger:logTrace("TGU_UltimateGroupHandler.GetUltimateGroupByAbilityPing") + _logger:logTrace("TGT_UltimateGroupHandler.GetUltimateGroupByAbilityPing") _logger:logDebug("abilityPing", abilityPing) end - for i, group in pairs(TGU_UltimateGroupHandler.UltimateGroups) do + for i, group in pairs(TGT_UltimateGroupHandler.UltimateGroups) do if (group.GroupAbilityPing == abilityPing) then return group end @@ -46,13 +46,13 @@ end --[[ GetUltimateGroupByAbilityId gets the ultimate group from given ability ID ]]-- -function TGU_UltimateGroupHandler.GetUltimateGroupByAbilityId(abilityID) +function TGT_UltimateGroupHandler.GetUltimateGroupByAbilityId(abilityID) if (LOG_ACTIVE) then - _logger:logTrace("TGU_UltimateGroupHandler.GetUltimateGroupByAbilityId") + _logger:logTrace("TGT_UltimateGroupHandler.GetUltimateGroupByAbilityId") _logger:logDebug("abilityID", abilityID) end - for i, group in pairs(TGU_UltimateGroupHandler.UltimateGroups) do + for i, group in pairs(TGT_UltimateGroupHandler.UltimateGroups) do if (group.GroupAbilityId == abilityID) then return group end @@ -67,13 +67,13 @@ end --[[ GetUltimateGroupByGroupName gets the ultimate group from given group name ]]-- -function TGU_UltimateGroupHandler.GetUltimateGroupByGroupName(groupName) +function TGT_UltimateGroupHandler.GetUltimateGroupByGroupName(groupName) if (LOG_ACTIVE) then - _logger:logTrace("TGU_UltimateGroupHandler.GetUltimateGroupByGroupName") + _logger:logTrace("TGT_UltimateGroupHandler.GetUltimateGroupByGroupName") _logger:logDebug("groupName", groupName) end - for i, group in pairs(TGU_UltimateGroupHandler.UltimateGroups) do + for i, group in pairs(TGT_UltimateGroupHandler.UltimateGroups) do if (string.lower(group.GroupName) == string.lower(groupName)) then return group end @@ -88,91 +88,91 @@ end --[[ GetUltimateGroups gets all ultimate groups ]]-- -function TGU_UltimateGroupHandler.GetUltimateGroups() - if (LOG_ACTIVE) then _logger:logTrace("TGU_UltimateGroupHandler.GetUltimateGroups") end +function TGT_UltimateGroupHandler.GetUltimateGroups() + if (LOG_ACTIVE) then _logger:logTrace("TGT_UltimateGroupHandler.GetUltimateGroups") end - return TGU_UltimateGroupHandler.UltimateGroups + return TGT_UltimateGroupHandler.UltimateGroups end --[[ CreateUltimateGroups Creates UltimateGroups array ]]-- -function TGU_UltimateGroupHandler.CreateUltimateGroups() - if (LOG_ACTIVE) then _logger:logTrace("TGU_UltimateGroupHandler.CreateUltimateGroups") end +function TGT_UltimateGroupHandler.CreateUltimateGroups() + if (LOG_ACTIVE) then _logger:logTrace("TGT_UltimateGroupHandler.CreateUltimateGroups") end -- Sorc local negate = {} negate.GroupName = "NEGATE" - negate.GroupDescription = GetString(TGU_DESCRIPTIONS_NEGATE) + negate.GroupDescription = GetString(TGT_DESCRIPTIONS_NEGATE) negate.GroupAbilityPing = 1 negate.GroupAbilityId = 29861 local atro = {} atro.GroupName = "ATRO" - atro.GroupDescription = GetString(TGU_DESCRIPTIONS_ATRO) + atro.GroupDescription = GetString(TGT_DESCRIPTIONS_ATRO) atro.GroupAbilityPing = 2 atro.GroupAbilityId = 30553 local overload = {} overload.GroupName = "OVER" - overload.GroupDescription = GetString(TGU_DESCRIPTIONS_OVER) + overload.GroupDescription = GetString(TGT_DESCRIPTIONS_OVER) overload.GroupAbilityPing = 3 overload.GroupAbilityId = 30366 -- Templar local sweep = {} sweep.GroupName = "SWEEP" - sweep.GroupDescription = GetString(TGU_DESCRIPTIONS_SWEEP) + sweep.GroupDescription = GetString(TGT_DESCRIPTIONS_SWEEP) sweep.GroupAbilityPing = 4 sweep.GroupAbilityId = 23788 local nova = {} nova.GroupName = "NOVA" - nova.GroupDescription = GetString(TGU_DESCRIPTIONS_NOVA) + nova.GroupDescription = GetString(TGT_DESCRIPTIONS_NOVA) nova.GroupAbilityPing = 5 nova.GroupAbilityId = 24301 local templarHeal = {} templarHeal.GroupName = "TPHEAL" - templarHeal.GroupDescription = GetString(TGU_DESCRIPTIONS_TPHEAL) + templarHeal.GroupDescription = GetString(TGT_DESCRIPTIONS_TPHEAL) templarHeal.GroupAbilityPing = 6 templarHeal.GroupAbilityId = 27413 -- DK local standard = {} standard.GroupName = "STAND" - standard.GroupDescription = GetString(TGU_DESCRIPTIONS_STAND) + standard.GroupDescription = GetString(TGT_DESCRIPTIONS_STAND) standard.GroupAbilityPing = 7 standard.GroupAbilityId = 34021 local leap = {} leap.GroupName = "LEAP" - leap.GroupDescription = GetString(TGU_DESCRIPTIONS_LEAP) + leap.GroupDescription = GetString(TGT_DESCRIPTIONS_LEAP) leap.GroupAbilityPing = 8 leap.GroupAbilityId = 33668 local magma = {} magma.GroupName = "MAGMA" - magma.GroupDescription = GetString(TGU_DESCRIPTIONS_MAGMA) + magma.GroupDescription = GetString(TGT_DESCRIPTIONS_MAGMA) magma.GroupAbilityPing = 9 magma.GroupAbilityId = 33841 -- NB local stroke = {} stroke.GroupName = "STROKE" - stroke.GroupDescription = GetString(TGU_DESCRIPTIONS_STROKE) + stroke.GroupDescription = GetString(TGT_DESCRIPTIONS_STROKE) stroke.GroupAbilityPing = 10 stroke.GroupAbilityId = 37545 local veil = {} veil.GroupName = "VEIL" - veil.GroupDescription = GetString(TGU_DESCRIPTIONS_VEIL) + veil.GroupDescription = GetString(TGT_DESCRIPTIONS_VEIL) veil.GroupAbilityPing = 11 veil.GroupAbilityId = 37713 local nbSoul = {} nbSoul.GroupName = "NBSOUL" - nbSoul.GroupDescription = GetString(TGU_DESCRIPTIONS_NBSOUL) + nbSoul.GroupDescription = GetString(TGT_DESCRIPTIONS_NBSOUL) nbSoul.GroupAbilityPing = 12 nbSoul.GroupAbilityId = 36207 @@ -181,121 +181,121 @@ function TGU_UltimateGroupHandler.CreateUltimateGroups() local wardenIce = {} wardenIce.GroupName = "FREEZE" - wardenIce.GroupDescription = GetString(TGU_DESCRIPTIONS_FREEZE) + wardenIce.GroupDescription = GetString(TGT_DESCRIPTIONS_FREEZE) wardenIce.GroupAbilityPing = 13 wardenIce.GroupAbilityId = 86112 local wardenHealing = {} wardenHealing.GroupName = "WDHEAL" - wardenHealing.GroupDescription = GetString(TGU_DESCRIPTIONS_WDHEAL) + wardenHealing.GroupDescription = GetString(TGT_DESCRIPTIONS_WDHEAL) wardenHealing.GroupAbilityPing = 14 wardenHealing.GroupAbilityId = 93971 -- Destro local staffIce = {} staffIce.GroupName = "ICE" - staffIce.GroupDescription = GetString(TGU_DESCRIPTIONS_ICE) + staffIce.GroupDescription = GetString(TGT_DESCRIPTIONS_ICE) staffIce.GroupAbilityPing = 15 staffIce.GroupAbilityId = 86542 local staffFire = {} staffFire.GroupName = "FIRE" - staffFire.GroupDescription = GetString(TGU_DESCRIPTIONS_FIRE) + staffFire.GroupDescription = GetString(TGT_DESCRIPTIONS_FIRE) staffFire.GroupAbilityPing = 16 staffFire.GroupAbilityId = 86536 local staffLightning = {} staffLightning.GroupName = "LIGHT" - staffLightning.GroupDescription = GetString(TGU_DESCRIPTIONS_LIGHT) + staffLightning.GroupDescription = GetString(TGT_DESCRIPTIONS_LIGHT) staffLightning.GroupAbilityPing = 17 staffLightning.GroupAbilityId = 86550 -- Restro local staffHeal = {} staffHeal.GroupName = "STHEAL" - staffHeal.GroupDescription = GetString(TGU_DESCRIPTIONS_STHEAL) + staffHeal.GroupDescription = GetString(TGT_DESCRIPTIONS_STHEAL) staffHeal.GroupAbilityPing = 18 staffHeal.GroupAbilityId = 86454 -- 2H local twoHand = {} twoHand.GroupName = "BERSERK" - twoHand.GroupDescription = GetString(TGU_DESCRIPTIONS_BERSERK) + twoHand.GroupDescription = GetString(TGT_DESCRIPTIONS_BERSERK) twoHand.GroupAbilityPing = 19 twoHand.GroupAbilityId = 86284 -- SB local shield = {} shield.GroupName = "SHIELD" - shield.GroupDescription = GetString(TGU_DESCRIPTIONS_SHIELD) + shield.GroupDescription = GetString(TGT_DESCRIPTIONS_SHIELD) shield.GroupAbilityPing = 20 shield.GroupAbilityId = 83292 -- DW local dual = {} dual.GroupName = "DUAL" - dual.GroupDescription = GetString(TGU_DESCRIPTIONS_DUAL) + dual.GroupDescription = GetString(TGT_DESCRIPTIONS_DUAL) dual.GroupAbilityPing = 21 dual.GroupAbilityId = 86410 -- BOW local bow = {} bow.GroupName = "BOW" - bow.GroupDescription = GetString(TGU_DESCRIPTIONS_BOW) + bow.GroupDescription = GetString(TGT_DESCRIPTIONS_BOW) bow.GroupAbilityPing = 22 bow.GroupAbilityId = 86620 -- Soul local soul = {} soul.GroupName = "SOUL" - soul.GroupDescription = GetString(TGU_DESCRIPTIONS_SOUL) + soul.GroupDescription = GetString(TGT_DESCRIPTIONS_SOUL) soul.GroupAbilityPing = 23 soul.GroupAbilityId = 43109 -- Werewolf local werewolf = {} werewolf.GroupName = "WERE" - werewolf.GroupDescription = GetString(TGU_DESCRIPTIONS_WERE) + werewolf.GroupDescription = GetString(TGT_DESCRIPTIONS_WERE) werewolf.GroupAbilityPing = 24 werewolf.GroupAbilityId = 42379 -- Vamp local vamp = {} vamp.GroupName = "VAMP" - vamp.GroupDescription = GetString(TGU_DESCRIPTIONS_VAMP) + vamp.GroupDescription = GetString(TGT_DESCRIPTIONS_VAMP) vamp.GroupAbilityPing = 25 vamp.GroupAbilityId = 41937 -- Mageguild local meteor = {} meteor.GroupName = "METEOR" - meteor.GroupDescription = GetString(TGU_DESCRIPTIONS_METEOR) + meteor.GroupDescription = GetString(TGT_DESCRIPTIONS_METEOR) meteor.GroupAbilityPing = 26 meteor.GroupAbilityId = 42492 -- Fighterguild local dawnbreaker = {} dawnbreaker.GroupName = "DAWN" - dawnbreaker.GroupDescription = GetString(TGU_DESCRIPTIONS_DAWN) + dawnbreaker.GroupDescription = GetString(TGT_DESCRIPTIONS_DAWN) dawnbreaker.GroupAbilityPing = 27 dawnbreaker.GroupAbilityId = 42598 -- Support local barrier = {} barrier.GroupName = "BARRIER" - barrier.GroupDescription = GetString(TGU_DESCRIPTIONS_BARRIER) + barrier.GroupDescription = GetString(TGT_DESCRIPTIONS_BARRIER) barrier.GroupAbilityPing = 28 barrier.GroupAbilityId = 46622 -- Assault local horn = {} horn.GroupName = "HORN" - horn.GroupDescription = GetString(TGU_DESCRIPTIONS_HORN) + horn.GroupDescription = GetString(TGT_DESCRIPTIONS_HORN) horn.GroupAbilityPing = 29 horn.GroupAbilityId = 46537 -- Add groups - TGU_UltimateGroupHandler.UltimateGroups = + TGT_UltimateGroupHandler.UltimateGroups = { negate, atro, overload, sweep, nova, templarHeal, @@ -311,12 +311,12 @@ function TGU_UltimateGroupHandler.CreateUltimateGroups() end --[[ - Initialize initializes TGU_UltimateGroupHandler + Initialize initializes TGT_UltimateGroupHandler ]]-- -function TGU_UltimateGroupHandler.Initialize(logger) - if (LOG_ACTIVE) then logger:logTrace("TGU_UltimateGroupHandler.Initialize") end +function TGT_UltimateGroupHandler.Initialize(logger) + if (LOG_ACTIVE) then logger:logTrace("TGT_UltimateGroupHandler.Initialize") end _logger = logger - TGU_UltimateGroupHandler.CreateUltimateGroups() + TGT_UltimateGroupHandler.CreateUltimateGroups() end \ No newline at end of file diff --git a/TaosGroupTools/ui/CompactSwimlaneList.lua b/TaosGroupTools/ui/CompactSwimlaneList.lua index 562499c..45de2a9 100644 --- a/TaosGroupTools/ui/CompactSwimlaneList.lua +++ b/TaosGroupTools/ui/CompactSwimlaneList.lua @@ -20,33 +20,33 @@ local _control = nil --[[ Table CompactSwimlaneList ]]-- -TGU_CompactSwimlaneList = {} -TGU_CompactSwimlaneList.__index = TGU_CompactSwimlaneList +TGT_CompactSwimlaneList = {} +TGT_CompactSwimlaneList.__index = TGT_CompactSwimlaneList --[[ Table Members ]]-- -TGU_CompactSwimlaneList.Name = "TGU-CompactSwimlaneList" -TGU_CompactSwimlaneList.IsMocked = false -TGU_CompactSwimlaneList.Swimlanes = {} +TGT_CompactSwimlaneList.Name = "TGT-CompactSwimlaneList" +TGT_CompactSwimlaneList.IsMocked = false +TGT_CompactSwimlaneList.Swimlanes = {} --[[ Sets visibility of labels ]]-- -function TGU_CompactSwimlaneList.RefreshList() - if (LOG_ACTIVE) then _logger:logTrace("TGU_CompactSwimlaneList.RefreshList") end +function TGT_CompactSwimlaneList.RefreshList() + if (LOG_ACTIVE) then _logger:logTrace("TGT_CompactSwimlaneList.RefreshList") end -- Check all swimlanes - for i,swimlane in ipairs(TGU_CompactSwimlaneList.Swimlanes) do - TGU_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlane) + for i,swimlane in ipairs(TGT_CompactSwimlaneList.Swimlanes) do + TGT_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlane) end end --[[ Sorts swimlane ]]-- -function TGU_CompactSwimlaneList.SortSwimlane(swimlane) - if (LOG_ACTIVE) then _logger:logTrace("TGU_CompactSwimlaneList.SortSwimlane") end +function TGT_CompactSwimlaneList.SortSwimlane(swimlane) + if (LOG_ACTIVE) then _logger:logTrace("TGT_CompactSwimlaneList.SortSwimlane") end -- Comparer function compare(playerLeft, playerRight) @@ -63,16 +63,16 @@ function TGU_CompactSwimlaneList.SortSwimlane(swimlane) -- Update sorted swimlane list for i,swimlanePlayer in ipairs(swimlane.Players) do - TGU_CompactSwimlaneList.UpdateListRow(swimlane.SwimlaneControl:GetNamedChild("Row" .. i), swimlanePlayer) + TGT_CompactSwimlaneList.UpdateListRow(swimlane.SwimlaneControl:GetNamedChild("Row" .. i), swimlanePlayer) end end --[[ Updates list row ]]-- -function TGU_CompactSwimlaneList.UpdateListRow(row, player) +function TGT_CompactSwimlaneList.UpdateListRow(row, player) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.UpdateListRow") + _logger:logTrace("TGT_CompactSwimlaneList.UpdateListRow") end local playerName = player.PlayerName @@ -105,16 +105,16 @@ end --[[ Updates list row ]]-- -function TGU_CompactSwimlaneList.UpdatePlayer(player) +function TGT_CompactSwimlaneList.UpdatePlayer(player) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.UpdatePlayer") + _logger:logTrace("TGT_CompactSwimlaneList.UpdatePlayer") end if (player) then - local swimLane = TGU_CompactSwimlaneList.GetSwimLane(player.UltimateGroup.GroupAbilityId) + local swimLane = TGT_CompactSwimlaneList.GetSwimLane(player.UltimateGroup.GroupAbilityId) if (swimLane) then - local row = TGU_CompactSwimlaneList.GetSwimLaneRow(swimLane, player.PlayerName) + local row = TGT_CompactSwimlaneList.GetSwimLaneRow(swimLane, player.PlayerName) -- Update timestamp if (row ~= nil) then @@ -136,29 +136,29 @@ function TGU_CompactSwimlaneList.UpdatePlayer(player) if (nextFreeRow <= ROWS) then if (LOG_ACTIVE) then - _logger:logDebug("TGU_CompactSwimlaneList.UpdatePlayer, add player " .. tostring(player.PlayerName) .. " to row " .. tostring(nextFreeRow)) + _logger:logDebug("TGT_CompactSwimlaneList.UpdatePlayer, add player " .. tostring(player.PlayerName) .. " to row " .. tostring(nextFreeRow)) end player.LastMapPingTimestamp = GetTimeStamp() swimLane.Players[nextFreeRow] = player row = swimLane.SwimlaneControl:GetNamedChild("Row" .. nextFreeRow) else - if (LOG_ACTIVE) then _logger:logDebug("TGU_CompactSwimlaneList.UpdatePlayer, too much players for one swimlane " .. tostring(nextFreeRow)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_CompactSwimlaneList.UpdatePlayer, too much players for one swimlane " .. tostring(nextFreeRow)) end end end -- Only update if player in a row if (row ~= nil) then - if (TGU_SettingsHandler.SavedVariables.IsSortingActive) then + if (TGT_SettingsHandler.SavedVariables.IsSortingActive) then -- Sort swimlane with all players - TGU_CompactSwimlaneList.SortSwimlane(swimLane) + TGT_CompactSwimlaneList.SortSwimlane(swimLane) else -- Directly update row with player - TGU_CompactSwimlaneList.UpdateListRow(row, player) + TGT_CompactSwimlaneList.UpdateListRow(row, player) end end else - if (LOG_ACTIVE) then _logger:logDebug("TGU_CompactSwimlaneList.UpdatePlayer, swimlane not found for ultimategroup " .. tostring(ultimateGroup.GroupName)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_CompactSwimlaneList.UpdatePlayer, swimlane not found for ultimategroup " .. tostring(ultimateGroup.GroupName)) end end end end @@ -166,23 +166,23 @@ end --[[ Get swimlane from current SwimLanes ]]-- -function TGU_CompactSwimlaneList.GetSwimLane(ultimateGroupId) +function TGT_CompactSwimlaneList.GetSwimLane(ultimateGroupId) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.GetSwimLane") + _logger:logTrace("TGT_CompactSwimlaneList.GetSwimLane") _logger:logDebug("ultimateGroupId", ultimateGroupId) end if (ultimateGroupId ~= 0) then - for i,swimLane in ipairs(TGU_CompactSwimlaneList.Swimlanes) do + for i,swimLane in ipairs(TGT_CompactSwimlaneList.Swimlanes) do if (swimLane.UltimateGroupId == ultimateGroupId) then return swimLane end end - if (LOG_ACTIVE) then _logger:logDebug("TGU_CompactSwimlaneList.GetSwimLane, swimLane not found " .. tostring(ultimateGroupId)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_CompactSwimlaneList.GetSwimLane, swimLane not found " .. tostring(ultimateGroupId)) end return nil else - _logger:logError("TGU_CompactSwimlaneList.GetSwimLane, ultimateGroupId is 0") + _logger:logError("TGT_CompactSwimlaneList.GetSwimLane, ultimateGroupId is 0") return nil end end @@ -190,9 +190,9 @@ end --[[ Get Player Row from current players in swimlane ]]-- -function TGU_CompactSwimlaneList.GetSwimLaneRow(swimLane, playerName) +function TGT_CompactSwimlaneList.GetSwimLaneRow(swimLane, playerName) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.GetSwimLaneRow") + _logger:logTrace("TGT_CompactSwimlaneList.GetSwimLaneRow") _logger:logDebug("swimLane ID", swimLane.Id) end @@ -204,10 +204,10 @@ function TGU_CompactSwimlaneList.GetSwimLaneRow(swimLane, playerName) end end - if (LOG_ACTIVE) then _logger:logDebug("TGU_CompactSwimlaneList.GetSwimLane, player not found " .. tostring(playerName)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_CompactSwimlaneList.GetSwimLane, player not found " .. tostring(playerName)) end return nil else - _logger:logError("TGU_CompactSwimlaneList.GetSwimLane, swimLane is nil") + _logger:logError("TGT_CompactSwimlaneList.GetSwimLane, swimLane is nil") return nil end end @@ -215,9 +215,9 @@ end --[[ Clears all players in swimlane ]]-- -function TGU_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlane) +function TGT_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlane) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.ClearPlayersFromSwimlane") + _logger:logTrace("TGT_CompactSwimlaneList.ClearPlayersFromSwimlane") _logger:logDebug("swimlane ID", swimlane.Id) end @@ -229,7 +229,7 @@ function TGU_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlane) if (swimlanePlayer ~= nil) then local isPlayerNotGrouped = IsUnitGrouped(swimlanePlayer.PingTag) == false - if (TGU_CompactSwimlaneList.IsMocked) then + if (TGT_CompactSwimlaneList.IsMocked) then isPlayerNotGrouped = false end @@ -254,9 +254,9 @@ end --[[ SetControlMovable sets the Movable and MouseEnabled flag in UI elements ]]-- -function TGU_CompactSwimlaneList.SetControlMovable(isMovable) +function TGT_CompactSwimlaneList.SetControlMovable(isMovable) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.SetControlMovable") + _logger:logTrace("TGT_CompactSwimlaneList.SetControlMovable") _logger:logDebug("isMovable", isMovable) end @@ -267,11 +267,11 @@ function TGU_CompactSwimlaneList.SetControlMovable(isMovable) end --[[ - RestorePosition sets TGU_CompactSwimlaneList on settings position + RestorePosition sets TGT_CompactSwimlaneList on settings position ]]-- -function TGU_CompactSwimlaneList.RestorePosition(posX, posY) +function TGT_CompactSwimlaneList.RestorePosition(posX, posY) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.RestorePosition") + _logger:logTrace("TGT_CompactSwimlaneList.RestorePosition") _logger:logDebug("posX, posY", posX, posY) end @@ -280,28 +280,28 @@ function TGU_CompactSwimlaneList.RestorePosition(posX, posY) end --[[ - OnTGU_CompactSwimlaneListMoveStop saves current TGU_CompactSwimlaneList position to settings + OnTGT_CompactSwimlaneListMoveStop saves current TGT_CompactSwimlaneList position to settings ]]-- -function TGU_CompactSwimlaneList.OnCompactSwimlaneListMoveStop() - if (LOG_ACTIVE) then _logger:logTrace("TGU_CompactSwimlaneList.OnCompactSwimlaneListMoveStop") end +function TGT_CompactSwimlaneList.OnCompactSwimlaneListMoveStop() + if (LOG_ACTIVE) then _logger:logTrace("TGT_CompactSwimlaneList.OnCompactSwimlaneListMoveStop") end local left = _control:GetLeft() local top = _control:GetTop() - TGU_SettingsHandler.SavedVariables.PosX = left - TGU_SettingsHandler.SavedVariables.PosY = top + TGT_SettingsHandler.SavedVariables.PosX = left + TGT_SettingsHandler.SavedVariables.PosY = top if (LOG_ACTIVE) then - _logger:logDebug("PosX, PosY", TGU_SettingsHandler.SavedVariables.PosX, TGU_SettingsHandler.SavedVariables.PosY) + _logger:logDebug("PosX, PosY", TGT_SettingsHandler.SavedVariables.PosX, TGT_SettingsHandler.SavedVariables.PosY) end end --[[ SetControlHidden sets hidden on control ]]-- -function TGU_CompactSwimlaneList.SetControlHidden(isHidden) +function TGT_CompactSwimlaneList.SetControlHidden(isHidden) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.SetControlHidden") + _logger:logTrace("TGT_CompactSwimlaneList.SetControlHidden") _logger:logDebug("isHidden", isHidden) end @@ -315,116 +315,116 @@ end --[[ SetControlActive sets hidden on control ]]-- -function TGU_CompactSwimlaneList.SetControlActive() +function TGT_CompactSwimlaneList.SetControlActive() if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.SetControlActive") + _logger:logTrace("TGT_CompactSwimlaneList.SetControlActive") end - local isHidden = TGU_SettingsHandler.IsCompactSwimlaneListVisible() == false + local isHidden = TGT_SettingsHandler.IsCompactSwimlaneListVisible() == false if (LOG_ACTIVE) then _logger:logDebug("isHidden", isHidden) end - TGU_CompactSwimlaneList.SetControlHidden(isHidden or CurrentHudHiddenState()) + TGT_CompactSwimlaneList.SetControlHidden(isHidden or CurrentHudHiddenState()) if (isHidden) then -- Start timeout timer - EVENT_MANAGER:UnregisterForUpdate(TGU_CompactSwimlaneList.Name) + EVENT_MANAGER:UnregisterForUpdate(TGT_CompactSwimlaneList.Name) - CALLBACK_MANAGER:UnregisterCallback(TAO_GROUP_CHANGED, TGU_CompactSwimlaneList.RefreshList) - CALLBACK_MANAGER:UnregisterCallback(TGU_PLAYER_DATA_CHANGED, TGU_CompactSwimlaneList.UpdatePlayer) - CALLBACK_MANAGER:UnregisterCallback(TGU_MOVABLE_CHANGED, TGU_CompactSwimlaneList.SetControlMovable) - CALLBACK_MANAGER:UnregisterCallback(TGU_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGU_CompactSwimlaneList.SetSwimlaneUltimate) - CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_CompactSwimlaneList.SetControlHidden) + CALLBACK_MANAGER:UnregisterCallback(TAO_GROUP_CHANGED, TGT_CompactSwimlaneList.RefreshList) + CALLBACK_MANAGER:UnregisterCallback(TGT_PLAYER_DATA_CHANGED, TGT_CompactSwimlaneList.UpdatePlayer) + CALLBACK_MANAGER:UnregisterCallback(TGT_MOVABLE_CHANGED, TGT_CompactSwimlaneList.SetControlMovable) + CALLBACK_MANAGER:UnregisterCallback(TGT_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGT_CompactSwimlaneList.SetSwimlaneUltimate) + CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_CompactSwimlaneList.SetControlHidden) -- Invis - TGU_CompactSwimlaneList.SetControlHidden(isHidden) + TGT_CompactSwimlaneList.SetControlHidden(isHidden) else - TGU_CompactSwimlaneList.SetControlMovable(TGU_SettingsHandler.SavedVariables.Movable) - TGU_CompactSwimlaneList.RestorePosition(TGU_SettingsHandler.SavedVariables.PosX, TGU_SettingsHandler.SavedVariables.PosY) + TGT_CompactSwimlaneList.SetControlMovable(TGT_SettingsHandler.SavedVariables.Movable) + TGT_CompactSwimlaneList.RestorePosition(TGT_SettingsHandler.SavedVariables.PosX, TGT_SettingsHandler.SavedVariables.PosY) -- Start timeout timer - EVENT_MANAGER:RegisterForUpdate(TGU_CompactSwimlaneList.Name, REFRESHRATE, TGU_CompactSwimlaneList.RefreshList) + EVENT_MANAGER:RegisterForUpdate(TGT_CompactSwimlaneList.Name, REFRESHRATE, TGT_CompactSwimlaneList.RefreshList) - CALLBACK_MANAGER:RegisterCallback(TAO_GROUP_CHANGED, TGU_CompactSwimlaneList.RefreshList) - CALLBACK_MANAGER:RegisterCallback(TGU_PLAYER_DATA_CHANGED, TGU_CompactSwimlaneList.UpdatePlayer) - CALLBACK_MANAGER:RegisterCallback(TGU_MOVABLE_CHANGED, TGU_CompactSwimlaneList.SetControlMovable) - CALLBACK_MANAGER:RegisterCallback(TGU_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGU_CompactSwimlaneList.SetSwimlaneUltimate) - CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_CompactSwimlaneList.SetControlHidden) + CALLBACK_MANAGER:RegisterCallback(TAO_GROUP_CHANGED, TGT_CompactSwimlaneList.RefreshList) + CALLBACK_MANAGER:RegisterCallback(TGT_PLAYER_DATA_CHANGED, TGT_CompactSwimlaneList.UpdatePlayer) + CALLBACK_MANAGER:RegisterCallback(TGT_MOVABLE_CHANGED, TGT_CompactSwimlaneList.SetControlMovable) + CALLBACK_MANAGER:RegisterCallback(TGT_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGT_CompactSwimlaneList.SetSwimlaneUltimate) + CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_CompactSwimlaneList.SetControlHidden) end end --[[ OnSwimlaneHeaderClicked called on header clicked ]]-- -function TGU_CompactSwimlaneList.OnSwimlaneHeaderClicked(button, swimlaneId) +function TGT_CompactSwimlaneList.OnSwimlaneHeaderClicked(button, swimlaneId) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.OnSwimlaneHeaderClicked") + _logger:logTrace("TGT_CompactSwimlaneList.OnSwimlaneHeaderClicked") _logger:logDebug("swimlaneId", swimlaneId) end if (button ~= nil) then - CALLBACK_MANAGER:RegisterCallback(TGU_SET_ULTIMATE_GROUP, TGU_CompactSwimlaneList.OnSetUltimateGroup) - CALLBACK_MANAGER:FireCallbacks(TGU_SHOW_ULTIMATE_GROUP_MENU, button, swimlaneId) + CALLBACK_MANAGER:RegisterCallback(TGT_SET_ULTIMATE_GROUP, TGT_CompactSwimlaneList.OnSetUltimateGroup) + CALLBACK_MANAGER:FireCallbacks(TGT_SHOW_ULTIMATE_GROUP_MENU, button, swimlaneId) else - _logger:logError("TGU_CompactSwimlaneList.OnSwimlaneHeaderClicked, button nil") + _logger:logError("TGT_CompactSwimlaneList.OnSwimlaneHeaderClicked, button nil") end end --[[ OnSetUltimateGroup called on header clicked ]]-- -function TGU_CompactSwimlaneList.OnSetUltimateGroup(group, swimlaneId) +function TGT_CompactSwimlaneList.OnSetUltimateGroup(group, swimlaneId) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.OnSetUltimateGroup") + _logger:logTrace("TGT_CompactSwimlaneList.OnSetUltimateGroup") _logger:logDebug("group.GroupName, swimlaneId", group.GroupName, swimlaneId) end - CALLBACK_MANAGER:UnregisterCallback(TGU_SET_ULTIMATE_GROUP, TGU_CompactSwimlaneList.OnSetUltimateGroup) + CALLBACK_MANAGER:UnregisterCallback(TGT_SET_ULTIMATE_GROUP, TGT_CompactSwimlaneList.OnSetUltimateGroup) if (group ~= nil and swimlaneId ~= nil and swimlaneId >= 1 and swimlaneId <= 6) then - TGU_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlaneId, group) + TGT_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlaneId, group) else - _logger:logError("TGU_UltimateGroupMenu.ShowUltimateGroupMenu, group nil or swimlaneId invalid") + _logger:logError("TGT_UltimateGroupMenu.ShowUltimateGroupMenu, group nil or swimlaneId invalid") end end --[[ SetSwimlaneUltimate sets the swimlane header icon in base of ultimateGroupId ]]-- -function TGU_CompactSwimlaneList.SetSwimlaneUltimate(swimlaneId, ultimateGroup) +function TGT_CompactSwimlaneList.SetSwimlaneUltimate(swimlaneId, ultimateGroup) if (LOG_ACTIVE) then - _logger:logTrace("TGU_CompactSwimlaneList.SetSwimlaneUltimate") + _logger:logTrace("TGT_CompactSwimlaneList.SetSwimlaneUltimate") _logger:logDebug("ultimateGroup.GroupName, swimlaneId", ultimateGroup.GroupName, swimlaneId) end - local swimlaneObject = TGU_CompactSwimlaneList.Swimlanes[swimlaneId] + local swimlaneObject = TGT_CompactSwimlaneList.Swimlanes[swimlaneId] local iconControl = swimlaneObject.SwimlaneControl:GetNamedChild("Header"):GetNamedChild("SelectorButtonControl"):GetNamedChild("Icon") if (ultimateGroup ~= nil and iconControl ~= nil) then iconControl:SetTexture(GetAbilityIcon(ultimateGroup.GroupAbilityId)) swimlaneObject.UltimateGroupId = ultimateGroup.GroupAbilityId - TGU_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlaneObject) + TGT_CompactSwimlaneList.ClearPlayersFromSwimlane(swimlaneObject) else - _logger:logError("TGU_CompactSwimlaneList.SetSwimlaneUltimateIcon, icon is " .. tostring(icon) .. ";" .. tostring(iconControl) .. ";" .. tostring(ultimateGroup)) + _logger:logError("TGT_CompactSwimlaneList.SetSwimlaneUltimateIcon, icon is " .. tostring(icon) .. ";" .. tostring(iconControl) .. ";" .. tostring(ultimateGroup)) end end --[[ CreateCompactSwimlaneListHeaders creates swimlane list headers ]]-- -function TGU_CompactSwimlaneList.CreateCompactSwimlaneListHeaders() - if (LOG_ACTIVE) then _logger:logTrace("TGU_CompactSwimlaneList.CreateCompactSwimlaneListHeaders") end +function TGT_CompactSwimlaneList.CreateCompactSwimlaneListHeaders() + if (LOG_ACTIVE) then _logger:logTrace("TGT_CompactSwimlaneList.CreateCompactSwimlaneListHeaders") end for i=1, SWIMLANES, 1 do - local ultimateGroupId = TGU_SettingsHandler.SavedVariables.SwimlaneUltimateGroupIds[i] - local ultimateGroup = TGU_UltimateGroupHandler.GetUltimateGroupByAbilityId(ultimateGroupId) + local ultimateGroupId = TGT_SettingsHandler.SavedVariables.SwimlaneUltimateGroupIds[i] + local ultimateGroup = TGT_UltimateGroupHandler.GetUltimateGroupByAbilityId(ultimateGroupId) local swimlaneControlName = "Swimlane" .. tostring(i) local swimlaneControl = _control:GetNamedChild(swimlaneControlName) -- Add button local button = swimlaneControl:GetNamedChild("Header"):GetNamedChild("SelectorButtonControl"):GetNamedChild("Button") - button:SetHandler("OnClicked", function() TGU_CompactSwimlaneList.OnSwimlaneHeaderClicked(button, i) end) + button:SetHandler("OnClicked", function() TGT_CompactSwimlaneList.OnSwimlaneHeaderClicked(button, i) end) local swimLane = {} swimLane.Id = i @@ -443,19 +443,19 @@ function TGU_CompactSwimlaneList.CreateCompactSwimlaneListHeaders() swimLane.UltimateGroupId = ultimateGroup.GroupAbilityId else - _logger:logError("TGU_CompactSwimlaneList.CreateCompactSwimlaneListHeaders, ultimateGroup nil.") + _logger:logError("TGT_CompactSwimlaneList.CreateCompactSwimlaneListHeaders, ultimateGroup nil.") end - TGU_CompactSwimlaneList.CreateCompactSwimlaneListRows(swimlaneControl) - TGU_CompactSwimlaneList.Swimlanes[i] = swimLane + TGT_CompactSwimlaneList.CreateCompactSwimlaneListRows(swimlaneControl) + TGT_CompactSwimlaneList.Swimlanes[i] = swimLane end end --[[ CreateCompactSwimlaneListRows creates swimlane lsit rows ]]-- -function TGU_CompactSwimlaneList.CreateCompactSwimlaneListRows(swimlaneControl) - if (LOG_ACTIVE) then _logger:logTrace("TGU_CompactSwimlaneList.CreateCompactSwimlaneListRows") end +function TGT_CompactSwimlaneList.CreateCompactSwimlaneListRows(swimlaneControl) + if (LOG_ACTIVE) then _logger:logTrace("TGT_CompactSwimlaneList.CreateCompactSwimlaneListRows") end if (swimlaneControl ~= nil) then for i=1, ROWS, 1 do @@ -475,26 +475,26 @@ function TGU_CompactSwimlaneList.CreateCompactSwimlaneListRows(swimlaneControl) lastRow = row end else - _logger:logError("TGU_CompactSwimlaneList.CreateCompactSwimlaneListRows, swimlaneControl nil.") + _logger:logError("TGT_CompactSwimlaneList.CreateCompactSwimlaneListRows, swimlaneControl nil.") end end --[[ - Initialize initializes TGU_CompactSwimlaneList + Initialize initializes TGT_CompactSwimlaneList ]]-- -function TGU_CompactSwimlaneList.Initialize(logger, isMocked) +function TGT_CompactSwimlaneList.Initialize(logger, isMocked) if (LOG_ACTIVE) then - logger:logTrace("TGU_CompactSwimlaneList.Initialize") + logger:logTrace("TGT_CompactSwimlaneList.Initialize") end _logger = logger - _control = TGU_CompactSwimlaneListControl + _control = TGT_CompactSwimlaneListControl - TGU_CompactSwimlaneList.IsMocked = isMocked + TGT_CompactSwimlaneList.IsMocked = isMocked - TGU_CompactSwimlaneList.CreateCompactSwimlaneListHeaders() + TGT_CompactSwimlaneList.CreateCompactSwimlaneListHeaders() - CALLBACK_MANAGER:RegisterCallback(TGU_STYLE_CHANGED, TGU_CompactSwimlaneList.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TGU_IS_ZONE_CHANGED, TGU_CompactSwimlaneList.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGU_CompactSwimlaneList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_STYLE_CHANGED, TGT_CompactSwimlaneList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_IS_ZONE_CHANGED, TGT_CompactSwimlaneList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGT_CompactSwimlaneList.SetControlActive) end \ No newline at end of file diff --git a/TaosGroupTools/ui/CompactSwimlaneList.xml b/TaosGroupTools/ui/CompactSwimlaneList.xml index 2b7c426..4213f67 100644 --- a/TaosGroupTools/ui/CompactSwimlaneList.xml +++ b/TaosGroupTools/ui/CompactSwimlaneList.xml @@ -1,9 +1,9 @@ <GuiXml> <Controls> - <TopLevelControl name="TGU_CompactSwimlaneListControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> + <TopLevelControl name="TGT_CompactSwimlaneListControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> <Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT"/> <Dimensions x="310" y="200" /> - <OnMoveStop>TGU_CompactSwimlaneList:OnCompactSwimlaneListMoveStop()</OnMoveStop> + <OnMoveStop>TGT_CompactSwimlaneList:OnCompactSwimlaneListMoveStop()</OnMoveStop> <Controls> <Control name="$(parent)MovableControl" tier="PARENT" inherits="MovableBackdropControl"> diff --git a/TaosGroupTools/ui/GroupUltimateSelector.lua b/TaosGroupTools/ui/GroupUltimateSelector.lua index bb648bf..2a74bf1 100644 --- a/TaosGroupTools/ui/GroupUltimateSelector.lua +++ b/TaosGroupTools/ui/GroupUltimateSelector.lua @@ -15,8 +15,8 @@ local _control = nil --[[ Table GroupUltimateSelector ]]-- -TGU_GroupUltimateSelector = {} -TGU_GroupUltimateSelector.__index = TGU_GroupUltimateSelector +TGT_GroupUltimateSelector = {} +TGT_GroupUltimateSelector.__index = TGT_GroupUltimateSelector --[[ Table Members @@ -25,9 +25,9 @@ TGU_GroupUltimateSelector.__index = TGU_GroupUltimateSelector --[[ SetUltimateIcon sets the button icon in base of staticUltimateID ]]-- -function TGU_GroupUltimateSelector.SetUltimateIcon(staticUltimateID) +function TGT_GroupUltimateSelector.SetUltimateIcon(staticUltimateID) if (LOG_ACTIVE) then - _logger:logTrace("TGU_GroupUltimateSelector.SetUltimateIcon") + _logger:logTrace("TGT_GroupUltimateSelector.SetUltimateIcon") _logger:logDebug("staticUltimateID", staticUltimateID) end @@ -42,16 +42,16 @@ function TGU_GroupUltimateSelector.SetUltimateIcon(staticUltimateID) if (icon ~= nil and iconControl ~= nil) then iconControl:SetTexture(icon) else - _logger:logError("TGU_GroupUltimateSelector.SetUltimateIcon, icon is " .. tostring(icon) .. "; iconControl is " .. tostring(iconControl)) + _logger:logError("TGT_GroupUltimateSelector.SetUltimateIcon, icon is " .. tostring(icon) .. "; iconControl is " .. tostring(iconControl)) end end --[[ SetControlMovable sets the Movable and MouseEnabled flag in UI elements ]]-- -function TGU_GroupUltimateSelector.SetControlMovable(isMovable) +function TGT_GroupUltimateSelector.SetControlMovable(isMovable) if (LOG_ACTIVE) then - _logger:logTrace("TGU_GroupUltimateSelector.SetControlMovable") + _logger:logTrace("TGT_GroupUltimateSelector.SetControlMovable") _logger:logDebug("isMovable", isMovable) end @@ -62,11 +62,11 @@ function TGU_GroupUltimateSelector.SetControlMovable(isMovable) end --[[ - RestorePosition sets TGU_GroupUltimateSelector on settings position + RestorePosition sets TGT_GroupUltimateSelector on settings position ]]-- -function TGU_GroupUltimateSelector.RestorePosition(posX, posY) +function TGT_GroupUltimateSelector.RestorePosition(posX, posY) if (LOG_ACTIVE) then - _logger:logTrace("TGU_GroupUltimateSelector.RestorePosition") + _logger:logTrace("TGT_GroupUltimateSelector.RestorePosition") _logger:logDebug("posX, posY", posX, posY) end @@ -75,62 +75,62 @@ function TGU_GroupUltimateSelector.RestorePosition(posX, posY) end --[[ - OnTGU_GroupUltimateSelectorMoveStop saves current TGU_GroupUltimateSelector position to settings + OnTGT_GroupUltimateSelectorMoveStop saves current TGT_GroupUltimateSelector position to settings ]]-- -function TGU_GroupUltimateSelector.OnGroupUltimateSelectorMoveStop() - if (LOG_ACTIVE) then _logger:logTrace("TGU_GroupUltimateSelector.OnGroupUltimateSelectorMoveStop") end +function TGT_GroupUltimateSelector.OnGroupUltimateSelectorMoveStop() + if (LOG_ACTIVE) then _logger:logTrace("TGT_GroupUltimateSelector.OnGroupUltimateSelectorMoveStop") end local left = _control:GetLeft() local top = _control:GetTop() - TGU_SettingsHandler.SavedVariables.SelectorPosX = left - TGU_SettingsHandler.SavedVariables.SelectorPosY = top + TGT_SettingsHandler.SavedVariables.SelectorPosX = left + TGT_SettingsHandler.SavedVariables.SelectorPosY = top if (LOG_ACTIVE) then - _logger:logDebug("PosX, PosY", TGU_SettingsHandler.SavedVariables.SelectorPosX, TGU_SettingsHandler.SavedVariables.SelectorPosY) + _logger:logDebug("PosX, PosY", TGT_SettingsHandler.SavedVariables.SelectorPosX, TGT_SettingsHandler.SavedVariables.SelectorPosY) end end --[[ OnGroupUltimateSelectorClicked shows ultimate group menu ]]-- -function TGU_GroupUltimateSelector.OnGroupUltimateSelectorClicked() - if (LOG_ACTIVE) then _logger:logTrace("TGU_GroupUltimateSelector.OnGroupUltimateSelectorClicked") end +function TGT_GroupUltimateSelector.OnGroupUltimateSelectorClicked() + if (LOG_ACTIVE) then _logger:logTrace("TGT_GroupUltimateSelector.OnGroupUltimateSelectorClicked") end local button = _control:GetNamedChild("SelectorButtonControl"):GetNamedChild("Button") if (button ~= nil) then - CALLBACK_MANAGER:RegisterCallback(TGU_SET_ULTIMATE_GROUP, TGU_GroupUltimateSelector.OnSetUltimateGroup) - CALLBACK_MANAGER:FireCallbacks(TGU_SHOW_ULTIMATE_GROUP_MENU, button) + CALLBACK_MANAGER:RegisterCallback(TGT_SET_ULTIMATE_GROUP, TGT_GroupUltimateSelector.OnSetUltimateGroup) + CALLBACK_MANAGER:FireCallbacks(TGT_SHOW_ULTIMATE_GROUP_MENU, button) else - _logger:logError("TGU_GroupUltimateSelector.OnGroupUltimateSelectorClicked, button nil") + _logger:logError("TGT_GroupUltimateSelector.OnGroupUltimateSelectorClicked, button nil") end end --[[ OnSetUltimateGroup sets ultimate group for button ]]-- -function TGU_GroupUltimateSelector.OnSetUltimateGroup(group) +function TGT_GroupUltimateSelector.OnSetUltimateGroup(group) if (LOG_ACTIVE) then - _logger:logTrace("TGU_GroupUltimateSelector.OnSetUltimateGroup") + _logger:logTrace("TGT_GroupUltimateSelector.OnSetUltimateGroup") _logger:logDebug("group.GroupName", group.GroupName) end - CALLBACK_MANAGER:UnregisterCallback(TGU_SET_ULTIMATE_GROUP, TGU_GroupUltimateSelector.OnSetUltimateGroup) + CALLBACK_MANAGER:UnregisterCallback(TGT_SET_ULTIMATE_GROUP, TGT_GroupUltimateSelector.OnSetUltimateGroup) if (group ~= nil) then - TGU_SettingsHandler.SetStaticUltimateIDSettings(group.GroupAbilityId) + TGT_SettingsHandler.SetStaticUltimateIDSettings(group.GroupAbilityId) else - _logger:logError("TGU_UltimateGroupMenu.ShowUltimateGroupMenu, group nil") + _logger:logError("TGT_UltimateGroupMenu.ShowUltimateGroupMenu, group nil") end end --[[ SetControlHidden sets hidden on control ]]-- -function TGU_GroupUltimateSelector.SetControlHidden(isHidden) +function TGT_GroupUltimateSelector.SetControlHidden(isHidden) if (LOG_ACTIVE) then - _logger:logTrace("TGU_GroupUltimateSelector.SetControlHidden") + _logger:logTrace("TGT_GroupUltimateSelector.SetControlHidden") _logger:logDebug("isHidden", isHidden) end @@ -144,44 +144,44 @@ end --[[ SetControlActive activates/deactivates control ]]-- -function TGU_GroupUltimateSelector.SetControlActive() +function TGT_GroupUltimateSelector.SetControlActive() if (LOG_ACTIVE) then - _logger:logTrace("TGU_GroupUltimateSelector.SetControlActive") + _logger:logTrace("TGT_GroupUltimateSelector.SetControlActive") end - local isHidden = TGU_SettingsHandler.IsControlsVisible() == false + local isHidden = TGT_SettingsHandler.IsControlsVisible() == false if (LOG_ACTIVE) then _logger:logDebug("isHidden", isHidden) end - TGU_GroupUltimateSelector.SetControlHidden(isHidden or CurrentHudHiddenState()) + TGT_GroupUltimateSelector.SetControlHidden(isHidden or CurrentHudHiddenState()) if (isHidden) then - CALLBACK_MANAGER:UnregisterCallback(TGU_MOVABLE_CHANGED, TGU_GroupUltimateSelector.SetControlMovable) - CALLBACK_MANAGER:UnregisterCallback(TGU_STATIC_ULTIMATE_ID_CHANGED, TGU_GroupUltimateSelector.SetUltimateIcon) - CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_GroupUltimateSelector.SetControlHidden) + CALLBACK_MANAGER:UnregisterCallback(TGT_MOVABLE_CHANGED, TGT_GroupUltimateSelector.SetControlMovable) + CALLBACK_MANAGER:UnregisterCallback(TGT_STATIC_ULTIMATE_ID_CHANGED, TGT_GroupUltimateSelector.SetUltimateIcon) + CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_GroupUltimateSelector.SetControlHidden) else - TGU_GroupUltimateSelector.SetControlMovable(TGU_SettingsHandler.SavedVariables.Movable) - TGU_GroupUltimateSelector.RestorePosition(TGU_SettingsHandler.SavedVariables.SelectorPosX, TGU_SettingsHandler.SavedVariables.SelectorPosY) - TGU_GroupUltimateSelector.SetUltimateIcon(TGU_SettingsHandler.SavedVariables.StaticUltimateID) + TGT_GroupUltimateSelector.SetControlMovable(TGT_SettingsHandler.SavedVariables.Movable) + TGT_GroupUltimateSelector.RestorePosition(TGT_SettingsHandler.SavedVariables.SelectorPosX, TGT_SettingsHandler.SavedVariables.SelectorPosY) + TGT_GroupUltimateSelector.SetUltimateIcon(TGT_SettingsHandler.SavedVariables.StaticUltimateID) - CALLBACK_MANAGER:RegisterCallback(TGU_MOVABLE_CHANGED, TGU_GroupUltimateSelector.SetControlMovable) - CALLBACK_MANAGER:RegisterCallback(TGU_STATIC_ULTIMATE_ID_CHANGED, TGU_GroupUltimateSelector.SetUltimateIcon) - CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_GroupUltimateSelector.SetControlHidden) + CALLBACK_MANAGER:RegisterCallback(TGT_MOVABLE_CHANGED, TGT_GroupUltimateSelector.SetControlMovable) + CALLBACK_MANAGER:RegisterCallback(TGT_STATIC_ULTIMATE_ID_CHANGED, TGT_GroupUltimateSelector.SetUltimateIcon) + CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_GroupUltimateSelector.SetControlHidden) end end --[[ - Initialize initializes TGU_GroupUltimateSelector + Initialize initializes TGT_GroupUltimateSelector ]]-- -function TGU_GroupUltimateSelector.Initialize(logger) +function TGT_GroupUltimateSelector.Initialize(logger) if (LOG_ACTIVE) then - logger:logTrace("TGU_GroupUltimateSelector.Initialize") + logger:logTrace("TGT_GroupUltimateSelector.Initialize") end _logger = logger - _control = TGU_UltimateSelectorControl + _control = TGT_UltimateSelectorControl - TGU_GroupUltimateSelector.SetUltimateIcon(staticUltimateID) + TGT_GroupUltimateSelector.SetUltimateIcon(staticUltimateID) - CALLBACK_MANAGER:RegisterCallback(TGU_IS_ZONE_CHANGED, TGU_GroupUltimateSelector.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGU_GroupUltimateSelector.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_IS_ZONE_CHANGED, TGT_GroupUltimateSelector.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGT_GroupUltimateSelector.SetControlActive) end \ No newline at end of file diff --git a/TaosGroupTools/ui/GroupUltimateSelector.xml b/TaosGroupTools/ui/GroupUltimateSelector.xml index 6d5807d..9563524 100644 --- a/TaosGroupTools/ui/GroupUltimateSelector.xml +++ b/TaosGroupTools/ui/GroupUltimateSelector.xml @@ -1,9 +1,9 @@ <GuiXml> <Controls> - <TopLevelControl name="TGU_UltimateSelectorControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> + <TopLevelControl name="TGT_UltimateSelectorControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> <Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT"/> <Dimensions x="75" y="75" /> - <OnMoveStop>TGU_GroupUltimateSelector:OnGroupUltimateSelectorMoveStop()</OnMoveStop> + <OnMoveStop>TGT_GroupUltimateSelector:OnGroupUltimateSelectorMoveStop()</OnMoveStop> <Controls> <Control name="$(parent)MovableControl" tier="PARENT" inherits="MovableBackdropControl"> @@ -22,8 +22,8 @@ <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/> <Textures normal="/esoui/art/actionbar/abilityframe64_up.dds" pressed="/esoui/art/actionbar/abilityframe64_down.dds" - mouseOver="/TaosGroupUltimate/textures/hover.dds"/> - <OnClicked>TGU_GroupUltimateSelector:OnGroupUltimateSelectorClicked()</OnClicked> + mouseOver="/TaosGroupTools/textures/hover.dds"/> + <OnClicked>TGT_GroupUltimateSelector:OnGroupUltimateSelectorClicked()</OnClicked> </Button> <Texture name="$(parent)Icon" tier="0"> <Dimensions x="48" y="48"/> diff --git a/TaosGroupTools/ui/SettingsWindow.lua b/TaosGroupTools/ui/SettingsWindow.lua index 31e0b21..b25c668 100644 --- a/TaosGroupTools/ui/SettingsWindow.lua +++ b/TaosGroupTools/ui/SettingsWindow.lua @@ -12,27 +12,27 @@ local LOG_ACTIVE = false --[[ Table SettingsWindow ]]-- -TGU_SettingsWindow = {} -TGU_SettingsWindow.__index = TGU_SettingsWindow +TGT_SettingsWindow = {} +TGT_SettingsWindow.__index = TGT_SettingsWindow --[[ Table Members ]]-- -TGU_SettingsWindow.MainMenuName = "TaosGroupUltimateSettingsMainMenu" +TGT_SettingsWindow.MainMenuName = "TaosGroupToolsSettingsMainMenu" --[[ Initialize creates settings window ]]-- -function TGU_SettingsWindow.Initialize(logger, major, minor, patch) +function TGT_SettingsWindow.Initialize(logger, major, minor, patch) if (LOG_ACTIVE) then - logger:logTrace("TGU_SettingsWindow.Initialize") + logger:logTrace("TGT_SettingsWindow.Initialize") logger:logDebug("major, minor, patch", major, minor, patch) end local styleChoices = { - [1] = GetString(TGU_OPTIONS_STYLE_SIMPLE), - [2] = GetString(TGU_OPTIONS_STYLE_SWIM), - [3] = GetString(TGU_OPTIONS_STYLE_SHORT_SWIM), + [1] = GetString(TGT_OPTIONS_STYLE_SIMPLE), + [2] = GetString(TGT_OPTIONS_STYLE_SWIM), + [3] = GetString(TGT_OPTIONS_STYLE_SHORT_SWIM), } local panelData = { @@ -47,73 +47,73 @@ function TGU_SettingsWindow.Initialize(logger, major, minor, patch) local optionsData = { [1] = { type = "header", - name = GetString(TGU_OPTIONS_HEADER), + name = GetString(TGT_OPTIONS_HEADER), }, [2] = { type = "checkbox", - name = GetString(TGU_OPTIONS_DRAG_LABEL), - tooltip = GetString(TGU_OPTIONS_DRAG_TOOLTIP), + name = GetString(TGT_OPTIONS_DRAG_LABEL), + tooltip = GetString(TGT_OPTIONS_DRAG_TOOLTIP), getFunc = function() - return TGU_SettingsHandler.SavedVariables.Movable + return TGT_SettingsHandler.SavedVariables.Movable end, setFunc = function(value) - TGU_SettingsHandler.SetMovableSettings(value) + TGT_SettingsHandler.SetMovableSettings(value) end, - default = TGU_SettingsHandler.Default.Movable + default = TGT_SettingsHandler.Default.Movable }, [3] = { type = "checkbox", - name = GetString(TGU_OPTIONS_ONLY_AVA_LABEL), - tooltip = GetString(TGU_OPTIONS_ONLY_AVA_TOOLTIP), + name = GetString(TGT_OPTIONS_ONLY_AVA_LABEL), + tooltip = GetString(TGT_OPTIONS_ONLY_AVA_TOOLTIP), getFunc = function() - return TGU_SettingsHandler.SavedVariables.OnlyAva + return TGT_SettingsHandler.SavedVariables.OnlyAva end, setFunc = function(value) - TGU_SettingsHandler.SetOnlyAvaSettings(value) + TGT_SettingsHandler.SetOnlyAvaSettings(value) end, - default = TGU_SettingsHandler.Default.OnlyAva + default = TGT_SettingsHandler.Default.OnlyAva }, [4] = { type = "checkbox", - name = GetString(TGU_OPTIONS_USE_SORTING_LABEL), - tooltip = GetString(TGU_OPTIONS_USE_SORTING_TOOLTIP), + name = GetString(TGT_OPTIONS_USE_SORTING_LABEL), + tooltip = GetString(TGT_OPTIONS_USE_SORTING_TOOLTIP), getFunc = function() - return TGU_SettingsHandler.SavedVariables.IsSortingActive + return TGT_SettingsHandler.SavedVariables.IsSortingActive end, setFunc = function(value) - TGU_SettingsHandler.SetIsSortingActiveSettings(value) + TGT_SettingsHandler.SetIsSortingActiveSettings(value) end, - default = TGU_SettingsHandler.Default.IsSortingActive + default = TGT_SettingsHandler.Default.IsSortingActive }, [5] = { type = "dropdown", - name = GetString(TGU_OPTIONS_STYLE_LABEL), - tooltip = GetString(TGU_OPTIONS_STYLE_TOOLTIP), + name = GetString(TGT_OPTIONS_STYLE_LABEL), + tooltip = GetString(TGT_OPTIONS_STYLE_TOOLTIP), choices = styleChoices, getFunc = function() - return styleChoices[TGU_SettingsHandler.SavedVariables.Style] + return styleChoices[TGT_SettingsHandler.SavedVariables.Style] end, setFunc = function(value) for index, name in ipairs(styleChoices) do if (name == value) then - TGU_SettingsHandler.SetStyleSettings(index) + TGT_SettingsHandler.SetStyleSettings(index) break end end end, - default = styleChoices[TGU_SettingsHandler.Default.Style] + default = styleChoices[TGT_SettingsHandler.Default.Style] }, } local LAM = LibStub("LibAddonMenu-2.0") - LAM:RegisterAddonPanel(TGU_SettingsWindow.MainMenuName, panelData) - LAM:RegisterOptionControls(TGU_SettingsWindow.MainMenuName, optionsData) + LAM:RegisterAddonPanel(TGT_SettingsWindow.MainMenuName, panelData) + LAM:RegisterOptionControls(TGT_SettingsWindow.MainMenuName, optionsData) end \ No newline at end of file diff --git a/TaosGroupTools/ui/SimpleList.lua b/TaosGroupTools/ui/SimpleList.lua index d91ac0b..6f62315 100644 --- a/TaosGroupTools/ui/SimpleList.lua +++ b/TaosGroupTools/ui/SimpleList.lua @@ -17,30 +17,30 @@ local _control = nil local _players = {} --[[ - Table TGU_SimpleList + Table TGT_SimpleList ]]-- -TGU_SimpleList = {} -TGU_SimpleList.__index = TGU_SimpleList +TGT_SimpleList = {} +TGT_SimpleList.__index = TGT_SimpleList --[[ Table Members ]]-- -TGU_SimpleList.IsMocked = false +TGT_SimpleList.IsMocked = false --[[ Sets visibility of labels ]]-- -function TGU_SimpleList.RefreshList() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SimpleList.RefreshList") end +function TGT_SimpleList.RefreshList() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SimpleList.RefreshList") end for i=1, GROUP_SIZE_MAX, 1 do - local row = TGU_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. i) + local row = TGT_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. i) local listPlayer = _players[i] if (listPlayer ~= nil) then local isPlayerNotGrouped = IsUnitGrouped(listPlayer.PingTag) == false - if (TGU_SimpleList.IsMocked) then + if (TGT_SimpleList.IsMocked) then isPlayerNotGrouped = false end @@ -58,17 +58,17 @@ function TGU_SimpleList.RefreshList() end end - if (TGU_SettingsHandler.SavedVariables.IsSortingActive) then + if (TGT_SettingsHandler.SavedVariables.IsSortingActive) then -- Sort list with all players - TGU_SimpleList.SortList() + TGT_SimpleList.SortList() end end --[[ Sorts swimlane ]]-- -function TGU_SimpleList.SortList() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SimpleList.SortList") end +function TGT_SimpleList.SortList() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SimpleList.SortList") end -- Comparer function compare(playerLeft, playerRight) @@ -83,16 +83,16 @@ function TGU_SimpleList.SortList() -- Update sorted swimlane list for i,listPlayer in ipairs(_players) do - TGU_SimpleList.UpdateListRow(TGU_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. i), listPlayer) + TGT_SimpleList.UpdateListRow(TGT_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. i), listPlayer) end end --[[ Updates list row ]]-- -function TGU_SimpleList.UpdateListRow(row, player) +function TGT_SimpleList.UpdateListRow(row, player) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SimpleList.UpdateListRow") + _logger:logTrace("TGT_SimpleList.UpdateListRow") end local localizedUltimateName = zo_strformat(SI_ABILITY_TOOLTIP_NAME, player.UltimateName) @@ -128,9 +128,9 @@ end --[[ Updates list row ]]-- -function TGU_SimpleList.UpdatePlayer(player) +function TGT_SimpleList.UpdatePlayer(player) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SimpleList.UpdatePlayer") + _logger:logTrace("TGT_SimpleList.UpdatePlayer") end if (player) then @@ -139,7 +139,7 @@ function TGU_SimpleList.UpdatePlayer(player) for i,listPlayer in ipairs(_players) do if (LOG_ACTIVE) then _logger:logDebug(listPlayer.PlayerName .. " == " .. player.PlayerName) end if (listPlayer.PlayerName == player.PlayerName) then - row = TGU_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. i) + row = TGT_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. i) end end @@ -163,21 +163,21 @@ function TGU_SimpleList.UpdatePlayer(player) if (nextFreeRow <= GROUP_SIZE_MAX) then if (LOG_ACTIVE) then - _logger:logDebug("TGU_SimpleList.UpdatePlayer, add player " .. tostring(player.PlayerName) .. " to row " .. tostring(nextFreeRow)) + _logger:logDebug("TGT_SimpleList.UpdatePlayer, add player " .. tostring(player.PlayerName) .. " to row " .. tostring(nextFreeRow)) end player.LastMapPingTimestamp = GetTimeStamp() _players[nextFreeRow] = player - row = TGU_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. nextFreeRow) + row = TGT_SimpleListControlContainerScrollChild:GetNamedChild("Row" .. nextFreeRow) else - if (LOG_ACTIVE) then _logger:logDebug("TGU_SimpleList.UpdatePlayer, too much players for list" .. tostring(nextFreeRow)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_SimpleList.UpdatePlayer, too much players for list" .. tostring(nextFreeRow)) end end end -- Only update if player in a row if (row ~= nil) then -- Directly update row with player, sorting will be triggered on RefreshList - TGU_SimpleList.UpdateListRow(row, player) + TGT_SimpleList.UpdateListRow(row, player) end end end @@ -185,9 +185,9 @@ end --[[ SetControlMovable sets the Movable and MouseEnabled flag in UI elements ]]-- -function TGU_SimpleList.SetControlMovable(isMovable) +function TGT_SimpleList.SetControlMovable(isMovable) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SimpleList.SetControlMovable") + _logger:logTrace("TGT_SimpleList.SetControlMovable") _logger:logDebug("isMovable", isMovable) end @@ -198,11 +198,11 @@ function TGU_SimpleList.SetControlMovable(isMovable) end --[[ - RestorePosition sets TGU_SimpleList on settings position + RestorePosition sets TGT_SimpleList on settings position ]]-- -function TGU_SimpleList.RestorePosition(posX, posY) +function TGT_SimpleList.RestorePosition(posX, posY) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SimpleList.RestorePosition") + _logger:logTrace("TGT_SimpleList.RestorePosition") _logger:logDebug("posX, posY", posX, posY) end @@ -211,28 +211,28 @@ function TGU_SimpleList.RestorePosition(posX, posY) end --[[ - OnSimpleListMoveStop saves current TGU_SimpleList position to settings + OnSimpleListMoveStop saves current TGT_SimpleList position to settings ]]-- -function TGU_SimpleList.OnSimpleListMoveStop() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SimpleList.OnSimpleListMoveStop") end +function TGT_SimpleList.OnSimpleListMoveStop() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SimpleList.OnSimpleListMoveStop") end local left = _control:GetLeft() local top = _control:GetTop() - TGU_SettingsHandler.SavedVariables.PosX = left - TGU_SettingsHandler.SavedVariables.PosY = top + TGT_SettingsHandler.SavedVariables.PosX = left + TGT_SettingsHandler.SavedVariables.PosY = top if (LOG_ACTIVE) then - _logger:logDebug("PosX, PosY", TGU_SettingsHandler.SavedVariables.PosX, TGU_SettingsHandler.SavedVariables.PosY) + _logger:logDebug("PosX, PosY", TGT_SettingsHandler.SavedVariables.PosX, TGT_SettingsHandler.SavedVariables.PosY) end end --[[ SetControlHidden sets hidden on control ]]-- -function TGU_SimpleList.SetControlHidden(isHidden) +function TGT_SimpleList.SetControlHidden(isHidden) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SimpleList.SetControlHidden") + _logger:logTrace("TGT_SimpleList.SetControlHidden") _logger:logDebug("isHidden", isHidden) end @@ -246,52 +246,52 @@ end --[[ SetControlActive sets hidden on control ]]-- -function TGU_SimpleList.SetControlActive() +function TGT_SimpleList.SetControlActive() if (LOG_ACTIVE) then - _logger:logTrace("TGU_SimpleList.SetControlActive") + _logger:logTrace("TGT_SimpleList.SetControlActive") end - local isHidden = TGU_SettingsHandler.IsSimpleListVisible() == false + local isHidden = TGT_SettingsHandler.IsSimpleListVisible() == false if (LOG_ACTIVE) then _logger:logDebug("isHidden", isHidden) end - TGU_SimpleList.SetControlHidden(isHidden or CurrentHudHiddenState()) + TGT_SimpleList.SetControlHidden(isHidden or CurrentHudHiddenState()) if (isHidden) then -- Stop timeout timer - EVENT_MANAGER:UnregisterForUpdate(TGU_SimpleList.Name) + EVENT_MANAGER:UnregisterForUpdate(TGT_SimpleList.Name) - CALLBACK_MANAGER:UnregisterCallback(TAO_GROUP_CHANGED, TGU_SimpleList.RefreshList) - CALLBACK_MANAGER:UnregisterCallback(TGU_PLAYER_DATA_CHANGED, TGU_SimpleList.UpdatePlayer) - CALLBACK_MANAGER:UnregisterCallback(TGU_MOVABLE_CHANGED, TGU_SimpleList.SetControlMovable) - CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_SimpleList.SetControlHidden) + CALLBACK_MANAGER:UnregisterCallback(TAO_GROUP_CHANGED, TGT_SimpleList.RefreshList) + CALLBACK_MANAGER:UnregisterCallback(TGT_PLAYER_DATA_CHANGED, TGT_SimpleList.UpdatePlayer) + CALLBACK_MANAGER:UnregisterCallback(TGT_MOVABLE_CHANGED, TGT_SimpleList.SetControlMovable) + CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_SimpleList.SetControlHidden) else - TGU_SimpleList.SetControlMovable(TGU_SettingsHandler.SavedVariables.Movable) - TGU_SimpleList.RestorePosition(TGU_SettingsHandler.SavedVariables.PosX, TGU_SettingsHandler.SavedVariables.PosY) + TGT_SimpleList.SetControlMovable(TGT_SettingsHandler.SavedVariables.Movable) + TGT_SimpleList.RestorePosition(TGT_SettingsHandler.SavedVariables.PosX, TGT_SettingsHandler.SavedVariables.PosY) -- Start timeout timer - EVENT_MANAGER:RegisterForUpdate(TGU_SimpleList.Name, REFRESHRATE, TGU_SimpleList.RefreshList) + EVENT_MANAGER:RegisterForUpdate(TGT_SimpleList.Name, REFRESHRATE, TGT_SimpleList.RefreshList) - CALLBACK_MANAGER:RegisterCallback(TAO_GROUP_CHANGED, TGU_SimpleList.RefreshList) - CALLBACK_MANAGER:RegisterCallback(TGU_PLAYER_DATA_CHANGED, TGU_SimpleList.UpdatePlayer) - CALLBACK_MANAGER:RegisterCallback(TGU_MOVABLE_CHANGED, TGU_SimpleList.SetControlMovable) - CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_SimpleList.SetControlHidden) + CALLBACK_MANAGER:RegisterCallback(TAO_GROUP_CHANGED, TGT_SimpleList.RefreshList) + CALLBACK_MANAGER:RegisterCallback(TGT_PLAYER_DATA_CHANGED, TGT_SimpleList.UpdatePlayer) + CALLBACK_MANAGER:RegisterCallback(TGT_MOVABLE_CHANGED, TGT_SimpleList.SetControlMovable) + CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_SimpleList.SetControlHidden) end end --[[ CreateSimpleListRows creates simple list rows ]]-- -function TGU_SimpleList.CreateSimpleListRows() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SimpleList.CreateSimpleListRows") end +function TGT_SimpleList.CreateSimpleListRows() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SimpleList.CreateSimpleListRows") end for i=1, GROUP_SIZE_MAX, 1 do - local row = CreateControlFromVirtual("$(parent)Row", TGU_SimpleListControlContainerScrollChild, "GroupUltimateSimpleListRow", i) + local row = CreateControlFromVirtual("$(parent)Row", TGT_SimpleListControlContainerScrollChild, "GroupUltimateSimpleListRow", i) if (LOG_ACTIVE) then _logger:logDebug("Row created " .. row:GetName()) end row:SetHidden(true) -- initial not visible if i == 1 then - row:SetAnchor(TOPLEFT, TGU_SimpleListControlContainerScrollChild, TOPLEFT, 0, 0) + row:SetAnchor(TOPLEFT, TGT_SimpleListControlContainerScrollChild, TOPLEFT, 0, 0) else row:SetAnchor(TOP, lastRow, BOTTOM, 0, 0) end @@ -301,21 +301,21 @@ function TGU_SimpleList.CreateSimpleListRows() end --[[ - Initialize initializes TGU_SimpleList + Initialize initializes TGT_SimpleList ]]-- -function TGU_SimpleList.Initialize(logger, isMocked) +function TGT_SimpleList.Initialize(logger, isMocked) if (LOG_ACTIVE) then - logger:logTrace("TGU_SimpleList.Initialize") + logger:logTrace("TGT_SimpleList.Initialize") end _logger = logger - _control = TGU_SimpleListControl + _control = TGT_SimpleListControl - TGU_SimpleList.IsMocked = isMocked + TGT_SimpleList.IsMocked = isMocked - TGU_SimpleList.CreateSimpleListRows() + TGT_SimpleList.CreateSimpleListRows() - CALLBACK_MANAGER:RegisterCallback(TGU_STYLE_CHANGED, TGU_SimpleList.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TGU_IS_ZONE_CHANGED, TGU_SimpleList.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGU_SimpleList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_STYLE_CHANGED, TGT_SimpleList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_IS_ZONE_CHANGED, TGT_SimpleList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGT_SimpleList.SetControlActive) end \ No newline at end of file diff --git a/TaosGroupTools/ui/SimpleList.xml b/TaosGroupTools/ui/SimpleList.xml index 7c4a45f..6073a6b 100644 --- a/TaosGroupTools/ui/SimpleList.xml +++ b/TaosGroupTools/ui/SimpleList.xml @@ -1,9 +1,9 @@ <GuiXml> <Controls> - <TopLevelControl name="TGU_SimpleListControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> + <TopLevelControl name="TGT_SimpleListControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> <Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT"/> <Dimensions x="500" y="520" /> - <OnMoveStop>TGU_SimpleList:OnSimpleListMoveStop()</OnMoveStop> + <OnMoveStop>TGT_SimpleList:OnSimpleListMoveStop()</OnMoveStop> <Controls> <Control name="$(parent)MovableControl" tier="PARENT" inherits="MovableBackdropControl"> diff --git a/TaosGroupTools/ui/SwimlaneList.lua b/TaosGroupTools/ui/SwimlaneList.lua index ee959d6..fc9831d 100644 --- a/TaosGroupTools/ui/SwimlaneList.lua +++ b/TaosGroupTools/ui/SwimlaneList.lua @@ -18,35 +18,35 @@ local _logger = nil local _control = nil --[[ - Table TGU_SwimlaneList + Table TGT_SwimlaneList ]]-- -TGU_SwimlaneList = {} -TGU_SwimlaneList.__index = TGU_SwimlaneList +TGT_SwimlaneList = {} +TGT_SwimlaneList.__index = TGT_SwimlaneList --[[ Table Members ]]-- -TGU_SwimlaneList.Name = "TGU-SwimlaneList" -TGU_SwimlaneList.IsMocked = false -TGU_SwimlaneList.Swimlanes = {} +TGT_SwimlaneList.Name = "TGT-SwimlaneList" +TGT_SwimlaneList.IsMocked = false +TGT_SwimlaneList.Swimlanes = {} --[[ Sets visibility of labels ]]-- -function TGU_SwimlaneList.RefreshList() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SwimlaneList.RefreshList") end +function TGT_SwimlaneList.RefreshList() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SwimlaneList.RefreshList") end -- Check all swimlanes - for i,swimlane in ipairs(TGU_SwimlaneList.Swimlanes) do - TGU_SwimlaneList.ClearPlayersFromSwimlane(swimlane) + for i,swimlane in ipairs(TGT_SwimlaneList.Swimlanes) do + TGT_SwimlaneList.ClearPlayersFromSwimlane(swimlane) end end --[[ Sorts swimlane ]]-- -function TGU_SwimlaneList.SortSwimlane(swimlane) - if (LOG_ACTIVE) then _logger:logTrace("TGU_SwimlaneList.SortSwimlane") end +function TGT_SwimlaneList.SortSwimlane(swimlane) + if (LOG_ACTIVE) then _logger:logTrace("TGT_SwimlaneList.SortSwimlane") end -- Comparer function compare(playerLeft, playerRight) @@ -61,16 +61,16 @@ function TGU_SwimlaneList.SortSwimlane(swimlane) -- Update sorted swimlane list for i,swimlanePlayer in ipairs(swimlane.Players) do - TGU_SwimlaneList.UpdateListRow(swimlane.SwimlaneControl:GetNamedChild("Row" .. i), swimlanePlayer) + TGT_SwimlaneList.UpdateListRow(swimlane.SwimlaneControl:GetNamedChild("Row" .. i), swimlanePlayer) end end --[[ Updates list row ]]-- -function TGU_SwimlaneList.UpdateListRow(row, player) +function TGT_SwimlaneList.UpdateListRow(row, player) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.UpdateListRow") + _logger:logTrace("TGT_SwimlaneList.UpdateListRow") end local playerName = player.PlayerName @@ -105,16 +105,16 @@ end --[[ Updates list player ]]-- -function TGU_SwimlaneList.UpdatePlayer(player) +function TGT_SwimlaneList.UpdatePlayer(player) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.UpdatePlayer") + _logger:logTrace("TGT_SwimlaneList.UpdatePlayer") end if (player) then - local swimLane = TGU_SwimlaneList.GetSwimLane(player.UltimateGroup.GroupAbilityId) + local swimLane = TGT_SwimlaneList.GetSwimLane(player.UltimateGroup.GroupAbilityId) if (swimLane) then - local row = TGU_SwimlaneList.GetSwimLaneRow(swimLane, player.PlayerName) + local row = TGT_SwimlaneList.GetSwimLaneRow(swimLane, player.PlayerName) -- Update player if (row ~= nil) then @@ -136,29 +136,29 @@ function TGU_SwimlaneList.UpdatePlayer(player) if (nextFreeRow <= ROWS) then if (LOG_ACTIVE) then - _logger:logDebug("TGU_SwimlaneList.UpdatePlayer, add player " .. tostring(player.PlayerName) .. " to row " .. tostring(nextFreeRow)) + _logger:logDebug("TGT_SwimlaneList.UpdatePlayer, add player " .. tostring(player.PlayerName) .. " to row " .. tostring(nextFreeRow)) end player.LastMapPingTimestamp = GetTimeStamp() swimLane.Players[nextFreeRow] = player row = swimLane.SwimlaneControl:GetNamedChild("Row" .. nextFreeRow) else - if (LOG_ACTIVE) then _logger:logDebug("TGU_SwimlaneList.UpdatePlayer, too much players for one swimlane " .. tostring(nextFreeRow)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_SwimlaneList.UpdatePlayer, too much players for one swimlane " .. tostring(nextFreeRow)) end end end -- Only update if player in a row if (row ~= nil) then - if (TGU_SettingsHandler.SavedVariables.IsSortingActive) then + if (TGT_SettingsHandler.SavedVariables.IsSortingActive) then -- Sort swimlane with all players - TGU_SwimlaneList.SortSwimlane(swimLane) + TGT_SwimlaneList.SortSwimlane(swimLane) else -- Directly update row with player - TGU_SwimlaneList.UpdateListRow(row, player) + TGT_SwimlaneList.UpdateListRow(row, player) end end else - if (LOG_ACTIVE) then _logger:logDebug("TGU_SwimlaneList.UpdatePlayer, swimlane not found for ultimategroup " .. tostring(ultimateGroup.GroupName)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_SwimlaneList.UpdatePlayer, swimlane not found for ultimategroup " .. tostring(ultimateGroup.GroupName)) end end end end @@ -166,23 +166,23 @@ end --[[ Get swimlane from current SwimLanes ]]-- -function TGU_SwimlaneList.GetSwimLane(ultimateGroupId) +function TGT_SwimlaneList.GetSwimLane(ultimateGroupId) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.GetSwimLane") + _logger:logTrace("TGT_SwimlaneList.GetSwimLane") _logger:logDebug("ultimateGroupId", ultimateGroupId) end if (ultimateGroupId ~= 0) then - for i,swimLane in ipairs(TGU_SwimlaneList.Swimlanes) do + for i,swimLane in ipairs(TGT_SwimlaneList.Swimlanes) do if (swimLane.UltimateGroupId == ultimateGroupId) then return swimLane end end - if (LOG_ACTIVE) then _logger:logDebug("TGU_SwimlaneList.GetSwimLane, swimLane not found " .. tostring(ultimateGroupId)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_SwimlaneList.GetSwimLane, swimLane not found " .. tostring(ultimateGroupId)) end return nil else - _logger:logError("TGU_SwimlaneList.GetSwimLane, ultimateGroupId is 0") + _logger:logError("TGT_SwimlaneList.GetSwimLane, ultimateGroupId is 0") return nil end end @@ -190,9 +190,9 @@ end --[[ Get Player Row from current players in swimlane ]]-- -function TGU_SwimlaneList.GetSwimLaneRow(swimLane, playerName) +function TGT_SwimlaneList.GetSwimLaneRow(swimLane, playerName) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.GetSwimLaneRow") + _logger:logTrace("TGT_SwimlaneList.GetSwimLaneRow") _logger:logDebug("swimLane ID", swimLane.Id) end @@ -204,10 +204,10 @@ function TGU_SwimlaneList.GetSwimLaneRow(swimLane, playerName) end end - if (LOG_ACTIVE) then _logger:logDebug("TGU_SwimlaneList.GetSwimLane, player not found " .. tostring(playerName)) end + if (LOG_ACTIVE) then _logger:logDebug("TGT_SwimlaneList.GetSwimLane, player not found " .. tostring(playerName)) end return nil else - _logger:logError("TGU_SwimlaneList.GetSwimLane, swimLane is nil") + _logger:logError("TGT_SwimlaneList.GetSwimLane, swimLane is nil") return nil end end @@ -215,9 +215,9 @@ end --[[ Clears all players in swimlane ]]-- -function TGU_SwimlaneList.ClearPlayersFromSwimlane(swimlane) +function TGT_SwimlaneList.ClearPlayersFromSwimlane(swimlane) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.ClearPlayersFromSwimlane") + _logger:logTrace("TGT_SwimlaneList.ClearPlayersFromSwimlane") _logger:logDebug("swimlane ID", swimlane.Id) end @@ -229,7 +229,7 @@ function TGU_SwimlaneList.ClearPlayersFromSwimlane(swimlane) if (swimlanePlayer ~= nil) then local isPlayerNotGrouped = IsUnitGrouped(swimlanePlayer.PingTag) == false - if (TGU_SwimlaneList.IsMocked) then + if (TGT_SwimlaneList.IsMocked) then isPlayerNotGrouped = false end @@ -253,9 +253,9 @@ end --[[ SetControlMovable sets the Movable and MouseEnabled flag in UI elements ]]-- -function TGU_SwimlaneList.SetControlMovable(isMovable) +function TGT_SwimlaneList.SetControlMovable(isMovable) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.SetControlMovable") + _logger:logTrace("TGT_SwimlaneList.SetControlMovable") _logger:logDebug("isMovable", isMovable) end @@ -266,11 +266,11 @@ function TGU_SwimlaneList.SetControlMovable(isMovable) end --[[ - RestorePosition sets TGU_SwimlaneList on settings position + RestorePosition sets TGT_SwimlaneList on settings position ]]-- -function TGU_SwimlaneList.RestorePosition(posX, posY) +function TGT_SwimlaneList.RestorePosition(posX, posY) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.RestorePosition") + _logger:logTrace("TGT_SwimlaneList.RestorePosition") _logger:logDebug("posX, posY", posX, posY) end @@ -279,28 +279,28 @@ function TGU_SwimlaneList.RestorePosition(posX, posY) end --[[ - OnSwimlaneListMoveStop saves current TGU_SwimlaneList position to settings + OnSwimlaneListMoveStop saves current TGT_SwimlaneList position to settings ]]-- -function TGU_SwimlaneList.OnSwimlaneListMoveStop() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SwimlaneList.OnSwimlaneListMoveStop") end +function TGT_SwimlaneList.OnSwimlaneListMoveStop() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SwimlaneList.OnSwimlaneListMoveStop") end local left = _control:GetLeft() local top = _control:GetTop() - TGU_SettingsHandler.SavedVariables.PosX = left - TGU_SettingsHandler.SavedVariables.PosY = top + TGT_SettingsHandler.SavedVariables.PosX = left + TGT_SettingsHandler.SavedVariables.PosY = top if (LOG_ACTIVE) then - _logger:logDebug("PosX, PosY", TGU_SettingsHandler.SavedVariables.PosX, TGU_SettingsHandler.SavedVariables.PosY) + _logger:logDebug("PosX, PosY", TGT_SettingsHandler.SavedVariables.PosX, TGT_SettingsHandler.SavedVariables.PosY) end end --[[ SetControlHidden sets hidden on control ]]-- -function TGU_SwimlaneList.SetControlHidden(isHidden) +function TGT_SwimlaneList.SetControlHidden(isHidden) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.SetControlHidden") + _logger:logTrace("TGT_SwimlaneList.SetControlHidden") _logger:logDebug("isHidden", isHidden) end @@ -314,85 +314,85 @@ end --[[ SetControlActive sets hidden on control ]]-- -function TGU_SwimlaneList.SetControlActive() +function TGT_SwimlaneList.SetControlActive() if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.SetControlActive") + _logger:logTrace("TGT_SwimlaneList.SetControlActive") end - local isHidden = TGU_SettingsHandler.IsSwimlaneListVisible() == false + local isHidden = TGT_SettingsHandler.IsSwimlaneListVisible() == false if (LOG_ACTIVE) then _logger:logDebug("isHidden", isHidden) end - TGU_SwimlaneList.SetControlHidden(isHidden or CurrentHudHiddenState()) + TGT_SwimlaneList.SetControlHidden(isHidden or CurrentHudHiddenState()) if (isHidden) then -- Start timeout timer - EVENT_MANAGER:UnregisterForUpdate(TGU_SwimlaneList.Name) + EVENT_MANAGER:UnregisterForUpdate(TGT_SwimlaneList.Name) - CALLBACK_MANAGER:UnregisterCallback(TAO_GROUP_CHANGED, TGU_SwimlaneList.RefreshList) - CALLBACK_MANAGER:UnregisterCallback(TGU_PLAYER_DATA_CHANGED, TGU_SwimlaneList.UpdatePlayer) - CALLBACK_MANAGER:UnregisterCallback(TGU_MOVABLE_CHANGED, TGU_SwimlaneList.SetControlMovable) - CALLBACK_MANAGER:UnregisterCallback(TGU_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGU_SwimlaneList.SetSwimlaneUltimate) - CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_SwimlaneList.SetControlHidden) + CALLBACK_MANAGER:UnregisterCallback(TAO_GROUP_CHANGED, TGT_SwimlaneList.RefreshList) + CALLBACK_MANAGER:UnregisterCallback(TGT_PLAYER_DATA_CHANGED, TGT_SwimlaneList.UpdatePlayer) + CALLBACK_MANAGER:UnregisterCallback(TGT_MOVABLE_CHANGED, TGT_SwimlaneList.SetControlMovable) + CALLBACK_MANAGER:UnregisterCallback(TGT_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGT_SwimlaneList.SetSwimlaneUltimate) + CALLBACK_MANAGER:UnregisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_SwimlaneList.SetControlHidden) else - TGU_SwimlaneList.SetControlMovable(TGU_SettingsHandler.SavedVariables.Movable) - TGU_SwimlaneList.RestorePosition(TGU_SettingsHandler.SavedVariables.PosX, TGU_SettingsHandler.SavedVariables.PosY) + TGT_SwimlaneList.SetControlMovable(TGT_SettingsHandler.SavedVariables.Movable) + TGT_SwimlaneList.RestorePosition(TGT_SettingsHandler.SavedVariables.PosX, TGT_SettingsHandler.SavedVariables.PosY) -- Start timeout timer - EVENT_MANAGER:RegisterForUpdate(TGU_SwimlaneList.Name, REFRESHRATE, TGU_SwimlaneList.RefreshList) + EVENT_MANAGER:RegisterForUpdate(TGT_SwimlaneList.Name, REFRESHRATE, TGT_SwimlaneList.RefreshList) - CALLBACK_MANAGER:RegisterCallback(TAO_GROUP_CHANGED, TGU_SwimlaneList.RefreshList) - CALLBACK_MANAGER:RegisterCallback(TGU_PLAYER_DATA_CHANGED, TGU_SwimlaneList.UpdatePlayer) - CALLBACK_MANAGER:RegisterCallback(TGU_MOVABLE_CHANGED, TGU_SwimlaneList.SetControlMovable) - CALLBACK_MANAGER:RegisterCallback(TGU_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGU_SwimlaneList.SetSwimlaneUltimate) - CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGU_SwimlaneList.SetControlHidden) + CALLBACK_MANAGER:RegisterCallback(TAO_GROUP_CHANGED, TGT_SwimlaneList.RefreshList) + CALLBACK_MANAGER:RegisterCallback(TGT_PLAYER_DATA_CHANGED, TGT_SwimlaneList.UpdatePlayer) + CALLBACK_MANAGER:RegisterCallback(TGT_MOVABLE_CHANGED, TGT_SwimlaneList.SetControlMovable) + CALLBACK_MANAGER:RegisterCallback(TGT_SWIMLANE_ULTIMATE_GROUP_ID_CHANGED, TGT_SwimlaneList.SetSwimlaneUltimate) + CALLBACK_MANAGER:RegisterCallback(TAO_HUD_HIDDEN_STATE_CHANGED, TGT_SwimlaneList.SetControlHidden) end end --[[ OnSwimlaneHeaderClicked called on header clicked ]]-- -function TGU_SwimlaneList.OnSwimlaneHeaderClicked(button, swimlaneId) +function TGT_SwimlaneList.OnSwimlaneHeaderClicked(button, swimlaneId) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.OnSwimlaneHeaderClicked") + _logger:logTrace("TGT_SwimlaneList.OnSwimlaneHeaderClicked") _logger:logDebug("swimlaneId", swimlaneId) end if (button ~= nil) then - CALLBACK_MANAGER:RegisterCallback(TGU_SET_ULTIMATE_GROUP, TGU_SwimlaneList.OnSetUltimateGroup) - CALLBACK_MANAGER:FireCallbacks(TGU_SHOW_ULTIMATE_GROUP_MENU, button, swimlaneId) + CALLBACK_MANAGER:RegisterCallback(TGT_SET_ULTIMATE_GROUP, TGT_SwimlaneList.OnSetUltimateGroup) + CALLBACK_MANAGER:FireCallbacks(TGT_SHOW_ULTIMATE_GROUP_MENU, button, swimlaneId) else - _logger:logError("TGU_SwimlaneList.OnSwimlaneHeaderClicked, button nil") + _logger:logError("TGT_SwimlaneList.OnSwimlaneHeaderClicked, button nil") end end --[[ OnSetUltimateGroup called on header clicked ]]-- -function TGU_SwimlaneList.OnSetUltimateGroup(group, swimlaneId) +function TGT_SwimlaneList.OnSetUltimateGroup(group, swimlaneId) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.OnSetUltimateGroup") + _logger:logTrace("TGT_SwimlaneList.OnSetUltimateGroup") _logger:logDebug("group.GroupName, swimlaneId", group.GroupName, swimlaneId) end - CALLBACK_MANAGER:UnregisterCallback(TGU_SET_ULTIMATE_GROUP, TGU_SwimlaneList.OnSetUltimateGroup) + CALLBACK_MANAGER:UnregisterCallback(TGT_SET_ULTIMATE_GROUP, TGT_SwimlaneList.OnSetUltimateGroup) if (group ~= nil and swimlaneId ~= nil and swimlaneId >= 1 and swimlaneId <= 6) then - TGU_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlaneId, group) + TGT_SettingsHandler.SetSwimlaneUltimateGroupIdSettings(swimlaneId, group) else - _logger:logError("TGU_UltimateGroupMenu.ShowUltimateGroupMenu, group nil or swimlaneId invalid") + _logger:logError("TGT_UltimateGroupMenu.ShowUltimateGroupMenu, group nil or swimlaneId invalid") end end --[[ SetSwimlaneUltimate sets the swimlane header icon in base of ultimateGroupId ]]-- -function TGU_SwimlaneList.SetSwimlaneUltimate(swimlaneId, ultimateGroup) +function TGT_SwimlaneList.SetSwimlaneUltimate(swimlaneId, ultimateGroup) if (LOG_ACTIVE) then - _logger:logTrace("TGU_SwimlaneList.SetSwimlaneUltimate") + _logger:logTrace("TGT_SwimlaneList.SetSwimlaneUltimate") _logger:logDebug("ultimateGroup.GroupName, swimlaneId", ultimateGroup.GroupName, swimlaneId) end - local swimlaneObject = TGU_SwimlaneList.Swimlanes[swimlaneId] + local swimlaneObject = TGT_SwimlaneList.Swimlanes[swimlaneId] local iconControl = swimlaneObject.SwimlaneControl:GetNamedChild("Header"):GetNamedChild("SelectorButtonControl"):GetNamedChild("Icon") local labelControl = swimlaneObject.SwimlaneControl:GetNamedChild("Header"):GetNamedChild("UltimateLabel") @@ -401,28 +401,28 @@ function TGU_SwimlaneList.SetSwimlaneUltimate(swimlaneId, ultimateGroup) labelControl:SetText(ultimateGroup.GroupName) swimlaneObject.UltimateGroupId = ultimateGroup.GroupAbilityId - TGU_SwimlaneList.ClearPlayersFromSwimlane(swimlaneObject) + TGT_SwimlaneList.ClearPlayersFromSwimlane(swimlaneObject) else - _logger:logError("TGU_SwimlaneList.SetSwimlaneUltimateIcon, icon is " .. tostring(icon) .. ";" .. tostring(iconControl) .. ";" .. tostring(ultimateGroup)) + _logger:logError("TGT_SwimlaneList.SetSwimlaneUltimateIcon, icon is " .. tostring(icon) .. ";" .. tostring(iconControl) .. ";" .. tostring(ultimateGroup)) end end --[[ CreateSwimLaneListHeaders creates swimlane list headers ]]-- -function TGU_SwimlaneList.CreateSwimLaneListHeaders() - if (LOG_ACTIVE) then _logger:logTrace("TGU_SwimlaneList.CreateSwimLaneListHeaders") end +function TGT_SwimlaneList.CreateSwimLaneListHeaders() + if (LOG_ACTIVE) then _logger:logTrace("TGT_SwimlaneList.CreateSwimLaneListHeaders") end for i=1, SWIMLANES, 1 do - local ultimateGroupId = TGU_SettingsHandler.SavedVariables.SwimlaneUltimateGroupIds[i] - local ultimateGroup = TGU_UltimateGroupHandler.GetUltimateGroupByAbilityId(ultimateGroupId) + local ultimateGroupId = TGT_SettingsHandler.SavedVariables.SwimlaneUltimateGroupIds[i] + local ultimateGroup = TGT_UltimateGroupHandler.GetUltimateGroupByAbilityId(ultimateGroupId) local swimlaneControlName = "Swimlane" .. tostring(i) local swimlaneControl = _control:GetNamedChild(swimlaneControlName) -- Add button local button = swimlaneControl:GetNamedChild("Header"):GetNamedChild("SelectorButtonControl"):GetNamedChild("Button") - button:SetHandler("OnClicked", function() TGU_SwimlaneList.OnSwimlaneHeaderClicked(button, i) end) + button:SetHandler("OnClicked", function() TGT_SwimlaneList.OnSwimlaneHeaderClicked(button, i) end) local swimLane = {} swimLane.Id = i @@ -444,19 +444,19 @@ function TGU_SwimlaneList.CreateSwimLaneListHeaders() swimLane.UltimateGroupId = ultimateGroup.GroupAbilityId else - _logger:logError("TGU_SwimlaneList.CreateSwimLaneListHeaders, ultimateGroup nil.") + _logger:logError("TGT_SwimlaneList.CreateSwimLaneListHeaders, ultimateGroup nil.") end - TGU_SwimlaneList.CreateSwimlaneListRows(swimlaneControl) - TGU_SwimlaneList.Swimlanes[i] = swimLane + TGT_SwimlaneList.CreateSwimlaneListRows(swimlaneControl) + TGT_SwimlaneList.Swimlanes[i] = swimLane end end --[[ CreateSwimlaneListRows creates swimlane lsit rows ]]-- -function TGU_SwimlaneList.CreateSwimlaneListRows(swimlaneControl) - if (LOG_ACTIVE) then _logger:logTrace("TGU_SwimlaneList.CreateSwimlaneListRows") end +function TGT_SwimlaneList.CreateSwimlaneListRows(swimlaneControl) + if (LOG_ACTIVE) then _logger:logTrace("TGT_SwimlaneList.CreateSwimlaneListRows") end if (swimlaneControl ~= nil) then for i=1, ROWS, 1 do @@ -476,26 +476,26 @@ function TGU_SwimlaneList.CreateSwimlaneListRows(swimlaneControl) lastRow = row end else - _logger:logError("TGU_SwimlaneList.CreateSwimlaneListRows, swimlaneControl nil.") + _logger:logError("TGT_SwimlaneList.CreateSwimlaneListRows, swimlaneControl nil.") end end --[[ - Initialize initializes TGU_SwimlaneList + Initialize initializes TGT_SwimlaneList ]]-- -function TGU_SwimlaneList.Initialize(logger, isMocked) +function TGT_SwimlaneList.Initialize(logger, isMocked) if (LOG_ACTIVE) then - logger:logTrace("TGU_SwimlaneList.Initialize") + logger:logTrace("TGT_SwimlaneList.Initialize") end _logger = logger - _control = TGU_SwimlaneListControl + _control = TGT_SwimlaneListControl - TGU_SwimlaneList.IsMocked = isMocked + TGT_SwimlaneList.IsMocked = isMocked - TGU_SwimlaneList.CreateSwimLaneListHeaders() + TGT_SwimlaneList.CreateSwimLaneListHeaders() - CALLBACK_MANAGER:RegisterCallback(TGU_STYLE_CHANGED, TGU_SwimlaneList.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TGU_IS_ZONE_CHANGED, TGU_SwimlaneList.SetControlActive) - CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGU_SwimlaneList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_STYLE_CHANGED, TGT_SwimlaneList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TGT_IS_ZONE_CHANGED, TGT_SwimlaneList.SetControlActive) + CALLBACK_MANAGER:RegisterCallback(TAO_UNIT_GROUPED_CHANGED, TGT_SwimlaneList.SetControlActive) end \ No newline at end of file diff --git a/TaosGroupTools/ui/SwimlaneList.xml b/TaosGroupTools/ui/SwimlaneList.xml index 4db9a04..eb05385 100644 --- a/TaosGroupTools/ui/SwimlaneList.xml +++ b/TaosGroupTools/ui/SwimlaneList.xml @@ -1,9 +1,9 @@ <GuiXml> <Controls> - <TopLevelControl name="TGU_SwimlaneListControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> + <TopLevelControl name="TGT_SwimlaneListControl" hidden="true" layer="OVERLAY" level="1" allowBringToTop="false" mouseEnabled="true" movable="true" clampedToScreen="true"> <Anchor point="TOPLEFT" relativeTo="GuiRoot" relativePoint="TOPLEFT"/> <Dimensions x="610" y="265" /> - <OnMoveStop>TGU_SwimlaneList:OnSwimlaneListMoveStop()</OnMoveStop> + <OnMoveStop>TGT_SwimlaneList:OnSwimlaneListMoveStop()</OnMoveStop> <Controls> <Control name="$(parent)MovableControl" tier="PARENT" inherits="MovableBackdropControl"> diff --git a/TaosGroupTools/ui/UltimateGroupMenu.lua b/TaosGroupTools/ui/UltimateGroupMenu.lua index a70e53c..7f16cbb 100644 --- a/TaosGroupTools/ui/UltimateGroupMenu.lua +++ b/TaosGroupTools/ui/UltimateGroupMenu.lua @@ -11,10 +11,10 @@ local LOG_ACTIVE = false local _logger = nil --[[ - Table TGU_UltimateGroupMenu + Table TGT_UltimateGroupMenu ]]-- -TGU_UltimateGroupMenu = {} -TGU_UltimateGroupMenu.__index = TGU_UltimateGroupMenu +TGT_UltimateGroupMenu = {} +TGT_UltimateGroupMenu.__index = TGT_UltimateGroupMenu --[[ Table Members @@ -23,48 +23,48 @@ TGU_UltimateGroupMenu.__index = TGU_UltimateGroupMenu --[[ SetUltimateGroup shows ultimate group menu ]]-- -function TGU_UltimateGroupMenu.SetUltimateGroup(group, arg) +function TGT_UltimateGroupMenu.SetUltimateGroup(group, arg) if (LOG_ACTIVE) then - _logger:logTrace("TGU_UltimateGroupMenu.SetultimateGroup") + _logger:logTrace("TGT_UltimateGroupMenu.SetultimateGroup") _logger:logDebug("group.GroupName, arg", group.GroupName, arg) end - CALLBACK_MANAGER:FireCallbacks(TGU_SET_ULTIMATE_GROUP, group, arg) + CALLBACK_MANAGER:FireCallbacks(TGT_SET_ULTIMATE_GROUP, group, arg) end --[[ ShowUltimateGroupMenu shows ultimate group menu ]]-- -function TGU_UltimateGroupMenu.ShowUltimateGroupMenu(control, arg) +function TGT_UltimateGroupMenu.ShowUltimateGroupMenu(control, arg) if (LOG_ACTIVE) then - _logger:logTrace("TGU_UltimateGroupMenu.ShowUltimateGroupMenu") + _logger:logTrace("TGT_UltimateGroupMenu.ShowUltimateGroupMenu") _logger:logDebug("arg", arg) end if (control ~= nil) then ClearMenu() - local ultimateGroups = TGU_UltimateGroupHandler.GetUltimateGroups() + local ultimateGroups = TGT_UltimateGroupHandler.GetUltimateGroups() for i, group in pairs(ultimateGroups) do - AddMenuItem(group.GroupName .. " - " .. group.GroupDescription, function() TGU_UltimateGroupMenu.SetUltimateGroup(group, arg) end) + AddMenuItem(group.GroupName .. " - " .. group.GroupDescription, function() TGT_UltimateGroupMenu.SetUltimateGroup(group, arg) end) end ShowMenu(control) else - _logger:logError("TGU_UltimateGroupMenu.ShowUltimateGroupMenu, control nil") + _logger:logError("TGT_UltimateGroupMenu.ShowUltimateGroupMenu, control nil") end end --[[ - Initialize initializes TGU_UltimateGroupMenu + Initialize initializes TGT_UltimateGroupMenu ]]-- -function TGU_UltimateGroupMenu.Initialize(logger) +function TGT_UltimateGroupMenu.Initialize(logger) if (LOG_ACTIVE) then - logger:logTrace("TGU_UltimateGroupMenu.Initialize") + logger:logTrace("TGT_UltimateGroupMenu.Initialize") end _logger = logger - CALLBACK_MANAGER:RegisterCallback(TGU_SHOW_ULTIMATE_GROUP_MENU, TGU_UltimateGroupMenu.ShowUltimateGroupMenu) + CALLBACK_MANAGER:RegisterCallback(TGT_SHOW_ULTIMATE_GROUP_MENU, TGT_UltimateGroupMenu.ShowUltimateGroupMenu) end \ No newline at end of file diff --git a/TaosGroupTools/ui/VirtualControls.xml b/TaosGroupTools/ui/VirtualControls.xml index 0940180..e8bab60 100644 --- a/TaosGroupTools/ui/VirtualControls.xml +++ b/TaosGroupTools/ui/VirtualControls.xml @@ -99,7 +99,7 @@ <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/> <Edge edgeSize="1" /> </Backdrop> - <StatusBar name="$(parent)RelativeUltimateStatusBar" alpha="0.7" textureFile="/TaosGroupUltimate/textures/grainy.dds"> + <StatusBar name="$(parent)RelativeUltimateStatusBar" alpha="0.7" textureFile="/TaosGroupTools/textures/grainy.dds"> <Dimensions x="98" y="38" /> <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="1" offsetY="1"/> <Limits min="0" max="100" /> @@ -124,7 +124,7 @@ <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/> <Textures normal="/esoui/art/actionbar/abilityframe64_up.dds" pressed="/esoui/art/actionbar/abilityframe64_down.dds" - mouseOver="/TaosGroupUltimate/textures/hover.dds"/> + mouseOver="/TaosGroupTools/textures/hover.dds"/> </Button> <Texture name="$(parent)Icon" tier="0"> <Dimensions x="24" y="24"/> @@ -170,7 +170,7 @@ <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/> <Edge edgeSize="1" /> </Backdrop> - <StatusBar name="$(parent)RelativeUltimateStatusBar" alpha="0.7" textureFile="/TaosGroupUltimate/textures/grainy.dds"> + <StatusBar name="$(parent)RelativeUltimateStatusBar" alpha="0.7" textureFile="/TaosGroupTools/textures/grainy.dds"> <Dimensions x="48" y="23" /> <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT" offsetX="1" offsetY="1"/> <Limits min="0" max="100" /> @@ -195,7 +195,7 @@ <Anchor point="TOPLEFT" relativeTo="$(parent)" relativePoint="TOPLEFT"/> <Textures normal="/esoui/art/actionbar/abilityframe64_up.dds" pressed="/esoui/art/actionbar/abilityframe64_down.dds" - mouseOver="/TaosGroupUltimate/textures/hover.dds"/> + mouseOver="/TaosGroupTools/textures/hover.dds"/> </Button> <Texture name="$(parent)Icon" tier="0"> <Dimensions x="48" y="48"/>