Added option to add an overlay above the window lines
This commit is contained in:
@@ -154,7 +154,7 @@ _detalhes.instance_defaults = {
|
||||
--anchor store the anchor point of main menu
|
||||
menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position
|
||||
menu_anchor_down = {5, 1}, --mode segment attribute report on bottom position
|
||||
menu_icons_alpha = 0.5,
|
||||
menu_icons_alpha = 1,
|
||||
--blackwhiite icons
|
||||
desaturated_menu = false, --mode segment attribute report
|
||||
--icons on menu
|
||||
@@ -242,6 +242,9 @@ _detalhes.instance_defaults = {
|
||||
--bar texture name
|
||||
texture_file = [[Interface\AddOns\Details\images\bar4]],
|
||||
texture_custom_file = "Interface\\",
|
||||
--bar overlay texture file
|
||||
overlay_texture = "Details D'ictum",
|
||||
overlay_color = {.7, .7, .7, 0},
|
||||
--bar texture on mouse over
|
||||
texture_highlight = [[Interface\FriendsFrame\UI-FriendsList-Highlight]],
|
||||
--bar background texture
|
||||
|
||||
+140
-114
@@ -3469,19 +3469,47 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
-- main frames -----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> create the base frame, everything connect in this frame except the rows.
|
||||
local baseframe = CreateFrame ("scrollframe", "DetailsBaseFrame"..ID, _UIParent,"BackdropTemplate") --
|
||||
baseframe:SetMovable (true)
|
||||
baseframe:SetResizable (true)
|
||||
baseframe:SetUserPlaced (false)
|
||||
baseframe:SetDontSavePosition (true)
|
||||
|
||||
--baseframe is the lowest frame in the window architecture
|
||||
local baseframe = CreateFrame("scrollframe", "DetailsBaseFrame" .. ID, _UIParent, "BackdropTemplate")
|
||||
baseframe:SetMovable(true)
|
||||
baseframe:SetResizable(true)
|
||||
baseframe:SetUserPlaced(false)
|
||||
baseframe:SetDontSavePosition(true)
|
||||
baseframe:SetFrameStrata(baseframe_strata)
|
||||
baseframe:SetFrameLevel(2)
|
||||
baseframe.instance = instancia
|
||||
baseframe:SetFrameStrata (baseframe_strata)
|
||||
baseframe:SetFrameLevel (2)
|
||||
|
||||
--> background holds the wallpaper, alert strings ans textures, have setallpoints on baseframe
|
||||
--> backgrounddisplay is a scrollschild of backgroundframe
|
||||
local baseframeBorder = DetailsFramework:CreateFullBorder(baseframe:GetName() .. "BaseBorder", baseframe)
|
||||
baseframeBorder:SetBorderSizes(1, 1, 1, 1)
|
||||
baseframeBorder:UpdateSizes()
|
||||
baseframeBorder:SetVertexColor(0, 0, 0, 1)
|
||||
baseframe.border = baseframeBorder
|
||||
baseframe.border:Hide()
|
||||
|
||||
local titleBar = CreateFrame("frame", baseframe:GetName() .. "TitleBar", baseframe, "BackdropTemplate")
|
||||
titleBar:SetPoint("bottomleft", baseframe, "topleft", 0, 0)
|
||||
titleBar:SetPoint("bottomright", baseframe, "topright", 0, 0)
|
||||
titleBar:SetHeight(16)
|
||||
titleBar:EnableMouse(false)
|
||||
baseframe.titleBar = titleBar
|
||||
|
||||
--a background frame that anchors in the topleft of the title bar and bottom right of the baseframe
|
||||
--this frame does not attack to statusbar (yet)
|
||||
local fullWindowFrame = CreateFrame("frame", baseframe:GetName() .. "FullWindowFrame", baseframe, "BackdropTemplate")
|
||||
fullWindowFrame:EnableMouse(false)
|
||||
fullWindowFrame:SetPoint("topleft", titleBar, "topleft", 0, 0)
|
||||
fullWindowFrame:SetPoint("bottomright", baseframe, "bottomright", 0, 0)
|
||||
baseframe.fullWindowFrame = fullWindowFrame
|
||||
|
||||
local fullWindowBorder = DetailsFramework:CreateFullBorder(fullWindowFrame:GetName() .. "Border", fullWindowFrame)
|
||||
fullWindowBorder:SetBorderSizes(1, 1, 1, 1)
|
||||
fullWindowBorder:UpdateSizes()
|
||||
fullWindowBorder:SetVertexColor(0, 0, 0, 1)
|
||||
fullWindowFrame.border = fullWindowBorder
|
||||
fullWindowFrame.border:Hide()
|
||||
|
||||
--background holds the wallpaper, alert strings ans textures, have setallpoints on baseframe
|
||||
--backgrounddisplay is a scrollschild of backgroundframe, hence its children won't show outside its canvas
|
||||
local backgroundframe = CreateFrame ("scrollframe", "Details_WindowFrame"..ID, baseframe) --window frame
|
||||
local backgrounddisplay = CreateFrame ("frame", "Details_GumpFrame"..ID, backgroundframe,"BackdropTemplate") --gump frame
|
||||
backgroundframe:SetFrameLevel (3)
|
||||
@@ -3676,7 +3704,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
|
||||
|
||||
--> wallpaper
|
||||
baseframe.wallpaper = backgrounddisplay:CreateTexture (nil, "overlay")
|
||||
baseframe.wallpaper = baseframe:CreateTexture (nil, "overlay")
|
||||
baseframe.wallpaper:Hide()
|
||||
|
||||
--> alert frame
|
||||
@@ -4021,135 +4049,138 @@ function gump:CreateNewLine (instancia, index)
|
||||
local rowframe = instancia.rowframe
|
||||
|
||||
--> create the bar with rowframe as parent
|
||||
local new_row = CreateFrame ("button", "DetailsBarra_"..instancia.meu_id.."_"..index, rowframe,"BackdropTemplate")
|
||||
local newLine = CreateFrame ("button", "DetailsBarra_"..instancia.meu_id.."_"..index, rowframe,"BackdropTemplate")
|
||||
|
||||
new_row.row_id = index
|
||||
new_row.instance_id = instancia.meu_id
|
||||
new_row.animacao_fim = 0
|
||||
new_row.animacao_fim2 = 0
|
||||
newLine.row_id = index
|
||||
newLine.instance_id = instancia.meu_id
|
||||
newLine.animacao_fim = 0
|
||||
newLine.animacao_fim2 = 0
|
||||
|
||||
--> set point, almost irrelevant here, it recalc this on SetBarGrowDirection()
|
||||
local y = instancia.row_height * (index-1)
|
||||
if (instancia.bars_grow_direction == 1) then
|
||||
y = y*-1
|
||||
new_row:SetPoint ("topleft", baseframe, "topleft", instancia.row_info.space.left, y)
|
||||
newLine:SetPoint ("topleft", baseframe, "topleft", instancia.row_info.space.left, y)
|
||||
|
||||
elseif (instancia.bars_grow_direction == 2) then
|
||||
new_row:SetPoint ("bottomleft", baseframe, "bottomleft", instancia.row_info.space.left, y + 2)
|
||||
newLine:SetPoint ("bottomleft", baseframe, "bottomleft", instancia.row_info.space.left, y + 2)
|
||||
end
|
||||
|
||||
--> row height
|
||||
new_row:SetHeight (instancia.row_info.height)
|
||||
new_row:SetWidth (baseframe:GetWidth()+instancia.row_info.space.right)
|
||||
new_row:SetFrameLevel (baseframe:GetFrameLevel() + 4)
|
||||
new_row.last_value = 0
|
||||
new_row.w_mod = 0
|
||||
new_row:EnableMouse (true)
|
||||
new_row:RegisterForClicks ("LeftButtonDown", "RightButtonDown")
|
||||
newLine:SetHeight (instancia.row_info.height)
|
||||
newLine:SetWidth (baseframe:GetWidth()+instancia.row_info.space.right)
|
||||
newLine:SetFrameLevel (baseframe:GetFrameLevel() + 4)
|
||||
newLine.last_value = 0
|
||||
newLine.w_mod = 0
|
||||
newLine:EnableMouse (true)
|
||||
newLine:RegisterForClicks ("LeftButtonDown", "RightButtonDown")
|
||||
|
||||
--> statusbar
|
||||
new_row.statusbar = CreateFrame ("StatusBar", "DetailsBarra_Statusbar_"..instancia.meu_id.."_"..index, new_row)
|
||||
new_row.statusbar.value = 0
|
||||
newLine.statusbar = CreateFrame ("StatusBar", "DetailsBarra_Statusbar_"..instancia.meu_id.."_"..index, newLine)
|
||||
newLine.statusbar.value = 0
|
||||
--> right to left texture
|
||||
new_row.statusbar.right_to_left_texture = new_row.statusbar:CreateTexture (nil, "overlay")
|
||||
new_row.statusbar.right_to_left_texture:SetPoint ("topright", new_row.statusbar, "topright")
|
||||
new_row.statusbar.right_to_left_texture:SetPoint ("bottomright", new_row.statusbar, "bottomright")
|
||||
new_row.statusbar.right_to_left_texture:SetWidth (0.000000001)
|
||||
new_row.statusbar.right_to_left_texture:Hide()
|
||||
new_row.right_to_left_texture = new_row.statusbar.right_to_left_texture
|
||||
newLine.statusbar.right_to_left_texture = newLine.statusbar:CreateTexture (nil, "overlay")
|
||||
newLine.statusbar.right_to_left_texture:SetPoint ("topright", newLine.statusbar, "topright")
|
||||
newLine.statusbar.right_to_left_texture:SetPoint ("bottomright", newLine.statusbar, "bottomright")
|
||||
newLine.statusbar.right_to_left_texture:SetWidth (0.000000001)
|
||||
newLine.statusbar.right_to_left_texture:Hide()
|
||||
newLine.right_to_left_texture = newLine.statusbar.right_to_left_texture
|
||||
|
||||
--> frame for hold the backdrop border
|
||||
new_row.border = CreateFrame ("Frame", "DetailsBarra_Border_" .. instancia.meu_id .. "_" .. index, new_row.statusbar,"BackdropTemplate")
|
||||
new_row.border:SetFrameLevel (new_row.statusbar:GetFrameLevel()+2)
|
||||
new_row.border:SetAllPoints (new_row)
|
||||
newLine.border = CreateFrame ("Frame", "DetailsBarra_Border_" .. instancia.meu_id .. "_" .. index, newLine.statusbar,"BackdropTemplate")
|
||||
newLine.border:SetFrameLevel (newLine.statusbar:GetFrameLevel()+2)
|
||||
newLine.border:SetAllPoints (newLine)
|
||||
|
||||
--border
|
||||
local lineBorder
|
||||
if (DetailsFramework.IsTBCWow()) then
|
||||
lineBorder = DetailsFramework:CreateFullBorder(nil, new_row)
|
||||
--lineBorder = CreateFrame("frame", nil, new_row, "DFNamePlateFullBorderTemplate, BackdropTemplate")
|
||||
lineBorder = DetailsFramework:CreateFullBorder(nil, newLine)
|
||||
--lineBorder = CreateFrame("frame", nil, newLine, "DFNamePlateFullBorderTemplate, BackdropTemplate")
|
||||
else
|
||||
lineBorder = CreateFrame("frame", nil, new_row, "NamePlateFullBorderTemplate, BackdropTemplate")
|
||||
lineBorder = CreateFrame("frame", nil, newLine, "NamePlateFullBorderTemplate, BackdropTemplate")
|
||||
end
|
||||
new_row.lineBorder = lineBorder
|
||||
newLine.lineBorder = lineBorder
|
||||
|
||||
-- search key: ~model
|
||||
|
||||
--low 3d bar
|
||||
new_row.modelbox_low = CreateFrame ("playermodel", "DetailsBarra_ModelBarLow_" .. instancia.meu_id .. "_" .. index, new_row) --rowframe
|
||||
new_row.modelbox_low:SetFrameLevel (new_row.statusbar:GetFrameLevel()-1)
|
||||
new_row.modelbox_low:SetPoint ("topleft", new_row, "topleft")
|
||||
new_row.modelbox_low:SetPoint ("bottomright", new_row, "bottomright")
|
||||
newLine.modelbox_low = CreateFrame ("playermodel", "DetailsBarra_ModelBarLow_" .. instancia.meu_id .. "_" .. index, newLine) --rowframe
|
||||
newLine.modelbox_low:SetFrameLevel (newLine.statusbar:GetFrameLevel()-1)
|
||||
newLine.modelbox_low:SetPoint ("topleft", newLine, "topleft")
|
||||
newLine.modelbox_low:SetPoint ("bottomright", newLine, "bottomright")
|
||||
--high 3d bar
|
||||
new_row.modelbox_high = CreateFrame ("playermodel", "DetailsBarra_ModelBarHigh_" .. instancia.meu_id .. "_" .. index, new_row) --rowframe
|
||||
new_row.modelbox_high:SetFrameLevel (new_row.statusbar:GetFrameLevel()+1)
|
||||
new_row.modelbox_high:SetPoint ("topleft", new_row, "topleft")
|
||||
new_row.modelbox_high:SetPoint ("bottomright", new_row, "bottomright")
|
||||
newLine.modelbox_high = CreateFrame ("playermodel", "DetailsBarra_ModelBarHigh_" .. instancia.meu_id .. "_" .. index, newLine) --rowframe
|
||||
newLine.modelbox_high:SetFrameLevel (newLine.statusbar:GetFrameLevel()+1)
|
||||
newLine.modelbox_high:SetPoint ("topleft", newLine, "topleft")
|
||||
newLine.modelbox_high:SetPoint ("bottomright", newLine, "bottomright")
|
||||
|
||||
--> create textures and icons
|
||||
new_row.textura = new_row.statusbar:CreateTexture (nil, "artwork")
|
||||
new_row.textura:SetHorizTile (false)
|
||||
new_row.textura:SetVertTile (false)
|
||||
newLine.textura = newLine.statusbar:CreateTexture (nil, "artwork")
|
||||
newLine.textura:SetHorizTile (false)
|
||||
newLine.textura:SetVertTile (false)
|
||||
|
||||
--> row background texture
|
||||
new_row.background = new_row:CreateTexture (nil, "background")
|
||||
new_row.background:SetTexture()
|
||||
new_row.background:SetAllPoints (new_row)
|
||||
newLine.background = newLine:CreateTexture (nil, "background")
|
||||
newLine.background:SetTexture()
|
||||
newLine.background:SetAllPoints (newLine)
|
||||
|
||||
new_row.statusbar:SetStatusBarColor (0, 0, 0, 0)
|
||||
new_row.statusbar:SetStatusBarTexture (new_row.textura)
|
||||
new_row.statusbar:SetMinMaxValues (0, 100)
|
||||
new_row.statusbar:SetValue (0)
|
||||
newLine.statusbar:SetStatusBarColor (0, 0, 0, 0)
|
||||
newLine.statusbar:SetStatusBarTexture (newLine.textura)
|
||||
newLine.statusbar:SetMinMaxValues (0, 100)
|
||||
newLine.statusbar:SetValue (0)
|
||||
|
||||
newLine.overlayTexture = newLine.statusbar:CreateTexture (nil, "overlay")
|
||||
newLine.overlayTexture:SetAllPoints()
|
||||
|
||||
--> class icon
|
||||
local icone_classe = new_row.border:CreateTexture (nil, "overlay")
|
||||
local icone_classe = newLine.border:CreateTexture (nil, "overlay")
|
||||
icone_classe:SetHeight (instancia.row_info.height)
|
||||
icone_classe:SetWidth (instancia.row_info.height)
|
||||
icone_classe:SetTexture (instancia.row_info.icon_file)
|
||||
icone_classe:SetTexCoord (.75, 1, .75, 1)
|
||||
new_row.icone_classe = icone_classe
|
||||
newLine.icone_classe = icone_classe
|
||||
|
||||
local icon_frame = CreateFrame ("frame", "DetailsBarra_IconFrame_" .. instancia.meu_id .. "_" .. index, new_row.statusbar)
|
||||
local icon_frame = CreateFrame ("frame", "DetailsBarra_IconFrame_" .. instancia.meu_id .. "_" .. index, newLine.statusbar)
|
||||
icon_frame:SetPoint ("topleft", icone_classe, "topleft")
|
||||
icon_frame:SetPoint ("bottomright", icone_classe, "bottomright")
|
||||
icon_frame:SetFrameLevel (new_row.statusbar:GetFrameLevel()+1)
|
||||
icon_frame:SetFrameLevel (newLine.statusbar:GetFrameLevel()+1)
|
||||
icon_frame.instance_id = instancia.meu_id
|
||||
icon_frame.row = new_row
|
||||
new_row.icon_frame = icon_frame
|
||||
icon_frame.row = newLine
|
||||
newLine.icon_frame = icon_frame
|
||||
|
||||
icone_classe:SetPoint ("left", new_row, "left")
|
||||
new_row.statusbar:SetPoint ("topleft", icone_classe, "topright")
|
||||
new_row.statusbar:SetPoint ("bottomright", new_row, "bottomright")
|
||||
icone_classe:SetPoint ("left", newLine, "left")
|
||||
newLine.statusbar:SetPoint ("topleft", icone_classe, "topright")
|
||||
newLine.statusbar:SetPoint ("bottomright", newLine, "bottomright")
|
||||
|
||||
--> left text 1
|
||||
new_row.lineText1 = new_row.border:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
new_row.lineText1:SetPoint ("left", new_row.icone_classe, "right", 3, 0)
|
||||
new_row.lineText1:SetJustifyH ("left")
|
||||
new_row.lineText1:SetNonSpaceWrap (true)
|
||||
newLine.lineText1 = newLine.border:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
newLine.lineText1:SetPoint ("left", newLine.icone_classe, "right", 3, 0)
|
||||
newLine.lineText1:SetJustifyH ("left")
|
||||
newLine.lineText1:SetNonSpaceWrap (true)
|
||||
|
||||
--create text columns
|
||||
for i = 2, 4 do
|
||||
new_row ["lineText" .. i] = new_row.border:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
newLine ["lineText" .. i] = newLine.border:CreateFontString (nil, "overlay", "GameFontHighlight")
|
||||
end
|
||||
|
||||
--> set the onclick, on enter scripts
|
||||
barra_scripts (new_row, instancia, index)
|
||||
barra_scripts (newLine, instancia, index)
|
||||
|
||||
--> hide
|
||||
Details.FadeHandler.Fader (new_row, 1)
|
||||
Details.FadeHandler.Fader (newLine, 1)
|
||||
|
||||
--> adds the window container
|
||||
instancia.barras [index] = new_row
|
||||
instancia.barras [index] = newLine
|
||||
|
||||
--> set the left text
|
||||
new_row.lineText1:SetText (Loc ["STRING_NEWROW"])
|
||||
newLine.lineText1:SetText (Loc ["STRING_NEWROW"])
|
||||
|
||||
--> refresh rows
|
||||
instancia:InstanceRefreshRows()
|
||||
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_NEWROW", nil, instancia, new_row)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_NEWROW", nil, instancia, newLine)
|
||||
|
||||
return new_row
|
||||
return newLine
|
||||
end
|
||||
|
||||
function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass, rightcolorbyclass, leftoutline, rightoutline, customrighttextenabled, customrighttext, percentage_type, showposition, customlefttextenabled, customlefttext, smalloutline_left, smalloutlinecolor_left, smalloutline_right, smalloutlinecolor_right, translittext)
|
||||
@@ -4588,9 +4619,9 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
self.row_info.texture_background_file = texture_file2
|
||||
|
||||
if (type (self.row_info.texture_custom) == "string" and self.row_info.texture_custom ~= "") then
|
||||
texture_file = "Interface\\" .. self.row_info.texture_custom
|
||||
--> update texture file
|
||||
self.row_info.texture_custom_file = texture_file
|
||||
texture_file = [[Interface\]] .. self.row_info.texture_custom
|
||||
--update texture file
|
||||
self.row_info.texture_custom_file = texture_file
|
||||
end
|
||||
|
||||
--> outline values
|
||||
@@ -4649,6 +4680,9 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
|
||||
local upper_model_alpha = self.row_info.models.upper_alpha
|
||||
local lower_model_alpha = self.row_info.models.lower_alpha
|
||||
|
||||
local overlayTexture = SharedMedia:Fetch("statusbar", self.row_info.overlay_texture)
|
||||
local overlayColor = self.row_info.overlay_color
|
||||
|
||||
--using_upper_3dmodels using_lower_3dmodels
|
||||
|
||||
@@ -4800,6 +4834,8 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
row.textura:SetTexture (texture_file)
|
||||
row.right_to_left_texture:SetTexture (texture_file)
|
||||
row.background:SetTexture (texture_file2)
|
||||
row.overlayTexture:SetTexture(overlayTexture)
|
||||
row.overlayTexture:SetVertexColor(unpack(overlayColor))
|
||||
|
||||
if (is_mirror) then
|
||||
row.right_to_left_texture:Show()
|
||||
@@ -4880,6 +4916,17 @@ function _detalhes:InstanceRefreshRows (instancia)
|
||||
|
||||
end
|
||||
|
||||
function Details:SetBarOverlaySettings(overlayTexture, overlayColor)
|
||||
overlayTexture = overlayTexture or self.row_info.overlay_texture
|
||||
overlayColor = overlayColor or self.row_info.overlay_color
|
||||
self.row_info.overlay_texture = overlayTexture
|
||||
self.row_info.overlay_color[1] = overlayColor[1]
|
||||
self.row_info.overlay_color[2] = overlayColor[2]
|
||||
self.row_info.overlay_color[3] = overlayColor[3]
|
||||
self.row_info.overlay_color[4] = overlayColor[4]
|
||||
self:InstanceRefreshRows()
|
||||
end
|
||||
|
||||
-- search key: ~wallpaper
|
||||
function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, height, overlay)
|
||||
|
||||
@@ -4950,6 +4997,9 @@ function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, h
|
||||
if (anchor == "all") then
|
||||
t:SetPoint ("topleft", self.baseframe, "topleft")
|
||||
t:SetPoint ("bottomright", self.baseframe, "bottomright")
|
||||
elseif (anchor == "titlebar") then
|
||||
t:SetPoint ("topleft", self.baseframe.titleBar, "topleft", 0, 0)
|
||||
t:SetPoint ("bottomright", self.baseframe, "bottomright", 1, -1)
|
||||
elseif (anchor == "center") then
|
||||
t:SetPoint ("center", self.baseframe, "center", 0, 4)
|
||||
elseif (anchor == "stretchLR") then
|
||||
@@ -5123,6 +5173,7 @@ function _detalhes:SetWindowAlphaForCombat (entering_in_combat, true_hide, alpha
|
||||
|
||||
end
|
||||
|
||||
--this function is called only from SetAutoHideMenu()
|
||||
function _detalhes:InstanceButtonsColors (red, green, blue, alpha, no_save, only_left, only_right)
|
||||
|
||||
if (not red) then
|
||||
@@ -5470,21 +5521,19 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations)
|
||||
|
||||
if (alpha == 1) then
|
||||
alpha = self.menu_icons_alpha
|
||||
if (DetailsFramework:IsNearlyEqual(self.menu_icons_alpha, 0.5)) then --fix for old instances using 0.5 in the 'menu_icons_alpha'
|
||||
self.menu_icons_alpha = Details.skins[self.skin].instance_cprops.menu_icons_alpha or self.menu_icons_alpha
|
||||
alpha = self.menu_icons_alpha
|
||||
end
|
||||
end
|
||||
|
||||
for index, button in _ipairs (SetIconAlphaCacheButtonsTable) do
|
||||
if (self.menu_icons [index]) then
|
||||
if (hide) then
|
||||
--Details.FadeHandler.Fader (button, _unpack (_detalhes.windows_fade_in))
|
||||
button:Hide()
|
||||
else
|
||||
button:Show()
|
||||
button:SetAlpha(alpha)
|
||||
--if (no_animations) then
|
||||
-- button:SetAlpha (alpha)
|
||||
--else
|
||||
-- Details.FadeHandler.Fader (button, "ALPHAANIM", alpha)
|
||||
--end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -7878,16 +7927,12 @@ function _detalhes:SetAutoHideMenu (left, right, interacting)
|
||||
if (self.is_interacting) then
|
||||
if (self.auto_hide_menu.left) then
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, true) --no save, only left
|
||||
self:InstanceButtonsColors (r, g, b, self.menu_icons_alpha, true, true) --no save, only left
|
||||
|
||||
if (self.baseframe.cabecalho.PluginIconsSeparator) then
|
||||
self.baseframe.cabecalho.PluginIconsSeparator:Show()
|
||||
end
|
||||
end
|
||||
-- if (self.auto_hide_menu.right) then
|
||||
-- local r, g, b = unpack (self.color_buttons)
|
||||
-- self:InstanceButtonsColors (r, g, b, 1, true, nil, true) --no save, only right
|
||||
-- end
|
||||
else
|
||||
if (self.auto_hide_menu.left) then
|
||||
local r, g, b = unpack (self.color_buttons)
|
||||
@@ -7897,10 +7942,6 @@ function _detalhes:SetAutoHideMenu (left, right, interacting)
|
||||
self.baseframe.cabecalho.PluginIconsSeparator:Hide()
|
||||
end
|
||||
end
|
||||
-- if (self.auto_hide_menu.right) then
|
||||
-- local r, g, b = unpack (self.color_buttons)
|
||||
-- self:InstanceButtonsColors (r, g, b, 0, true, nil, true) --no save, only right
|
||||
-- end
|
||||
end
|
||||
return
|
||||
end
|
||||
@@ -7919,14 +7960,14 @@ function _detalhes:SetAutoHideMenu (left, right, interacting)
|
||||
|
||||
if (not left) then
|
||||
--auto hide is off
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, true) --no save, only left
|
||||
self:InstanceButtonsColors (r, g, b, self.menu_icons_alpha, true, true) --no save, only left
|
||||
|
||||
if (self.baseframe.cabecalho.PluginIconsSeparator) then
|
||||
self.baseframe.cabecalho.PluginIconsSeparator:Show()
|
||||
end
|
||||
else
|
||||
if (self.is_interacting) then
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, true) --no save, only left
|
||||
self:InstanceButtonsColors (r, g, b, self.menu_icons_alpha, true, true) --no save, only left
|
||||
|
||||
if (self.baseframe.cabecalho.PluginIconsSeparator) then
|
||||
self.baseframe.cabecalho.PluginIconsSeparator:Show()
|
||||
@@ -7940,22 +7981,7 @@ function _detalhes:SetAutoHideMenu (left, right, interacting)
|
||||
end
|
||||
end
|
||||
|
||||
--[=[
|
||||
if (not right) then
|
||||
--auto hide is off
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, nil, true) --no save, only right
|
||||
else
|
||||
if (self.is_interacting) then
|
||||
self:InstanceButtonsColors (r, g, b, 1, true, nil, true) --no save, only right
|
||||
else
|
||||
self:InstanceButtonsColors (0, 0, 0, 0, true, nil, true) --no save, only right
|
||||
end
|
||||
end
|
||||
--]=]
|
||||
|
||||
self:RefreshAttributeTextSize()
|
||||
--auto_hide_menu = {left = false, right = false},
|
||||
|
||||
end
|
||||
|
||||
-- transparency for toolbar, borders and statusbar
|
||||
|
||||
@@ -1152,6 +1152,20 @@ do
|
||||
afterUpdate()
|
||||
end
|
||||
|
||||
local onSelectBarTextureOverlay = function(_, instance, textureName)
|
||||
editInstanceSetting(currentInstance, "SetBarOverlaySettings", textureName)
|
||||
end
|
||||
|
||||
local buildTextureOverlayMenu = function()
|
||||
local textures2 = SharedMedia:HashTable("statusbar")
|
||||
local texTable2 = {}
|
||||
for name, texturePath in pairs (textures2) do
|
||||
texTable2[#texTable2+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectBarTextureOverlay, icon = texture_icon, texcoord = texture_texcoord}
|
||||
end
|
||||
table.sort(texTable2, function (t1, t2) return t1.label < t2.label end)
|
||||
return texTable2
|
||||
end
|
||||
|
||||
local iconsize = {16, 16}
|
||||
local icontexture = [[Interface\WorldStateFrame\ICONS-CLASSES]]
|
||||
local iconcoords = {0.25, 0.50, 0, 0.25}
|
||||
@@ -1283,7 +1297,7 @@ do
|
||||
afterUpdate()
|
||||
end,
|
||||
name = Loc ["STRING_OPTIONS_BARS_CUSTOM_TEXTURE"],
|
||||
desc = Loc ["STRING_OPTIONS_BARS_CUSTOM_TEXTURE_DESC"],
|
||||
desc = Loc ["STRING_CUSTOM_TEXTURE_GUIDE"]
|
||||
},
|
||||
|
||||
{--remove custom texture
|
||||
@@ -1314,7 +1328,7 @@ do
|
||||
desc = Loc ["STRING_OPTIONS_BAR_COLOR_DESC"],
|
||||
},
|
||||
|
||||
{--use class colors
|
||||
{--color by player class
|
||||
type = "toggle",
|
||||
get = function() return currentInstance.row_info.texture_class_colors end,
|
||||
set = function (self, fixedparam, value)
|
||||
@@ -1325,6 +1339,32 @@ do
|
||||
desc = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"],
|
||||
},
|
||||
|
||||
{type = "blank"},
|
||||
{type = "label", get = function() return "Overlay:" end, text_template = subSectionTitleTextTemplate},
|
||||
{--overlay texture
|
||||
type = "select",
|
||||
get = function() return currentInstance.row_info.overlay_texture end,
|
||||
values = function()
|
||||
return buildTextureOverlayMenu()
|
||||
end,
|
||||
name = Loc ["STRING_TEXTURE"],
|
||||
desc = "Texture which sits above the bar",
|
||||
},
|
||||
|
||||
{--overlay color
|
||||
type = "color",
|
||||
get = function()
|
||||
local r, g, b, a = unpack(currentInstance.row_info.overlay_color)
|
||||
return {r, g, b, a}
|
||||
end,
|
||||
set = function (self, r, g, b, a)
|
||||
editInstanceSetting(currentInstance, "SetBarOverlaySettings", nil, {r, g, b, a})
|
||||
afterUpdate()
|
||||
end,
|
||||
name = Loc ["STRING_COLOR"],
|
||||
desc = Loc ["STRING_COLOR"],
|
||||
},
|
||||
|
||||
{type = "blank"},
|
||||
{type = "label", get = function() return Loc ["STRING_OPTIONS_TEXT_TEXTUREL_ANCHOR"] end, text_template = subSectionTitleTextTemplate},
|
||||
|
||||
@@ -1364,7 +1404,7 @@ do
|
||||
desc = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"],
|
||||
},
|
||||
|
||||
{type = "blank"},
|
||||
{type = "breakline"},
|
||||
{type = "label", get = function() return "Arena Team Color" end, text_template = subSectionTitleTextTemplate},
|
||||
{--team 1 color
|
||||
type = "color",
|
||||
@@ -1397,7 +1437,7 @@ do
|
||||
desc = "Arena team color",
|
||||
},
|
||||
|
||||
{type = "breakline"},
|
||||
{type = "blank"},
|
||||
{type = "label", get = function() return Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"] end, text_template = subSectionTitleTextTemplate},
|
||||
|
||||
{--select icon file
|
||||
@@ -1442,8 +1482,8 @@ do
|
||||
Details.options.SetCurrentInstanceAndRefresh(currentInstance)
|
||||
afterUpdate()
|
||||
end,
|
||||
name = "Enter the path for a custom icon file",
|
||||
desc = "Enter the path for a custom icon file",
|
||||
name = Loc ["STRING_OPTIONS_BARS_CUSTOM_TEXTURE"],
|
||||
desc = Loc ["STRING_CUSTOM_TEXTURE_GUIDE"],
|
||||
},
|
||||
|
||||
{--bar start at
|
||||
@@ -4457,6 +4497,7 @@ do
|
||||
|
||||
local anchorMenu = {
|
||||
{value = "all", label = "Fill", onclick = onSelectAnchor},
|
||||
{value = "titlebar", label = "Full Body", onclick = onSelectAnchor},
|
||||
{value = "center", label = "Center", onclick = onSelectAnchor},
|
||||
{value = "stretchLR", label = "Stretch Left-Right", onclick = onSelectAnchor},
|
||||
{value = "stretchTB", label = "Stretch Top-Bottom", onclick = onSelectAnchor},
|
||||
|
||||
+22
-7
@@ -6,13 +6,17 @@ local _
|
||||
--> install skin function:
|
||||
function _detalhes:InstallSkin (skin_name, skin_table)
|
||||
if (not skin_name) then
|
||||
return false -- skin without a name
|
||||
elseif (_detalhes.skins [skin_name]) then
|
||||
return false -- skin with this name already exists
|
||||
return false
|
||||
|
||||
--already installed?
|
||||
elseif (_detalhes.skins[skin_name]) then
|
||||
if (skin_table.is_cached_skin) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (not skin_table.file) then
|
||||
return false -- no skin file
|
||||
return false
|
||||
end
|
||||
|
||||
if (not skin_table.no_cache) then
|
||||
@@ -20,7 +24,8 @@ local _
|
||||
--This way the skin original table is saved within the addon and can work even if the other addon is outdated or disabled
|
||||
if (Details.IsLoaded()) then
|
||||
Details.installed_skins_cache[skin_name] = skin_table
|
||||
print("Skin added to the skin cache", skin_name)
|
||||
skin_table.is_cached_skin = true
|
||||
skin_table.no_cache = true
|
||||
else
|
||||
Details:Msg("cannot install a skin without 'skin.no_cache' before 'Details.IsLoaded()' is true.")
|
||||
end
|
||||
@@ -33,7 +38,7 @@ local _
|
||||
|
||||
_detalhes.skins [skin_name] = skin_table
|
||||
|
||||
--checck instances waiting for a skin
|
||||
--check instances waiting for a skin
|
||||
local waitingForSkins = Details.waitingForSkins
|
||||
if (waitingForSkins) then
|
||||
for instanceId, skinName in pairs(waitingForSkins) do
|
||||
@@ -95,6 +100,7 @@ local _
|
||||
micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_THREAT"},
|
||||
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["menu_icons_size"] = 0.85,
|
||||
["color"] = {
|
||||
1, -- [1]
|
||||
@@ -338,6 +344,7 @@ local _
|
||||
|
||||
--overwrites
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["menu_icons_size"] = 0.850000023841858,
|
||||
["color"] = {
|
||||
0.0705882352941177, -- [1]
|
||||
@@ -563,6 +570,7 @@ local _
|
||||
|
||||
--overwrites
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["color"] = {
|
||||
0.3058, -- [1]
|
||||
0.3058, -- [2]
|
||||
@@ -785,6 +793,7 @@ local _
|
||||
icon_titletext_position = {1, 2},
|
||||
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["show_statusbar"] = false,
|
||||
["menu_icons_size"] = 0.80,
|
||||
["color"] = {
|
||||
@@ -1111,6 +1120,7 @@ local _
|
||||
--[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]]
|
||||
--[[ for the complete cprop list see the file classe_instancia_include.lua]]
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["hide_in_combat_type"] = 1,
|
||||
["color"] = {
|
||||
0,
|
||||
@@ -1374,6 +1384,7 @@ local _
|
||||
icon_titletext_position = {2, 5},
|
||||
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["menu_icons_size"] = 0.899999976158142,
|
||||
["color"] = {
|
||||
1, -- [1]
|
||||
@@ -1624,6 +1635,7 @@ local _
|
||||
icon_titletext_position = {2, 5},
|
||||
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["show_statusbar"] = false,
|
||||
["color"] = {1,1,1,1},
|
||||
["menu_anchor"] = {17, 2, ["side"] = 2},
|
||||
@@ -1811,6 +1823,7 @@ local _
|
||||
icon_titletext_position = {1, 2},
|
||||
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["hide_in_combat_type"] = 1,
|
||||
["fontstrings_text3_anchor"] = 37,
|
||||
["menu_anchor"] = {
|
||||
@@ -2281,6 +2294,7 @@ local _
|
||||
|
||||
--overwrites
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["show_statusbar"] = false,
|
||||
["menu_icons_size"] = 0.850000023841858,
|
||||
["color"] = {
|
||||
@@ -2540,6 +2554,7 @@ local _
|
||||
|
||||
--overwrites
|
||||
instance_cprops = {
|
||||
menu_icons_alpha = 0.92,
|
||||
["show_statusbar"] = false,
|
||||
["menu_icons_size"] = 0.850000023841858,
|
||||
["color"] = {
|
||||
|
||||
Reference in New Issue
Block a user