small adjustments and bug fixes
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local dversion = 376
|
||||
local dversion = 377
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary(major, minor)
|
||||
|
||||
|
||||
+12
-1
@@ -304,7 +304,18 @@ detailsFramework:Mixin(LabelMetaFunctions, detailsFramework.SetPointMixin)
|
||||
end
|
||||
end
|
||||
|
||||
labelObject.label:SetText(text)
|
||||
--if the text is a table, it means a language table has been passed
|
||||
if (type(text) == "table") then
|
||||
local locTable = text
|
||||
if (detailsFramework.Language.IsLocTable(locTable)) then
|
||||
detailsFramework.Language.SetTextWithLocTable(labelObject.widget, locTable)
|
||||
else
|
||||
labelObject.label:SetText(text)
|
||||
end
|
||||
else
|
||||
labelObject.label:SetText(text)
|
||||
end
|
||||
|
||||
labelObject.label:SetJustifyH("left")
|
||||
|
||||
if (color) then
|
||||
|
||||
+144
-10
@@ -1,7 +1,9 @@
|
||||
--todo: need to send a callback when setting a new language, this will be used by the volatile menu to refresh the menu
|
||||
|
||||
--[=[
|
||||
DetailsFramework.Language.Register(addonId, languageId[, gameLanguageOnly])
|
||||
namespace = DetailsFramework.Language = DetailsFramework.Language.Register()
|
||||
|
||||
Register(addonId, languageId[, gameLanguageOnly])
|
||||
create a language table within an addon namespace
|
||||
@addonId: an identifier, can be any table or string, will be used when getting the table with phrase translations, example: "DetailsLocalization", "Details", "PlaterLoc", _G.Plater
|
||||
@languageId: game languages: "deDE", "enUS", "esES", "esMX", "frFR", "itIT", "koKR", "ptBR", "ruRU", "zhCN", "zhTW", or any other value if 'gameLanguageOnly' is false (default)
|
||||
@@ -17,7 +19,7 @@
|
||||
local newLanguageTable = DetailsFramework.Language.Register(_G.Details, "valyrianValyria", false)
|
||||
newLanguageTable["STRING_MY_PHRASE"] = "ñuha udrir"
|
||||
|
||||
DetailsFramework.Language.GetLanguageTable(addonId[, languageId])
|
||||
GetLanguageTable(addonId[, languageId])
|
||||
get the languageTable for the requested languageId within the addon namespace
|
||||
if languageId is not passed, uses the current language set for the addonId
|
||||
the default languageId for the addon is the first language registered with DetailsFramework.Language.Register()
|
||||
@@ -34,19 +36,19 @@
|
||||
local languageTable = DetailsFramework.Language.GetLanguageTable("Details", "valyrianValyria")
|
||||
fontString:SetText(languageTable["STRING_MY_PHRASE"])
|
||||
|
||||
DetailsFramework.Language.GetText(addonId, phraseId[, silent])
|
||||
GetText(addonId, phraseId[, silent])
|
||||
get a text from a registered addonId and phraseId
|
||||
@addonId: an identifier, can be any table or string, will be used when getting the table with phrase translations, example: "DetailsLocalization", "Details", "PlaterLoc", _G.Plater
|
||||
@phraseId: any string to identify the a translated text, example: phraseId: "OPTIONS_FRAME_WIDTH" text: "Adjust the Width of the frame."
|
||||
@silent: if true won't error on invalid phrase text and instead use the phraseId as the text, it will still error on invalid addonId
|
||||
|
||||
DetailsFramework.Language.SetCurrentLanguage(addonId, languageId)
|
||||
SetCurrentLanguage(addonId, languageId)
|
||||
set the language used by default when retriving a languageTable with DF.Language.GetLanguageTable() and not passing the second argument (languageId) within the call
|
||||
use this in combination with a savedVariable to use a language of the user choice
|
||||
@addonId: an identifier, can be any table or string, will be used when getting the table with phrase translations, example: "DetailsLocalization", "Details", "PlaterLoc", _G.Plater
|
||||
@languageId: game languages: "deDE", "enUS", "esES", "esMX", "frFR", "itIT", "koKR", "ptBR", "ruRU", "zhCN", "zhTW", or any other value if 'gameLanguageOnly' is false (default)
|
||||
|
||||
DetailsFramework.Language.RegisterObject(addonId, object, phraseId[, silent[, ...]])
|
||||
RegisterObject(addonId, object, phraseId[, silent[, ...]])
|
||||
to be registered, the Object need to have a SetText method
|
||||
when setting a languageId with DetailsFramework.Language.SetCurrentLanguage(), automatically change the text of all registered Objects
|
||||
@addonId: an identifier, can be any table or string, will be used when getting the table with phrase translations, example: "DetailsLocalization", "Details", "PlaterLoc", _G.Plater
|
||||
@@ -55,7 +57,7 @@
|
||||
@silent: if true won't error on invalid phrase text and instead use the phraseId as the text, it will still error on invalid addonId and Object
|
||||
@vararg: arguments to pass for format(text, ...)
|
||||
|
||||
DetailsFramework.Language.UpdateObjectArguments(addonId, object, ...)
|
||||
UpdateObjectArguments(addonId, object, ...)
|
||||
update the arguments (...) of a registered Object, if no argument passed it'll erase the arguments previously set
|
||||
the Object need to be already registered with DetailsFramework.Language.RegisterObject()
|
||||
the font string text will be changed to update the text with the new arguments
|
||||
@@ -63,7 +65,7 @@
|
||||
@object: any UIObject or table with SetText method
|
||||
@vararg: arguments to pass for format(text, ...)
|
||||
|
||||
DetailsFramework.Language.RegisterTableKey(addonId, table, key, phraseId[, silent[, ...]])
|
||||
RegisterTableKey(addonId, table, key, phraseId[, silent[, ...]])
|
||||
when setting a languageId with DetailsFramework.Language.SetCurrentLanguage(), automatically change the text of all registered tables, table[key] = 'new translated text'
|
||||
@addonId: an identifier, can be any table or string, will be used when getting the table with phrase translations, example: "DetailsLocalization", "Details", "PlaterLoc", _G.Plater
|
||||
@table: a lua table
|
||||
@@ -72,19 +74,27 @@
|
||||
@silent: if true won't error on invalid phrase text or table already registered, it will still error on invalid addonId, table, key and phraseId
|
||||
@vararg: arguments to pass for format(text, ...)
|
||||
|
||||
DetailsFramework.Language.UpdateTableKeyArguments(addonId, table, key, ...)
|
||||
UpdateTableKeyArguments(addonId, table, key, ...)
|
||||
same as UpdateObjectArguments() but for table keys
|
||||
@addonId: an identifier, can be any table or string, will be used when getting the table with phrase translations, example: "DetailsLocalization", "Details", "PlaterLoc", _G.Plater
|
||||
@table: a lua table
|
||||
@key: any value except nil or boolean
|
||||
@vararg: arguments to pass for format(text, ...)
|
||||
|
||||
DetailsFramework.Language.RegisterObjectWithDefault(addonId, object, phraseId, defaultText[, ...])
|
||||
RegisterObjectWithDefault(addonId, object, phraseId, defaultText[, ...])
|
||||
(helper function) register an object if a phraseID is valid or object:SetText(defaultText) is called
|
||||
|
||||
DetailsFramework.Language.RegisterTableKeyWithDefault(addonId, table, key, phraseId, defaultText[, ...])
|
||||
RegisterTableKeyWithDefault(addonId, table, key, phraseId, defaultText[, ...])
|
||||
(helper function) register a tableKey if a phraseID is valid or table[key] = defaultText
|
||||
|
||||
CreateLocTable(addonId, phraseId, shouldRegister[, ...])
|
||||
make a table to pass instead of the text while using DetailsFramework widgets
|
||||
this avoid to call the register object function right after creating the widget
|
||||
also make easy to register the same phraseID in many different widgets
|
||||
|
||||
SetTextWithLocTable(object, locTable)
|
||||
set the text of an object using a locTable, the object need the method SetText
|
||||
|
||||
--]=]
|
||||
|
||||
local DF = _G["DetailsFramework"]
|
||||
@@ -92,6 +102,10 @@ if (not DF or not DetailsFrameworkCanLoad) then
|
||||
return
|
||||
end
|
||||
|
||||
local format = string.format
|
||||
local unpack = table.unpack or unpack
|
||||
local GetLocale = _G.GetLocale
|
||||
|
||||
local CONST_LANGAGEID_ENUS = "enUS"
|
||||
|
||||
local supportedGameLanguages = {
|
||||
@@ -123,6 +137,13 @@ local functionSignature = {
|
||||
|
||||
["RegisterObjectWithDefault"] = "RegisterObjectWithDefault(addonId, object, phraseId, defaultText[, ...])",
|
||||
["RegisterTableKeyWithDefault"] = "RegisterTableKeyWithDefault(addonId, table, key, phraseId, defaultText[, ...])",
|
||||
|
||||
["CreateLocTable"] = "CreateLocTable(addonId, phraseId, shouldRegister[, ...])",
|
||||
["UnpackLocTable"] = "UnpackLocTable(locTable)",
|
||||
["CanRegisterLocTable"] = "CanRegisterLocTable(locTable)",
|
||||
["RegisterObjectWithLocTable"] = "RegisterObjectWithLocTable(object, locTable)",
|
||||
["SetTextWithLocTable"] = "SetTextWithLocTable(object, locTable)",
|
||||
["IsLocTable"] = "IsLocTable(locTable)",
|
||||
}
|
||||
|
||||
local functionCallPath = {
|
||||
@@ -138,10 +159,18 @@ local functionCallPath = {
|
||||
|
||||
["RegisterObjectWithDefault"] = "DetailsFramework.Language.RegisterObjectWithDefault",
|
||||
["RegisterTableKeyWithDefault"] = "DetailsFramework.Language.RegisterTableKeyWithDefault",
|
||||
|
||||
["CreateLocTable"] = "DetailsFramework.Language.CreateLocTable",
|
||||
["UnpackLocTable"] = "DetailsFramework.Language.UnpackLocTable",
|
||||
["CanRegisterLocTable"] = "DetailsFramework.Language.CanRegisterLocTable",
|
||||
["RegisterObjectWithLocTable"] = "DetailsFramework.Language.RegisterObjectWithLocTable",
|
||||
["SetTextWithLocTable"] = "DetailsFramework.Language.SetTextWithLocTable",
|
||||
["IsLocTable"] = "DetailsFramework.Language.IsLocTable",
|
||||
}
|
||||
|
||||
local errorText = {
|
||||
["AddonID"] = "require a valid addonID (table or string) on #%d argument",
|
||||
["AddonIDInvalidOrNotRegistered"] = "invalid addonID or no languages registered",
|
||||
["LanguageID"] = "require a languageID supported by the game on #%d argument",
|
||||
["PhraseID"] = "require a string on #%d argument",
|
||||
["NoLanguages"] = "no languages registered for addonId",
|
||||
@@ -154,6 +183,8 @@ local errorText = {
|
||||
["InvalidTable"] = "require a table on #%d argument",
|
||||
["InvalidTableKey"] = "require a table key on #%d argument",
|
||||
["TableKeyAlreadyRegistered"] = "table already registered", --not in use
|
||||
["InvalidLocTable"] = "invalid locTable on #%d argument",
|
||||
["LocTableCantRegister"] = "cannot register object, locTable.register == false",
|
||||
}
|
||||
|
||||
|
||||
@@ -743,4 +774,107 @@ function DF.Language.RegisterObjectWithDefault(addonId, object, phraseId, defaul
|
||||
else
|
||||
object:SetText(defaultText)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function DF.Language.CreateLocTable(addonId, phraseId, shouldRegister, ...)
|
||||
if (not isValid_AddonID(addonId)) then
|
||||
error(functionCallPath["CreateLocTable"] .. ": " .. format(errorText["AddonID"], 1) .. ", use: " .. functionSignature["CreateLocTable"] .. ".")
|
||||
end
|
||||
|
||||
if (not isValid_PhraseID(phraseId)) then
|
||||
error(functionCallPath["CreateLocTable"] .. ": " .. format(errorText["PhraseID"], 2) .. ", use: " .. functionSignature["CreateLocTable"] .. ".")
|
||||
end
|
||||
|
||||
local newLocTable = {
|
||||
addonId = addonId,
|
||||
phraseId = phraseId,
|
||||
shouldRegister = shouldRegister,
|
||||
arguments = parseArguments(...),
|
||||
}
|
||||
|
||||
return newLocTable
|
||||
end
|
||||
|
||||
function DF.Language.IsLocTable(locTable)
|
||||
if (type(locTable) ~= "table") then
|
||||
return false
|
||||
|
||||
elseif (locTable.addonId and locTable.phraseId) then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function DF.Language.CanRegisterLocTable(locTable)
|
||||
if (not DF.Language.IsLocTable(locTable)) then
|
||||
error(functionCallPath["CanRegisterLocTable"] .. ": " .. format(errorText["InvalidLocTable"], 1) .. ", use: " .. functionSignature["CanRegisterLocTable"] .. ".")
|
||||
end
|
||||
return locTable.shouldRegister
|
||||
end
|
||||
|
||||
|
||||
function DF.Language.UnpackLocTable(locTable)
|
||||
if (type(locTable) ~= "table") then
|
||||
error(functionCallPath["UnpackLocTable"] .. ": " .. format(errorText["InvalidLocTable"], 1) .. ", use: " .. functionSignature["UnpackLocTable"] .. ".")
|
||||
end
|
||||
return locTable.addonId, locTable.phraseId, locTable.shouldRegister or false, locTable.arguments
|
||||
end
|
||||
|
||||
|
||||
function DF.Language.RegisterObjectWithLocTable(object, locTable)
|
||||
if (not isValid_Object(object)) then
|
||||
error(functionCallPath["RegisterObjectWithLocTable"] .. ": " .. format(errorText["InvalidObject"], 1) .. ", use: " .. functionSignature["RegisterObjectWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
if (not DF.Language.IsLocTable(locTable)) then
|
||||
error(functionCallPath["RegisterObjectWithLocTable"] .. ": " .. format(errorText["InvalidLocTable"], 2) .. ", use: " .. functionSignature["RegisterObjectWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
local addonId, phraseId, shouldRegister, arguments = DF.Language.UnpackLocTable(locTable)
|
||||
|
||||
if (not isValid_AddonID(addonId)) then
|
||||
error(functionCallPath["RegisterObjectWithLocTable"] .. ": " .. format(errorText["AddonID"], 1) .. ", use: " .. functionSignature["RegisterObjectWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
if (not isValid_PhraseID(phraseId)) then
|
||||
error(functionCallPath["RegisterObjectWithLocTable"] .. ": " .. format(errorText["PhraseID"], 2) .. ", use: " .. functionSignature["RegisterObjectWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
if (not shouldRegister) then
|
||||
error(functionCallPath["RegisterObjectWithLocTable"] .. ": " .. errorText["LocTableCantRegister"] .. ", use: " .. functionSignature["RegisterObjectWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
DF.Language.RegisterObject(addonId, object, phraseId, true, arguments and unpack(arguments))
|
||||
end
|
||||
|
||||
|
||||
function DF.Language.SetTextWithLocTable(object, locTable)
|
||||
if (not isValid_Object(object)) then
|
||||
error(functionCallPath["SetTextWithLocTable"] .. ": " .. format(errorText["InvalidObject"], 1) .. ", use: " .. functionSignature["SetTextWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
if (not DF.Language.IsLocTable(locTable)) then
|
||||
error(functionCallPath["SetTextWithLocTable"] .. ": " .. format(errorText["InvalidLocTable"], 2) .. ", use: " .. functionSignature["SetTextWithLocTable"] .. ".")
|
||||
end
|
||||
|
||||
local addonId, phraseId, shouldRegister, arguments = DF.Language.UnpackLocTable(locTable)
|
||||
|
||||
local addonNamespaceTable = getAddonNamespace(addonId)
|
||||
if (not addonNamespaceTable) then
|
||||
error(functionCallPath["SetTextWithLocTable"] .. ": " .. errorText["AddonIDInvalidOrNotRegistered"] .. ", use: " .. functionSignature["RegisterLanguage"] .. ".")
|
||||
end
|
||||
|
||||
if (DF.Language.CanRegisterLocTable(locTable)) then
|
||||
DF.Language.RegisterObjectWithLocTable(object, locTable)
|
||||
return true
|
||||
end
|
||||
|
||||
local text = getText(addonNamespaceTable, phraseId)
|
||||
|
||||
--can use the locTable instead of the phraseInfoTable because both has the .arguments member
|
||||
setObject_Text(object, locTable, text)
|
||||
return true
|
||||
end
|
||||
@@ -28,16 +28,16 @@ end
|
||||
|
||||
function openRaidLib.GetTalentVersion()
|
||||
local _, _, _, buildInfo = GetBuildInfo()
|
||||
local gamePatch = buildInfo / 10000
|
||||
if (gamePatch >= 1 and gamePatch <= 4) then --vanilla tbc wotlk cataclysm
|
||||
|
||||
if (buildInfo >= 1 and buildInfo <= 40000) then --vanilla tbc wotlk cataclysm
|
||||
return CONST_TALENT_VERSION_CLASSIC
|
||||
end
|
||||
|
||||
if (gamePatch >= 7 and gamePatch <= 9) then --legion bfa shadowlands
|
||||
if (buildInfo >= 70000 and buildInfo <= 100000) then --legion bfa shadowlands
|
||||
return CONST_TALENT_VERSION_LEGION
|
||||
end
|
||||
|
||||
if (gamePatch >= 10 and gamePatch <= 20) then --dragonflight
|
||||
if (buildInfo >= 100000 and buildInfo <= 200000) then --dragonflight
|
||||
return CONST_TALENT_VERSION_DRAGONFLIGHT
|
||||
end
|
||||
end
|
||||
|
||||
@@ -63,7 +63,7 @@ if (WOW_PROJECT_ID ~= WOW_PROJECT_MAINLINE and not isExpansion_Dragonflight()) t
|
||||
end
|
||||
|
||||
local major = "LibOpenRaid-1.0"
|
||||
local CONST_LIB_VERSION = 58
|
||||
local CONST_LIB_VERSION = 59
|
||||
LIB_OPEN_RAID_CAN_LOAD = false
|
||||
|
||||
--declae the library within the LibStub
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
--> global name declaration
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
_G._detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
|
||||
|
||||
local version, build, date, tocversion = GetBuildInfo()
|
||||
|
||||
_detalhes.build_counter = 10033
|
||||
_detalhes.alpha_build_counter = 10033 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.build_counter = 10129
|
||||
_detalhes.alpha_build_counter = 10129 --if this is higher than the regular counter, use it instead
|
||||
_detalhes.dont_open_news = true
|
||||
_detalhes.game_version = version
|
||||
_detalhes.userversion = version .. " " .. _detalhes.build_counter
|
||||
@@ -845,7 +845,11 @@ do
|
||||
function Details.SendHighFive()
|
||||
Details.users = {{UnitName("player"), GetRealmName(), (Details.userversion or "") .. " (" .. Details.APIVersion .. ")"}}
|
||||
Details.sent_highfive = GetTime()
|
||||
Details:SendRaidData (Details.network.ids.HIGHFIVE_REQUEST)
|
||||
if (IsInRaid()) then
|
||||
Details:SendRaidData(Details.network.ids.HIGHFIVE_REQUEST)
|
||||
else
|
||||
Details:SendPartyData(Details.network.ids.HIGHFIVE_REQUEST)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1924,29 +1924,29 @@ end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:InstanceReset (instance)
|
||||
function _detalhes:InstanceReset(instance)
|
||||
if (instance) then
|
||||
self = instance
|
||||
end
|
||||
Details.FadeHandler.Fader (self, "in", nil, "barras")
|
||||
self:AtualizaSegmentos (self)
|
||||
|
||||
Details.FadeHandler.Fader(self, "in", nil, "barras")
|
||||
self:AtualizaSegmentos(self)
|
||||
self:AtualizaSoloMode_AfertReset()
|
||||
self:ResetaGump()
|
||||
|
||||
|
||||
if (not _detalhes.initializing) then
|
||||
_detalhes:RefreshMainWindow (self, true) --atualiza todas as instancias
|
||||
_detalhes:RefreshMainWindow(self, true) --atualiza todas as instancias
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:RefreshBars (instance)
|
||||
function _detalhes:RefreshBars(instance)
|
||||
if (instance) then
|
||||
self = instance
|
||||
end
|
||||
self:InstanceRefreshRows (instancia)
|
||||
self:InstanceRefreshRows(instance)
|
||||
end
|
||||
|
||||
function _detalhes:SetBackgroundColor (...)
|
||||
|
||||
function _detalhes:SetBackgroundColor(...)
|
||||
local red = select (1, ...)
|
||||
if (not red) then
|
||||
self.bgdisplay:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, self.bg_alpha)
|
||||
|
||||
+50
-1
@@ -3044,4 +3044,53 @@ local timePlayerFrame = CreateFrame("frame")
|
||||
timePlayerFrame:RegisterEvent("TIME_PLAYED_MSG")
|
||||
timePlayerFrame:SetScript("OnEvent", function()
|
||||
--C_Timer.After(0, function() print(Details.GetPlayTimeOnClassString()) end)
|
||||
end)
|
||||
end)
|
||||
|
||||
local stutterCounter = 0
|
||||
local UpdateAddOnMemoryUsage_Original = _G.UpdateAddOnMemoryUsage
|
||||
_G["UpdateAddOnMemoryUsage"] = function()
|
||||
local currentTime = debugprofilestop()
|
||||
UpdateAddOnMemoryUsage_Original()
|
||||
local deltaTime = debugprofilestop() - currentTime
|
||||
|
||||
if (deltaTime > 16) then
|
||||
local callStack = debugstack(2, 0, 4)
|
||||
--ignore if is coming from the micro menu tooltip
|
||||
if (callStack:find("MainMenuBarPerformanceBarFrame_OnEnter")) then
|
||||
return
|
||||
end
|
||||
|
||||
stutterCounter = stutterCounter + 1
|
||||
local stutterDegree = 0
|
||||
if (stutterCounter > 60) then
|
||||
if (deltaTime < 48) then
|
||||
Details:Msg("some addon may be causing small framerate stuttering, use '/details perf' to know more.")
|
||||
stutterDegree = 1
|
||||
|
||||
elseif (deltaTime <= 100) then
|
||||
Details:Msg("some addon may be causing framerate drops, use '/details perf' to know more.")
|
||||
stutterDegree = 2
|
||||
|
||||
else
|
||||
Details:Msg("some addon might be causing performance issues, use '/details perf' to know more.")
|
||||
stutterDegree = 3
|
||||
end
|
||||
|
||||
stutterCounter = 0
|
||||
end
|
||||
|
||||
Details.performanceData = {
|
||||
deltaTime = deltaTime,
|
||||
callStack = callStack,
|
||||
culpritFunc = "_G.UpdateAddOnMemoryUsage()",
|
||||
culpritDesc = "Calculates memory usage of addons",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Details.performanceData = {
|
||||
deltaTime = 0,
|
||||
callStack = "",
|
||||
culpritFunc = "",
|
||||
culpritDesc = "",
|
||||
}
|
||||
+4
-1
@@ -435,6 +435,9 @@
|
||||
--> register comm
|
||||
|
||||
function Details:CommReceived(commPrefix, data, channel, source)
|
||||
|
||||
--print("comm", source, data)
|
||||
|
||||
local deserializedTable = {Details:Deserialize(data)}
|
||||
if (not deserializedTable[1]) then
|
||||
if (Details.debugnet) then
|
||||
@@ -448,7 +451,7 @@
|
||||
player = source
|
||||
|
||||
if (Details.debugnet) then
|
||||
Details:Msg("(debug) network received prefix:", prefix, "length:", string.len(data))
|
||||
Details:Msg("(debug) network received prefix:", prefix, "length:", string.len(data), source)
|
||||
end
|
||||
|
||||
if (type(prefix) ~= "string") then
|
||||
|
||||
+3
-2
@@ -413,7 +413,7 @@
|
||||
ignore_spikeballs = 0,
|
||||
}
|
||||
|
||||
local NPCID_KELTHUZAD_ADDMIMICPLAYERS = 176605
|
||||
local NPCID_KELTHUZAD_ADDMIMICPLAYERS = 176605
|
||||
|
||||
--> damage spells to ignore
|
||||
local damage_spells_to_ignore = {
|
||||
@@ -421,8 +421,9 @@
|
||||
--it is not useful for damage done or friendly fire
|
||||
[SPELLID_WARLOCK_SOULLINK] = true,
|
||||
[371597] = true, --Protoform Barrier gotten from an SPELL_ABSORBED cleu event
|
||||
[371701] = true, --Protoform Barrier
|
||||
}
|
||||
|
||||
|
||||
--> expose the ignore spells table to external scripts
|
||||
_detalhes.SpellsToIgnore = damage_spells_to_ignore
|
||||
|
||||
|
||||
@@ -1676,6 +1676,11 @@ function Details.ShowCopyValueFrame(textToShow)
|
||||
frame.editBox:ClearFocus()
|
||||
frame:Hide()
|
||||
end)
|
||||
|
||||
frame.editBox:SetScript("OnChar", function()
|
||||
frame.editBox:ClearFocus()
|
||||
frame:Hide()
|
||||
end)
|
||||
end
|
||||
|
||||
DetailsCopyValueFrame:Show()
|
||||
|
||||
+31
-34
@@ -5346,63 +5346,60 @@ function Details:InstanceAlpha (alpha)
|
||||
self.baseframe.UPFrame:SetAlpha (alpha)
|
||||
end
|
||||
|
||||
function Details:InstanceColor (red, green, blue, alpha, no_save, change_statusbar)
|
||||
|
||||
function Details:InstanceColor(red, green, blue, alpha, noSave, changeStatusbar)
|
||||
if (not red) then
|
||||
red, green, blue, alpha = unpack(self.color)
|
||||
no_save = true
|
||||
noSave = true
|
||||
end
|
||||
|
||||
if (type (red) ~= "number") then
|
||||
red, green, blue, alpha = gump:ParseColors (red)
|
||||
if (type(red) ~= "number") then
|
||||
red, green, blue, alpha = gump:ParseColors(red)
|
||||
end
|
||||
|
||||
if (not no_save) then
|
||||
--> saving
|
||||
self.color [1] = red
|
||||
self.color [2] = green
|
||||
self.color [3] = blue
|
||||
self.color [4] = alpha
|
||||
if (change_statusbar) then
|
||||
self:StatusBarColor (red, green, blue, alpha)
|
||||
if (not noSave) then
|
||||
--saving
|
||||
self.color[1] = red
|
||||
self.color[2] = green
|
||||
self.color[3] = blue
|
||||
self.color[4] = alpha
|
||||
if (changeStatusbar) then
|
||||
self:StatusBarColor(red, green, blue, alpha)
|
||||
end
|
||||
else
|
||||
--> not saving
|
||||
self:StatusBarColor (nil, nil, nil, alpha, true)
|
||||
--not saving
|
||||
self:StatusBarColor(nil, nil, nil, alpha, true)
|
||||
end
|
||||
|
||||
local skin = Details.skins [self.skin]
|
||||
local skin = Details.skins[self.skin]
|
||||
if (not skin) then --the skin isn't available any more
|
||||
--put the skin into wait to install
|
||||
local tempSkin = self:WaitForSkin()
|
||||
skin = tempSkin
|
||||
end
|
||||
|
||||
self.baseframe.cabecalho.ball_r:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.ball_r:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.ball_r:SetVertexColor(red, green, blue)
|
||||
self.baseframe.cabecalho.ball_r:SetAlpha(alpha)
|
||||
|
||||
self.baseframe.cabecalho.ball:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.ball:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.ball:SetVertexColor(red, green, blue)
|
||||
self.baseframe.cabecalho.ball:SetAlpha(alpha)
|
||||
|
||||
if (not skin.icon_ignore_alpha) then
|
||||
self.baseframe.cabecalho.atributo_icon:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.atributo_icon:SetAlpha(alpha)
|
||||
end
|
||||
|
||||
self.baseframe.cabecalho.emenda:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.emenda:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.top_bg:SetVertexColor (red, green, blue)
|
||||
self.baseframe.cabecalho.top_bg:SetAlpha (alpha)
|
||||
self.baseframe.cabecalho.emenda:SetVertexColor(red, green, blue)
|
||||
self.baseframe.cabecalho.emenda:SetAlpha(alpha)
|
||||
self.baseframe.cabecalho.top_bg:SetVertexColor(red, green, blue)
|
||||
self.baseframe.cabecalho.top_bg:SetAlpha(alpha)
|
||||
|
||||
self.baseframe.barra_esquerda:SetVertexColor (red, green, blue)
|
||||
self.baseframe.barra_esquerda:SetAlpha (alpha)
|
||||
self.baseframe.barra_direita:SetVertexColor (red, green, blue)
|
||||
self.baseframe.barra_direita:SetAlpha (alpha)
|
||||
self.baseframe.barra_fundo:SetVertexColor (red, green, blue)
|
||||
self.baseframe.barra_fundo:SetAlpha (alpha)
|
||||
self.baseframe.barra_esquerda:SetVertexColor(red, green, blue)
|
||||
self.baseframe.barra_esquerda:SetAlpha(alpha)
|
||||
self.baseframe.barra_direita:SetVertexColor(red, green, blue)
|
||||
self.baseframe.barra_direita:SetAlpha(alpha)
|
||||
self.baseframe.barra_fundo:SetVertexColor(red, green, blue)
|
||||
self.baseframe.barra_fundo:SetAlpha(alpha)
|
||||
|
||||
self.baseframe.UPFrame:SetAlpha (alpha)
|
||||
|
||||
--self.color[1], self.color[2], self.color[3], self.color[4] = red, green, blue, alpha
|
||||
self.baseframe.UPFrame:SetAlpha(alpha)
|
||||
end
|
||||
|
||||
function Details:StatusBarAlertTime (instance)
|
||||
|
||||
@@ -2847,7 +2847,7 @@ do
|
||||
desc = Loc ["STRING_OPTIONS_SHOW_SIDEBARS_DESC"],
|
||||
},
|
||||
|
||||
{--background color
|
||||
{--row's area color
|
||||
type = "color",
|
||||
get = function()
|
||||
return {currentInstance.bg_r, currentInstance.bg_g, currentInstance.bg_b, currentInstance.bg_alpha}
|
||||
|
||||
+9
-9
@@ -337,7 +337,7 @@ local _
|
||||
icon_point_anchor_bottom = {-37, 12},
|
||||
left_corner_anchor_bottom = {-107, 0},
|
||||
right_corner_anchor_bottom = {96, 0},
|
||||
|
||||
|
||||
icon_on_top = true,
|
||||
icon_ignore_alpha = true,
|
||||
icon_titletext_position = {3, 3},
|
||||
@@ -346,20 +346,20 @@ local _
|
||||
menu_icons_alpha = 0.92,
|
||||
["menu_icons_size"] = 0.82,
|
||||
["color"] = {
|
||||
0.086274512112141, -- [1]
|
||||
0.086274512112141, -- [2]
|
||||
0.086274512112141, -- [3]
|
||||
0.84036460518837, -- [4]
|
||||
0.1215,
|
||||
0.1176,
|
||||
0.1294,
|
||||
0.91,
|
||||
},
|
||||
["menu_anchor"] = {
|
||||
20,
|
||||
0,
|
||||
["side"] = 2,
|
||||
},
|
||||
["bg_r"] = 0.2039215862751,
|
||||
["bg_g"] = 0.19607844948769,
|
||||
["bg_b"] = 0.2039215862751,
|
||||
["bg_alpha"] = 0.49454617500305,
|
||||
["bg_r"] = 0.243,
|
||||
["bg_g"] = 0.2352,
|
||||
["bg_b"] = 0.2588,
|
||||
["bg_alpha"] = 0.6,
|
||||
["color_buttons"] = {
|
||||
1, -- [1]
|
||||
1, -- [2]
|
||||
|
||||
+32
-1
@@ -63,7 +63,36 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
else
|
||||
_detalhes:ShutDownAllInstances()
|
||||
end
|
||||
|
||||
|
||||
elseif (command == "perf") then
|
||||
local performanceData = Details.performanceData
|
||||
local framesLost = ceil(performanceData.deltaTime / 60)
|
||||
local callStack = performanceData.callStack
|
||||
|
||||
local returnTable = {}
|
||||
|
||||
returnTable[#returnTable+1] = "Stuttering Information:"
|
||||
returnTable[#returnTable+1] = "An addon feature, script is using: " .. performanceData.culpritFunc .. ""
|
||||
|
||||
returnTable[#returnTable+1] = ""
|
||||
|
||||
returnTable[#returnTable+1] = "Description: " .. performanceData.culpritDesc
|
||||
|
||||
returnTable[#returnTable+1] = ""
|
||||
|
||||
returnTable[#returnTable+1] = "You may first: disable the addon feature that uses the functionality."
|
||||
returnTable[#returnTable+1] = "Second: disable a script which are using the function call: " .. performanceData.culpritFunc .. "."
|
||||
|
||||
returnTable[#returnTable+1] = ""
|
||||
|
||||
returnTable[#returnTable+1] = "Callstack for Debug:"
|
||||
local callStackTable = DetailsFramework:SplitTextInLines(callStack)
|
||||
for i = 1, #callStackTable do
|
||||
returnTable[#returnTable+1] = callStackTable[i]
|
||||
end
|
||||
|
||||
dumpt(returnTable)
|
||||
|
||||
elseif (command == "softhide") then
|
||||
for instanceID, instance in _detalhes:ListInstances() do
|
||||
if (instance:IsEnabled()) then
|
||||
@@ -1687,6 +1716,8 @@ function SlashCmdList.DETAILS (msg, editbox)
|
||||
print ("|cffffaeae/details|r |cffffff33" .. "spells" .. "|r: list of spells already saw.") --localize-me
|
||||
|
||||
print("|cFFFFFF00DETAILS! VERSION|r:|cFFFFAA00" .. " " .. Details.GetVersionString())
|
||||
print ("|cffffaeae/details|r |cffffff33" .. "version" .. "|r: copy version.")
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user