- Fixed an issue where some options combinations was making the window unlock after /reload.
- Framework update. - Localization updates.
This commit is contained in:
+29
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local dversion = 136
|
||||
local dversion = 139
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
@@ -87,6 +87,9 @@ local embed_functions = {
|
||||
"GetNpcIdFromGuid",
|
||||
"ShowFeedbackPanel",
|
||||
"SetAsOptionsPanel",
|
||||
"GetPlayerRole",
|
||||
"GetCharacterTalents",
|
||||
"GetCharacterPvPTalents",
|
||||
|
||||
"CreateDropDown",
|
||||
"CreateButton",
|
||||
@@ -2762,11 +2765,36 @@ DF.CLEncounterID = {
|
||||
{ID = 2122, Name = "G'huun"},
|
||||
}
|
||||
|
||||
function DF:GetPlayerRole()
|
||||
local assignedRole = UnitGroupRolesAssigned ("player")
|
||||
if (assignedRole == "NONE") then
|
||||
local spec = GetSpecialization()
|
||||
return spec and GetSpecializationRole (spec) or "NONE"
|
||||
end
|
||||
return assignedRole
|
||||
end
|
||||
|
||||
function DF:GetCLEncounterIDs()
|
||||
return DF.CLEncounterID
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> delta seconds reader
|
||||
|
||||
if (not DetailsFrameworkDeltaTimeFrame) then
|
||||
CreateFrame ("frame", "DetailsFrameworkDeltaTimeFrame", UIParent)
|
||||
end
|
||||
|
||||
local deltaTimeFrame = DetailsFrameworkDeltaTimeFrame
|
||||
deltaTimeFrame:SetScript ("OnUpdate", function (self, deltaTime)
|
||||
self.deltaTime = deltaTime
|
||||
end)
|
||||
|
||||
function GetWorldDeltaSeconds()
|
||||
return deltaTimeFrame.deltaTime
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> debug
|
||||
|
||||
|
||||
+12
-2
@@ -97,7 +97,8 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
end
|
||||
--> left color
|
||||
local gmember_color = function (_object)
|
||||
return _object._texture.original_colors
|
||||
local r, g, b, a = _object._texture:GetVertexColor()
|
||||
return r, g, b, a
|
||||
end
|
||||
--> icon
|
||||
local gmember_icon = function (_object)
|
||||
@@ -208,7 +209,7 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
--> color
|
||||
local smember_color = function (_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
|
||||
|
||||
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
|
||||
_object._texture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
_object.timer_texture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
@@ -348,8 +349,15 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
|
||||
function BarMetaFunctions:Hide()
|
||||
self.statusbar:Hide()
|
||||
end
|
||||
|
||||
|
||||
--> return color
|
||||
function BarMetaFunctions:GetVertexColor()
|
||||
return self._texture:GetVertexColor()
|
||||
end
|
||||
|
||||
--> set value (status bar)
|
||||
|
||||
function BarMetaFunctions:SetValue (value)
|
||||
if (not value) then
|
||||
value = 0
|
||||
@@ -768,6 +776,8 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
|
||||
|
||||
--> create widgets
|
||||
BarObject.statusbar = CreateFrame ("statusbar", name, parent)
|
||||
DF:Mixin (BarObject.statusbar, DF.WidgetFunctions)
|
||||
|
||||
build_statusbar (BarObject.statusbar)
|
||||
|
||||
BarObject.widget = BarObject.statusbar
|
||||
|
||||
+8
-5
@@ -6147,7 +6147,7 @@ function DF:OpenLoadConditionsPanel (optionsTable, callback, frameOptions)
|
||||
|
||||
--create radio group for mythic+ affixes
|
||||
local affixes = {}
|
||||
for i = 2, 50 do
|
||||
for i = 2, 1000 do
|
||||
local affixName, desc, texture = C_ChallengeMode.GetAffixInfo (i)
|
||||
if (affixName) then
|
||||
tinsert (affixes, {
|
||||
@@ -7322,7 +7322,7 @@ DF.CastFrameFunctions = {
|
||||
--colour the castbar statusbar by the type of the cast
|
||||
Colors = {
|
||||
Casting = DF:CreateColorTable (1, 0.73, .1, 1),
|
||||
Channeling = DF:CreateColorTable (0, 1, 0, 1),
|
||||
Channeling = DF:CreateColorTable (1, 0.73, .1, 1),
|
||||
Finished = DF:CreateColorTable (0, 1, 0, 1),
|
||||
NonInterruptible = DF:CreateColorTable (.7, .7, .7, 1),
|
||||
Failed = DF:CreateColorTable (.4, .4, .4, 1),
|
||||
@@ -7883,12 +7883,12 @@ DF.CastFrameFunctions = {
|
||||
|
||||
UNIT_SPELLCAST_CHANNEL_START = function (self, unit, ...)
|
||||
local name, text, texture, startTime, endTime, isTradeSkill, notInterruptible, spellID = UnitChannelInfo (unit)
|
||||
|
||||
|
||||
--> is valid?
|
||||
if (not self:IsValid (unit, name, isTradeSkill, true)) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--> setup cast
|
||||
self.casting = nil
|
||||
self.channeling = true
|
||||
@@ -8465,6 +8465,10 @@ end
|
||||
else
|
||||
self.border:Hide()
|
||||
end
|
||||
|
||||
if (not self.Settings.ShowUnitName) then
|
||||
self.unitName:Hide()
|
||||
end
|
||||
else
|
||||
self:UnregisterEvents()
|
||||
self.healthBar:SetUnit (nil)
|
||||
@@ -8605,7 +8609,6 @@ end
|
||||
--> misc
|
||||
UpdateName = function (self)
|
||||
if (not self.Settings.ShowUnitName) then
|
||||
self.unitName:Hide()
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@@ -246,6 +246,7 @@ function DF:NewImage (parent, texture, w, h, layer, coords, member, name)
|
||||
|
||||
ImageObject.image = parent:CreateTexture (name, layer or "OVERLAY")
|
||||
ImageObject.widget = ImageObject.image
|
||||
DF:Mixin (ImageObject.image, DF.WidgetFunctions)
|
||||
|
||||
if (not APIImageFunctions) then
|
||||
APIImageFunctions = true
|
||||
|
||||
@@ -329,7 +329,6 @@ end
|
||||
self.sub_atributo_last = table_deepcopy (config.sub_atributo_last)
|
||||
self.isLocked = config.isLocked
|
||||
self.last_raid_plugin = config.last_raid_plugin
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -578,7 +577,7 @@ end
|
||||
end
|
||||
|
||||
if (not self.iniciada) then
|
||||
self:RestauraJanela (self.meu_id)
|
||||
self:RestauraJanela (self.meu_id) --parece que esta chamando o ativar instance denovo...
|
||||
else
|
||||
_detalhes.opened_windows = _detalhes.opened_windows+1
|
||||
end
|
||||
@@ -1453,10 +1452,10 @@ end
|
||||
--> ao reiniciar o addon esta fun��o � rodada para recriar a janela da inst�ncia
|
||||
--> search key: ~restaura ~inicio ~start
|
||||
function _detalhes:RestauraJanela (index, temp, load_only)
|
||||
|
||||
|
||||
--> load
|
||||
self:LoadInstanceConfig()
|
||||
|
||||
|
||||
--> reset internal stuff
|
||||
self.sub_atributo_last = self.sub_atributo_last or {1, 1, 1, 1, 1}
|
||||
self.rolagem = false
|
||||
@@ -1476,8 +1475,9 @@ function _detalhes:RestauraJanela (index, temp, load_only)
|
||||
self.last_modo = self.last_modo or modo_grupo
|
||||
self.cached_bar_width = self.cached_bar_width or 0
|
||||
self.row_height = self.row_info.height + self.row_info.space.between
|
||||
|
||||
|
||||
--> create frames
|
||||
local isLocked = self.isLocked
|
||||
local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (self.meu_id, self)
|
||||
self.baseframe = _baseframe
|
||||
self.bgframe = _bgframe
|
||||
@@ -1486,6 +1486,8 @@ function _detalhes:RestauraJanela (index, temp, load_only)
|
||||
_baseframe:EnableMouseWheel (false)
|
||||
self.alturaAntiga = _baseframe:GetHeight()
|
||||
|
||||
--self.isLocked = isLocked --window isn't locked when just created it
|
||||
|
||||
--> change the attribute
|
||||
_detalhes:TrocaTabela (self, self.segmento, self.atributo, self.sub_atributo, true) --> passando true no 5� valor para a fun��o ignorar a checagem de valores iguais
|
||||
|
||||
@@ -1493,13 +1495,13 @@ function _detalhes:RestauraJanela (index, temp, load_only)
|
||||
if (self.wallpaper.enabled) then
|
||||
self:InstanceWallpaper (true)
|
||||
end
|
||||
|
||||
|
||||
--> set the color of this instance window
|
||||
self:InstanceColor (self.color)
|
||||
|
||||
--> scrollbar
|
||||
self:EsconderScrollBar (true)
|
||||
|
||||
|
||||
--> check snaps
|
||||
self.snap = self.snap or {}
|
||||
|
||||
|
||||
@@ -3726,7 +3726,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
if (instancia.isLocked) then
|
||||
instancia.isLocked = not instancia.isLocked
|
||||
lockFunctionOnClick (baseframe.lock_button)
|
||||
lockFunctionOnClick (baseframe.lock_button, nil, nil, true)
|
||||
end
|
||||
|
||||
gump:Fade (baseframe.lock_button, -1, 3.0)
|
||||
|
||||
Reference in New Issue
Block a user