- Added an option to disable stretch button and bar highlight.
- Disabling nicknames now also disable avatars. - Fixed miscrodisplays font selection wasn't showing all fonts.
This commit is contained in:
@@ -1824,15 +1824,46 @@ end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
function _detalhes:CheckSwitchToCurrent()
|
||||
if (DetailsReportWindow and DetailsReportWindow:IsShown()) then
|
||||
_detalhes.delay_CheckSwitchToCurrent = true
|
||||
return
|
||||
end
|
||||
for _, instance in _ipairs (_detalhes.tabela_instancias) do
|
||||
if (instance.ativa and instance.baseframe and instance.segmento ~= 0 and instance.auto_current) then
|
||||
function _detalhes:PostponeSwitchToCurrent (instance)
|
||||
if (
|
||||
not instance.last_interaction or
|
||||
(
|
||||
(instance.ativa) and
|
||||
(instance.last_interaction+3 < _detalhes._tempo) and
|
||||
(not DetailsReportWindow or not DetailsReportWindow:IsShown()) and
|
||||
(not _detalhes.janela_info:IsShown())
|
||||
)
|
||||
) then
|
||||
instance._postponing_switch = nil
|
||||
if (instance.segmento > 0 and instance.auto_current) then
|
||||
instance:TrocaTabela (0) --> muda o segmento pra current
|
||||
instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\AddOns\Details\images\toolbar_icons]], 18, 18, false, 32/256, 64/256, 0, 1}, 6)
|
||||
return
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
if (instance.is_interacting) then
|
||||
instance.last_interaction = _detalhes._tempo
|
||||
end
|
||||
instance._postponing_switch = _detalhes:ScheduleTimer ("PostponeSwitchToCurrent", 1, instance)
|
||||
end
|
||||
|
||||
function _detalhes:CheckSwitchToCurrent()
|
||||
for _, instance in _ipairs (_detalhes.tabela_instancias) do
|
||||
if (instance.ativa and instance.auto_current and instance.baseframe and instance.segmento > 0) then
|
||||
if (instance.is_interacting) then
|
||||
instance.last_interaction = _detalhes._tempo
|
||||
end
|
||||
|
||||
if ((instance.last_interaction and (instance.last_interaction+3 > _detalhes._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown()) or (_detalhes.janela_info:IsShown())) then
|
||||
--> postpone
|
||||
instance._postponing_switch = _detalhes:ScheduleTimer ("PostponeSwitchToCurrent", 1, instance)
|
||||
else
|
||||
instance:TrocaTabela (0) --> muda o segmento pra current
|
||||
instance:InstanceAlert (Loc ["STRING_CHANGED_TO_CURRENT"], {[[Interface\AddOns\Details\images\toolbar_icons]], 18, 18, false, 32/256, 64/256, 0, 1}, 6)
|
||||
instance._postponing_switch = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2092,7 +2123,7 @@ function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, ini
|
||||
|
||||
if (_detalhes.instances_segments_locked and not iniciando_instancia) then
|
||||
for _, instance in ipairs (_detalhes.tabela_instancias) do
|
||||
if (instance.meu_id ~= instancia.meu_id and instance.ativa) then
|
||||
if (instance.meu_id ~= instancia.meu_id and instance.ativa and not instance._postponing_switch and not instance._postponing_current) then
|
||||
if (instance.modo == 2 or instance.modo == 3) then
|
||||
--> na troca de segmento, conferir se a instancia esta frozen
|
||||
if (instance.freezed) then
|
||||
|
||||
+27
-7
@@ -1074,21 +1074,41 @@
|
||||
end
|
||||
|
||||
function _detalhes:PostponeInstanceToCurrent (instance)
|
||||
if (not instance.last_interaction or ((instance.last_interaction+6 < _detalhes._tempo) and (not DetailsReportWindow or not DetailsReportWindow:IsShown()))) then
|
||||
if (
|
||||
not instance.last_interaction or
|
||||
(
|
||||
(instance.ativa) and
|
||||
(instance.last_interaction+3 < _detalhes._tempo) and
|
||||
(not DetailsReportWindow or not DetailsReportWindow:IsShown()) and
|
||||
(not _detalhes.janela_info:IsShown())
|
||||
)
|
||||
) then
|
||||
instance._postponing_current = nil
|
||||
if (instance.segmento == 0) then
|
||||
return _detalhes:TrocaSegmentoAtual (instance)
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
_detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 2, instance)
|
||||
if (instance.is_interacting) then
|
||||
instance.last_interaction = _detalhes._tempo
|
||||
end
|
||||
instance._postponing_current = _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 1, instance)
|
||||
end
|
||||
|
||||
function _detalhes:TrocaSegmentoAtual (instancia)
|
||||
if (instancia.segmento == 0) then --> esta mostrando a tabela Atual
|
||||
if ((instancia.last_interaction and (instancia.last_interaction+6 > _detalhes._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown())) then
|
||||
--> postpone
|
||||
return _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 2, instancia)
|
||||
if (instancia.segmento == 0 and instancia.baseframe and instancia.ativa) then
|
||||
if (instancia.is_interacting) then
|
||||
instancia.last_interaction = _detalhes._tempo
|
||||
end
|
||||
|
||||
if ((instancia.last_interaction and (instancia.last_interaction+3 > _detalhes._tempo)) or (DetailsReportWindow and DetailsReportWindow:IsShown()) or (_detalhes.janela_info:IsShown())) then
|
||||
--> postpone
|
||||
instancia._postponing_current = _detalhes:ScheduleTimer ("PostponeInstanceToCurrent", 1, instancia)
|
||||
return
|
||||
end
|
||||
|
||||
instancia._postponing_current = nil
|
||||
instancia.showing =_detalhes.tabela_vigente
|
||||
instancia:ResetaGump()
|
||||
_detalhes.gump:Fade (instancia, "in", nil, "barras")
|
||||
@@ -1202,7 +1222,7 @@
|
||||
|
||||
if (objeto.serial and objeto.serial ~= "") then
|
||||
local avatar = NickTag:GetNicknameTable (objeto.serial, true)
|
||||
if (avatar) then
|
||||
if (avatar and not _detalhes.ignore_nicktag) then
|
||||
if (avatar [2] and avatar [4] and avatar [1]) then
|
||||
GameCooltip:SetBannerImage (1, avatar [2], 80, 40, avatarPoint, avatarTexCoord, nil) --> overlay [2] avatar path
|
||||
GameCooltip:SetBannerImage (2, avatar [4], 200, 55, backgroundPoint, avatar [5], avatar [6]) --> background
|
||||
|
||||
@@ -1606,12 +1606,14 @@ extraWindow:SetBackdropColor (0, 0, 0, 0.9)
|
||||
|
||||
end
|
||||
|
||||
local fontObjects = SharedMedia:HashTable ("font")
|
||||
local fontTable = {}
|
||||
for name, fontPath in pairs (fontObjects) do
|
||||
fontTable[#fontTable+1] = {value = name, label = name, onclick = onSelectFont, font = fontPath}
|
||||
local buildFontMenu = function()
|
||||
local fontObjects = SharedMedia:HashTable ("font")
|
||||
local fontTable = {}
|
||||
for name, fontPath in pairs (fontObjects) do
|
||||
fontTable[#fontTable+1] = {value = name, label = name, onclick = onSelectFont, font = fontPath}
|
||||
end
|
||||
return fontTable
|
||||
end
|
||||
local buildFontMenu = function() return fontTable end
|
||||
|
||||
_detalhes.gump:NewLabel (window, _, "$parentFontFaceLabel", "fontfaceLabel", Loc ["STRING_PLUGINOPTIONS_FONTFACE"])
|
||||
window.fontfaceLabel:SetPoint (10, -75)
|
||||
|
||||
@@ -869,6 +869,7 @@ local default_profile = {
|
||||
--> instances
|
||||
instances_amount = 5,
|
||||
instances_segments_locked = false,
|
||||
instances_disable_bar_highlight = false,
|
||||
|
||||
--> if clear ungroup characters when logout
|
||||
clear_ungrouped = true,
|
||||
|
||||
@@ -2361,6 +2361,30 @@ function window:CreateFrame18()
|
||||
|
||||
window:CreateLineBackground2 (frame18, "DisableLockResizeUngroupSlider", "DisableLockResizeUngroupLabel", Loc ["STRING_OPTIONS_DISABLE_LOCK_RESIZE_DESC"])
|
||||
|
||||
--> disable stretch button
|
||||
g:NewLabel (frame18, _, "$parentDisableStretchButtonLabel", "DisableStretchButtonLabel", Loc ["STRING_OPTIONS_DISABLE_STRETCH_BUTTON"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame18, _, "$parentDisableStretchButtonSlider", "DisableStretchButtonSlider", 60, 20, _, _, _detalhes.disable_stretch_button)
|
||||
|
||||
frame18.DisableStretchButtonSlider:SetPoint ("left", frame18.DisableStretchButtonLabel, "right", 2)
|
||||
frame18.DisableStretchButtonSlider.OnSwitch = function (_, _, value)
|
||||
_detalhes.disable_stretch_button = value
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame18, "DisableStretchButtonSlider", "DisableStretchButtonLabel", Loc ["STRING_OPTIONS_DISABLE_STRETCH_BUTTON_DESC"])
|
||||
|
||||
--> disable bar highlight
|
||||
g:NewLabel (frame18, _, "$parentDisableBarHighlightLabel", "DisableBarHighlightLabel", Loc ["STRING_OPTIONS_DISABLE_BARHIGHLIGHT"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame18, _, "$parentDisableBarHighlightSlider", "DisableBarHighlightSlider", 60, 20, _, _, _detalhes.instances_disable_bar_highlight)
|
||||
|
||||
frame18.DisableBarHighlightSlider:SetPoint ("left", frame18.DisableBarHighlightLabel, "right", 2)
|
||||
frame18.DisableBarHighlightSlider.OnSwitch = function (_, _, value)
|
||||
_detalhes.instances_disable_bar_highlight = value
|
||||
_detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance)
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame18, "DisableBarHighlightSlider", "DisableBarHighlightLabel", Loc ["STRING_OPTIONS_DISABLE_BARHIGHLIGHT_DESC"])
|
||||
|
||||
--> damage taken always on everything
|
||||
g:NewLabel (frame18, _, "$parentDamageTakenEverythingLabel", "DamageTakenEverythingLabel", Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame18, _, "$parentDamageTakenEverythingSlider", "DamageTakenEverythingSlider", 60, 20, _, _, _detalhes.damage_taken_everything)
|
||||
@@ -2485,8 +2509,10 @@ function window:CreateFrame18()
|
||||
{"DisableGroupsLabel", 5, true},
|
||||
{"DisableResetLabel", 6},
|
||||
{"DisableLockResizeUngroupLabel", 7},
|
||||
{"DamageTakenEverythingLabel", 8},
|
||||
{"scrollLabel", 9, true},
|
||||
{"DisableStretchButtonLabel", 8},
|
||||
{"DisableBarHighlightLabel", 9},
|
||||
{"DamageTakenEverythingLabel", 10},
|
||||
{"scrollLabel", 11, true},
|
||||
|
||||
}
|
||||
|
||||
@@ -10642,6 +10668,10 @@ end --> if not window
|
||||
|
||||
_G.DetailsOptionsWindow18FontDropdown.MyObject:Select (_detalhes.font_faces.menus)
|
||||
|
||||
|
||||
_G.DetailsOptionsWindow18DisableStretchButtonSlider.MyObject:SetValue (_detalhes.disable_stretch_button)
|
||||
_G.DetailsOptionsWindow18DisableBarHighlightSlider.MyObject:SetValue (_detalhes.instances_disable_bar_highlight)
|
||||
|
||||
--> window 19
|
||||
_G.DetailsOptionsWindow19MinimapSlider.MyObject:SetValue (not _detalhes.minimap.hide)
|
||||
_G.DetailsOptionsWindow19MinimapActionDropdown.MyObject:Select (_detalhes.minimap.onclick_what_todo)
|
||||
|
||||
@@ -1847,7 +1847,9 @@ local barra_scripts_onenter = function (self)
|
||||
self:SetBackdrop (barra_backdrop_onenter)
|
||||
self:SetBackdropColor (0.588, 0.588, 0.588, 0.7)
|
||||
|
||||
self.textura:SetBlendMode ("ADD")
|
||||
if (not _detalhes.instances_disable_bar_highlight) then
|
||||
self.textura:SetBlendMode ("ADD")
|
||||
end
|
||||
|
||||
local lefttext = self.texto_esquerdo
|
||||
if (lefttext:IsTruncated()) then
|
||||
|
||||
@@ -1029,11 +1029,6 @@ local function cria_drop_down (este_gump)
|
||||
window:SetScript ("OnHide", function (self)
|
||||
_detalhes.janela_report.ativa = false
|
||||
_detalhes.last_report_id = nil
|
||||
|
||||
if (_detalhes.delay_CheckSwitchToCurrent) then
|
||||
_detalhes.delay_CheckSwitchToCurrent = nil
|
||||
_detalhes:CheckSwitchToCurrent()
|
||||
end
|
||||
end)
|
||||
|
||||
--> botão de fechar
|
||||
|
||||
Reference in New Issue
Block a user