- Changed few icons on damage done tooltip.

- Fixed the class color on texts for healing attribute.
- Added options for change the tooltip border's size, color and texture.
- Added buttons for test interrupt and cooldown announcers under raid tools section.

- New API: _detalhes:SetTooltipBackdrop (border_texture, border_size, border_color) set tooltip border configs.
This commit is contained in:
tercio
2014-09-10 22:55:34 -03:00
parent 556d5549dc
commit 714daf6a99
12 changed files with 296 additions and 45 deletions
+22 -5
View File
File diff suppressed because one or more lines are too long
+6 -4
View File
@@ -1484,7 +1484,6 @@ end
end
--icon
if (self.spellicon) then
esta_barra.icone_classe:SetTexture (self.spellicon)
esta_barra.icone_classe:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875)
@@ -1534,7 +1533,6 @@ end
end
--texture and text
local bar_number = ""
if (instancia.row_info.textL_show_number) then
bar_number = esta_barra.colocacao .. ". "
@@ -1688,7 +1686,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
--> MOSTRA HABILIDADES
_detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #ActorSkillsSortTable)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
--GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
GameCooltip:AddIcon (_detalhes.tooltip_spell_icon.file, 1, 1, 14, 14, unpack (_detalhes.tooltip_spell_icon.coords))
if (is_maximized) then
--highlight shift key
@@ -1742,7 +1741,10 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
for i = 1, _math_min (max_targets, #ActorTargetsSortTable) do
local este_inimigo = ActorTargetsSortTable [i]
GameCooltip:AddLine (este_inimigo[1]..": ", FormatTooltipNumber (_, este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
--GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
--GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-StateIcon]], nil, nil, 14, 14, 33/64, 61/64, 31/64, 60/64)
--GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], nil, nil, 14, 14, 0, 1, 0, 15/16)
GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-StatIcons]], nil, nil, 12, 12, 0, 0.5, 0, 0.5, {.7, .7, .7, 1}, nil, true)
_detalhes:AddTooltipBackgroundStatusbar()
end
end
+7 -5
View File
@@ -1,8 +1,3 @@
--[[ Esta classe irá abrigar todo a cura de uma habilidade
Parents:
addon -> combate atual -> cura -> container de jogadores -> esta classe
]]
--lua locals
local _cstr = string.format
@@ -836,6 +831,13 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize)
end
end
if (instancia.row_info.textL_class_colors) then
esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
if (instancia.row_info.textR_class_colors) then
esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b)
end
esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15)
end
+4 -1
View File
@@ -15,6 +15,7 @@
--> local pointers
local _math_floor = math.floor --lua local
local _math_max = math.max --lua local
local _ipairs = ipairs --lua local
local _pairs = pairs --lua local
local _table_wipe = table.wipe --lua local
@@ -974,8 +975,10 @@
GameCooltip:SetOption ("LeftBorderSize", -5)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("MinWidth", 180)
GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.8))
GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) --[[Interface\Addons\Details\images\bar_flat]]
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
local myPoint = _detalhes.tooltip.anchor_point
local anchorPoint = _detalhes.tooltip.anchor_relative
+3
View File
@@ -257,6 +257,9 @@
elseif (channel == "WHISPER") then
SendChatMessage (msg, channel, nil, towho)
elseif (channel == "PRINT") then
print (msg)
else
SendChatMessage (msg, channel)
+47 -5
View File
@@ -717,6 +717,8 @@ function DetailsCreateCoolTip()
else
menuButton.leftIcon:SetBlendMode ("BLEND")
end
menuButton.leftIcon:SetDesaturated (leftIconTable [9])
else
menuButton.leftIcon:SetTexture (nil)
menuButton.leftIcon:SetWidth (3)
@@ -738,6 +740,8 @@ function DetailsCreateCoolTip()
else
menuButton.rightIcon:SetBlendMode ("BLEND")
end
menuButton.rightIcon:SetDesaturated (rightIconTable [9])
else
menuButton.rightIcon:SetTexture (nil)
menuButton.rightIcon:SetWidth (1)
@@ -1703,6 +1707,13 @@ function DetailsCreateCoolTip()
----------------------------------------------------------------------
--> Reset cooltip
local default_backdrop = {bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile=[[Interface\Tooltips\UI-Tooltip-Border]], tile=true,
edgeSize=16, tileSize=16, insets = {left=3, right=3, top=4, bottom=4}}
local default_backdrop_color = {0.09019, 0.09019, 0.18823, 1}
local default_backdropborder_color = {1, 1, 1, 1}
--borda preta sem usar unpack
--> wipe all data ~reset
function CoolTip:Reset()
@@ -1724,9 +1735,15 @@ function DetailsCreateCoolTip()
CoolTip.overlap_checked = false
CoolTip.frame2_leftside = nil
frame1:SetBackdrop (default_backdrop)
frame1:SetBackdropColor (unpack (default_backdrop_color))
frame1:SetBackdropBorderColor (unpack (default_backdropborder_color))
-->
frame2:SetBackdrop (default_backdrop)
frame2:SetBackdropColor (unpack (default_backdrop_color))
frame2:SetBackdropBorderColor (unpack (default_backdropborder_color))
--[
_table_wipe (CoolTip.LeftTextTable)
_table_wipe (CoolTip.LeftTextTableSub)
@@ -2124,6 +2141,29 @@ function DetailsCreateCoolTip()
fontstring:Show()
end
function CoolTip:SetBackdrop (index, backdrop, backdropcolor, bordercolor)
local f
if (index == 1) then
f = frame1
elseif (index == 2) then
f = frame2
end
if (backdrop) then
f:SetBackdrop (backdrop)
end
if (backdropcolor) then
local r, g, b, a = gump:ParseColors (backdropcolor)
f:SetBackdropColor (r, g, b, a)
end
if (bordercolor) then
local r, g, b, a = gump:ParseColors (bordercolor)
f:SetBackdropBorderColor (r, g, b, a)
end
end
function CoolTip:SetBannerImage (index, texturepath, width, height, anchor, texcoord, overlay)
local texture
@@ -2177,10 +2217,10 @@ function DetailsCreateCoolTip()
--> parameters: icon [, width [, height [, TexCoords L R T B ]]]
--> texture support string path or texture object
function CoolTip:AddTexture (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point)
return CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point)
function CoolTip:AddTexture (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point, desaturated)
return CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point, desaturated)
end
function CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point)
function CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point, desaturated)
--> need a previous line
if (CoolTip.Indexes == 0) then
@@ -2235,6 +2275,7 @@ function DetailsCreateCoolTip()
CoolTip.TopIconTableSub [CoolTip.Indexes] [6] = T or 0
CoolTip.TopIconTableSub [CoolTip.Indexes] [7] = B or 1
CoolTip.TopIconTableSub [CoolTip.Indexes] [8] = overlayColor or _default_color
CoolTip.TopIconTableSub [CoolTip.Indexes] [9] = desaturated
return
end
@@ -2267,6 +2308,7 @@ function DetailsCreateCoolTip()
iconTable [6] = T or 0 --> default 0
iconTable [7] = B or 1 --> default 1
iconTable [8] = overlayColor or _default_color --> default 1, 1, 1
iconTable [9] = desaturated
return true
end
+13
View File
@@ -208,6 +208,19 @@ function gump:BuildMenu (parent, menu, x_offset, y_offset, height)
if (size > max_x) then
max_x = size
end
elseif (widget_table.type == "execute" or widget_table.type == "button") then
local button = self:NewButton (parent, nil, "$parentWidget", nil, 120, 18, widget_table.func, widget_table.param1, widget_table.param2, nil, widget_table.name)
button:InstallCustomTexture()
button:SetPoint (cur_x, cur_y)
button.tooltip = widget_table.desc
local size = button:GetWidth() + 4
if (size > max_x) then
max_x = size
end
end
cur_y = cur_y - 20
+7
View File
@@ -423,6 +423,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
_detalhes.opened_windows = _detalhes.opened_windows + 1
end
end
--> update tooltip settings
_detalhes:SetTooltipBackdrop()
--> end
@@ -794,6 +797,10 @@ local default_profile = {
anchor_point = "bottom",
anchor_relative = "top",
anchor_offset = {0, 0},
border_texture = "Blizzard Tooltip",
border_color = {1, 1, 1, 1},
border_size = 16,
},
}
+34 -5
View File
@@ -32,7 +32,12 @@ local _
function _detalhes:GetSkin (skin_name)
return _detalhes.skins [skin_name]
end
local reset_tooltip = function()
_detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {1, 1, 1, 1})
_detalhes:DelayOptionsRefresh()
end
--> install default skins:
_detalhes:InstallSkin ("Default Skin", {
file = [[Interface\AddOns\Details\images\skins\default_skin]],
@@ -98,8 +103,11 @@ local _
},
--close button
closebutton_config = {size = {32, 32}},
}
},
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
}
})
_detalhes:InstallSkin ("Minimalistic", {
@@ -160,6 +168,10 @@ local _
--none
end,
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
}
})
_detalhes:InstallSkin ("Minimalistic v2", {
@@ -222,6 +234,10 @@ local _
--none
end,
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
}
})
_detalhes:InstallSkin ("Flat Color", {
@@ -281,6 +297,10 @@ local _
show_statusbar = false,
color = {1, 1, 1, 0.92},
bg_alpha = 0.40,
},
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
}
})
@@ -359,6 +379,10 @@ local _
alpha = 0.4980392451398075,
texture = "Interface\\Glues\\CREDITS\\Fellwood5",
},
},
skin_options = {
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]},
}
})
@@ -544,7 +568,10 @@ local _
end
local set_tooltip_elvui = function()
_detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {0, 0, 0, 1})
_detalhes:DelayOptionsRefresh()
end
_detalhes:InstallSkin ("ElvUI Frame Style", {
file = [[Interface\AddOns\Details\images\skins\elvui]],
@@ -639,7 +666,8 @@ local _
},
skin_options = {
{type = "button", label = "", text = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]}
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]},
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2"], func = set_tooltip_elvui, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2_DESC"]},
}
})
@@ -784,7 +812,8 @@ local _
},
skin_options = {
{type = "button", label = "", text = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]}
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]},
{type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2"], func = set_tooltip_elvui, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2_DESC"]},
}
})
+110 -16
View File
@@ -1118,6 +1118,60 @@ function window:CreateFrame20()
window:CreateLineBackground2 (frame20, "TooltipShowAmountSlider", "TooltipShowAmountLabel", Loc ["STRING_OPTIONS_TOOLTIPS_SHOWAMT_DESC"])
--> border
--border anchor
g:NewLabel (frame20, _, "$parentTooltipsBorderAnchor", "TooltipsBorderAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_BORDER"], "GameFontNormal")
--border texture
local onSelectTextureBackdrop = function (_, _, textureName)
_detalhes:SetTooltipBackdrop (textureName)
end
local iconsize = {16, 16}
local buildTextureBackdropMenu = function()
local textures2 = SharedMedia:HashTable ("border")
local texTable2 = {}
for name, texturePath in pairs (textures2) do
texTable2 [#texTable2+1] = {value = name, label = name, onclick = onSelectTextureBackdrop, icon = [[Interface\DialogFrame\UI-DialogBox-Corner]], texcoord = {0.09375, 1, 0, 0.78}, iconsize = iconsize}
end
table.sort (texTable2, function (t1, t2) return t1.label < t2.label end)
return texTable2
end
g:NewLabel (frame20, _, "$parentBackdropBorderTextureLabel", "BackdropBorderTextureLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_TEXTURE"], "GameFontHighlightLeft")
local d = g:NewDropDown (frame20, _, "$parentBackdropBorderTextureDropdown", "BackdropBorderTextureDropdown", DROPDOWN_WIDTH, 20, buildTextureBackdropMenu, _detalhes.tooltip.border_texture)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
frame20.BackdropBorderTextureDropdown:SetPoint ("left", frame20.BackdropBorderTextureLabel, "right", 2)
window:CreateLineBackground2 (frame20, "BackdropBorderTextureDropdown", "BackdropBorderTextureLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_TEXTURE_DESC"])
--border size
g:NewLabel (frame20, _, "$parentBackdropSizeLabel", "BackdropSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_SIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame20, _, "$parentBackdropSizeHeight", "BackdropSizeSlider", SLIDER_WIDTH, 20, 1, 32, 1, _detalhes.tooltip.border_size)
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
frame20.BackdropSizeSlider:SetPoint ("left", frame20.BackdropSizeLabel, "right", 2)
frame20.BackdropSizeSlider:SetThumbSize (50)
frame20.BackdropSizeSlider:SetHook ("OnValueChange", function (_, _, amount)
_detalhes:SetTooltipBackdrop (nil, amount)
end)
window:CreateLineBackground2 (frame20, "BackdropSizeSlider", "BackdropSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_SIZE_DESC"])
--border color
local backdropcolor_callback = function (button, r, g, b, a)
_detalhes:SetTooltipBackdrop (nil, nil, {r, g, b, a})
end
g:NewColorPickButton (frame20, "$parentBackdropColorPick", "BackdropColorPick", backdropcolor_callback)
g:NewLabel (frame20, _, "$parentBackdropColorLabel", "BackdropColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_COLOR"], "GameFontHighlightLeft")
frame20.BackdropColorPick:SetPoint ("left", frame20.BackdropColorLabel, "right", 2, 0)
local background = window:CreateLineBackground2 (frame20, "BackdropColorPick", "BackdropColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_COLOR_DESC"])
--> tooltip anchors
--unlock screen anchor
@@ -1283,7 +1337,10 @@ function window:CreateFrame20()
{"TooltipdpsAbbreviateLabel", 8},
{"TooltipMaximizeLabel", 9},
{"TooltipShowAmountLabel", 10},
{"TooltipsBorderAnchorLabel", 11, true},
{"BackdropBorderTextureLabel", 12},
{"BackdropSizeLabel", 13},
{"BackdropColorLabel", 14},
}
window:arrange_menu (frame20, left_side, x, -90)
@@ -4289,7 +4346,7 @@ function window:CreateFrame3()
--> extra Options
g:NewLabel (frame3, _, "$parentSkinExtraOptionsAnchor", "SkinExtraOptionsAnchor", Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"], "GameFontNormal")
frame3.SkinExtraOptionsAnchor:Hide()
--frame3.SkinExtraOptionsAnchor:Hide()
frame3.SkinExtraOptionsAnchor:SetPoint (window.right_start_at, -90)
frame3.ExtraOptions = {}
@@ -7066,6 +7123,22 @@ function window:CreateFrame11()
reset_custom:GetNormalTexture():SetDesaturated (true)
reset_custom.tooltip = "Reset to Default"
local test_custom_text = g:NewButton (frame11.InterruptsCustomEntry, _, "$parentTestCustomPhraseButton", "TestCustomPhraseButton", 16, 16, function()
local text = frame11.InterruptsCustomEntry.text
local channel = _detalhes.announce_interrupts.channel
_detalhes.announce_interrupts.channel = "PRINT"
_detalhes:interrupt_announcer (nil, nil, nil, _detalhes.playername, nil, nil, "A Monster", nil, 1766, "Kick", nil, 106523, "Cataclysm", nil)
_detalhes.announce_interrupts.channel = channel
end)
test_custom_text:SetPoint ("left", reset_custom, "right", 0, 0)
test_custom_text:SetNormalTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]])
test_custom_text:SetHighlightTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]])
test_custom_text:SetPushedTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]])
test_custom_text:GetNormalTexture():SetDesaturated (true)
test_custom_text.tooltip = "Click to test!"
--cooldowns
g:NewLabel (frame11, _, "$parentEnableCooldownsLabel", "EnableCooldownsLabel", Loc ["STRING_OPTIONS_RT_COOLDOWNS_ONOFF"], "GameFontHighlightLeft")
@@ -7128,6 +7201,22 @@ function window:CreateFrame11()
reset_custom:SetPushedTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Up]])
reset_custom:GetNormalTexture():SetDesaturated (true)
reset_custom.tooltip = "Reset to Default"
local test_custom_text = g:NewButton (frame11.CooldownCustomEntry, _, "$parentTestCustomPhraseButton", "TestCustomPhraseButton", 16, 16, function()
local text = frame11.CooldownCustomEntry.text
local channel = _detalhes.announce_cooldowns.channel
_detalhes.announce_cooldowns.channel = "PRINT"
_detalhes:cooldown_announcer (nil, nil, nil, _detalhes.playername, nil, nil, "Tyrande Whisperwind", nil, 47788, "Guardian Spirit")
_detalhes.announce_cooldowns.channel = channel
end)
test_custom_text:SetPoint ("left", reset_custom, "right", 0, 0)
test_custom_text:SetNormalTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]])
test_custom_text:SetHighlightTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]])
test_custom_text:SetPushedTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]])
test_custom_text:GetNormalTexture():SetDesaturated (true)
test_custom_text.tooltip = "Click to test!"
--esquema para ativar ou desativar certos cooldowns
--botão que abre um gump estilo welcome, com as spells pegas na lista de cooldowns
@@ -7225,7 +7314,7 @@ function window:CreateFrame11()
end
DetailsAnnounceSelectCooldownIgnored:Open()
end, nil, nil, nil, Loc ["STRING_OPTIONS_RT_COOLDOWNS_SELECT"], 1)
frame11.CooldownIgnoreButton:InstallCustomTexture()
@@ -7252,7 +7341,7 @@ function window:CreateFrame11()
--slider para quantidade de danos a mostrar
g:NewLabel (frame11, _, "$parentDeathsDamageLabel", "DeathsDamageLabel", Loc ["STRING_OPTIONS_RT_DEATHS_HITS"], "GameFontHighlightLeft")
local s = g:NewSlider (frame11, _, "$parentDeathsDamageSlider", "DeathsDamageSlider", SLIDER_WIDTH, 20, 1, 3, 1, _detalhes.announce_deaths.last_hits)
local s = g:NewSlider (frame11, _, "$parentDeathsDamageSlider", "DeathsDamageSlider", SLIDER_WIDTH, 20, 1, 5, 1, _detalhes.announce_deaths.last_hits)
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
@@ -7779,14 +7868,23 @@ function window:update_all (editing_instance)
t[2]:Hide()
end
end
frame3.SkinExtraOptionsAnchor:Hide()
for _, frame in pairs (frame3.ExtraOptions) do
frame:Hide()
end
--> create or show options if necessary
if (skin_object.skin_options and not skin_object.options_created) then
skin_object.options_created = true
frame3.ExtraOptions [skin_name_formated] = {}
local f = CreateFrame ("frame", "DetailsSkinOptions" .. skin_name_formated, frame3)
frame3.ExtraOptions [skin_name_formated] = f
f:SetPoint ("topleft", frame3, "topleft", window.right_start_at, window.top_start_at + (25 * -1))
f:SetSize (250, 400)
g:BuildMenu (f, skin_object.skin_options, 0, 0, 400)
--[[
for index, widget in ipairs (skin_object.skin_options) do
local type = widget.type
@@ -7807,13 +7905,10 @@ function window:update_all (editing_instance)
end
frame3.SkinExtraOptionsAnchor:Show()
--]]
elseif (skin_object.skin_options) then
for index, t in ipairs (frame3.ExtraOptions [skin_name_formated]) do
t[1]:Show()
t[2]:Show()
end
frame3.SkinExtraOptionsAnchor:Show()
frame3.ExtraOptions [skin_name_formated]:Show()
end
--> window 4
@@ -8161,16 +8256,15 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow20TooltipOffsetXSlider.MyObject:SetValue (_detalhes.tooltip.anchor_offset[1])
_G.DetailsOptionsWindow20TooltipOffsetYSlider.MyObject:SetValue (_detalhes.tooltip.anchor_offset[2])
_G.DetailsOptionsWindow20BackdropBorderTextureDropdown.MyObject:Select (_detalhes.tooltip.border_texture)
_G.DetailsOptionsWindow20BackdropSizeHeight.MyObject:SetValue (_detalhes.tooltip.border_size)
_G.DetailsOptionsWindow20BackdropColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.border_color))
----------
_G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetValue (editing_instance.show_sidebars)
_G.DetailsOptionsWindow6StatusbarSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow6StatusbarSlider.MyObject:SetValue (editing_instance.show_statusbar)
+42 -3
View File
@@ -1217,6 +1217,7 @@ local resize_scripts_onenter = function (self)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetOwner (self)
GameCooltip:ShowCooltip()
end
@@ -1266,6 +1267,7 @@ local lockFunctionOnEnter = function (self)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetOwner (self)
GameCooltip:ShowCooltip()
end
@@ -1349,6 +1351,7 @@ local unSnapButtonOnEnter = function (self)
GameCooltip:AddFromTable (unSnapButtonTooltip)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:ShowCooltip (self, "tooltip")
end
@@ -4239,6 +4242,7 @@ local build_mode_list = function (self, elapsed)
--CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3})
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
show_anti_overlap (instancia, self, "top")
@@ -4539,6 +4543,8 @@ local build_segment_list = function (self, elapsed)
--CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3})
CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
CoolTip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
show_anti_overlap (instancia, self, "top")
@@ -5711,6 +5717,31 @@ function _detalhes:ShowStatusBar (instancia)
end
end
function _detalhes:SetTooltipBackdrop (border_texture, border_size, border_color)
if (not border_texture) then
border_texture = _detalhes.tooltip.border_texture
end
if (not border_size) then
border_size = _detalhes.tooltip.border_size
end
if (not border_color) then
border_color = _detalhes.tooltip.border_color
end
_detalhes.tooltip.border_texture = border_texture
_detalhes.tooltip.border_size = border_size
local c = _detalhes.tooltip.border_color
local cc = _detalhes.tooltip_border_color
c[1], c[2], c[3], c[4] = border_color[1], border_color[2], border_color[3], border_color[4] or 1
cc[1], cc[2], cc[3], cc[4] = border_color[1], border_color[2], border_color[3], border_color[4] or 1
_detalhes.tooltip_backdrop.edgeFile = SharedMedia:Fetch ("border", border_texture)
_detalhes.tooltip_backdrop.edgeSize = border_size
end
--> reset button functions
local reset_button_onenter = function (self)
@@ -5735,6 +5766,7 @@ end
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
show_anti_overlap (self.instance, self, "top")
@@ -5806,7 +5838,8 @@ end
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
show_anti_overlap (self.instance, self, "top")
@@ -6189,7 +6222,7 @@ function gump:CriaCabecalho (baseframe, instancia)
--> First we declare the function which will build the menu
local BuildAttributeMenu = function()
if (_detalhes.solo and _detalhes.solo == instancia.meu_id) then
return _detalhes:MontaSoloOption (instancia)
_detalhes:MontaSoloOption (instancia)
elseif (instancia:IsRaidMode()) then
local have_plugins = _detalhes:MontaRaidOption (instancia)
if (not have_plugins) then
@@ -6203,8 +6236,11 @@ function gump:CriaCabecalho (baseframe, instancia)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
end
else
return _detalhes:MontaAtributosOption (instancia)
_detalhes:MontaAtributosOption (instancia)
end
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
end
--> Now we create a table with some parameters
@@ -6270,6 +6306,7 @@ function gump:CriaCabecalho (baseframe, instancia)
GameCooltip:AddMenu (1, _detalhes.Reportar, instancia)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
show_anti_overlap (instancia, self, "top")
@@ -6400,6 +6437,8 @@ function gump:CriaCabecalho (baseframe, instancia)
end
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
return ClosedInstances
end
+1 -1
View File
@@ -26,7 +26,7 @@ function _detalhes:OpenWelcomeWindow ()
window:SetScript ("OnHide", function()
--> start tutorial if this is first run
if (_detalhes.tutorial.logons < 2 and _detalhes.is_first_run) then
_detalhes:StartTutorial()
--_detalhes:StartTutorial()
end
_detalhes.tabela_historico:resetar()
end)