Scaling fixes; Added player bar color

This commit is contained in:
Tercio Jose
2022-01-15 14:32:25 -03:00
parent 009d96cbda
commit 28f28f2212
14 changed files with 393 additions and 288 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
local dversion = 282
local dversion = 283
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
+10 -8
View File
@@ -281,27 +281,29 @@ function DF:NewImage (parent, texture, w, h, layer, coords, member, name)
ImageObject.image.MyObject = ImageObject
if (w) then
ImageObject.image:SetWidth (w)
ImageObject.image:SetWidth(w)
end
if (h) then
ImageObject.image:SetHeight (h)
ImageObject.image:SetHeight(h)
end
if (texture) then
if (type (texture) == "table") then
local r, g, b = DF:ParseColors (texture)
ImageObject.image:SetTexture (r,g,b)
local r, g, b = DF:ParseColors(texture)
ImageObject.image:SetColorTexture(r,g,b)
else
if (DF:IsHtmlColor (texture)) then
local r, g, b = DF:ParseColors (texture)
ImageObject.image:SetTexture (r, g, b)
local r, g, b = DF:ParseColors(texture)
ImageObject.image:SetColorTexture(r, g, b)
else
ImageObject.image:SetTexture (texture)
ImageObject.image:SetTexture(texture)
end
end
end
if (coords and type (coords) == "table" and coords [4]) then
ImageObject.image:SetTexCoord (unpack (coords))
ImageObject.image:SetTexCoord(unpack (coords))
end
ImageObject.HookList = {
+14
View File
@@ -34,6 +34,20 @@ do
local news = {
--[=[
Added an option to change your own bar color.
Bookmark window now uses the same scale than the options panel.
Class Color window now uses the same scale than the options panel.
Fixed all issues with the options panel scale.
Fixed auto hide windows which wasn't saving its group when unhiding (fix by Flamanis).
Fixed some XML Headers which was giving errors on loading (fix by github user h0tw1r3).
Fixed '/details me' on TBC, which wasn't working correctly (fix by github user Baugstein).
Fixed font 'NuevaStd' where something the font didn't work at all.
New API: combat:GetPlayerDeaths(deadPlayerName).
New API: Details:ShowDeathTooltip(combatObject, deathTable) for Cooltip tooltips.
]=]
{"v9.1.5.9213.145", "December 9th, 2021"},
"Fixed an issue where after reloading, overall data won't show the players nickname.",
"Fixed overkill damage on death log tooltip.",
+16 -1
View File
@@ -125,7 +125,22 @@
function combate:GetDeaths()
return self.last_events_tables
end
function combate:GetPlayerDeaths(deadPlayerName)
local allDeaths = self:GetDeaths()
local deaths = {}
for i = 1, #allDeaths do
local thisDeath = allDeaths[i]
local thisPlayerName = thisDeath[3]
if (deadPlayerName == thisPlayerName) then
deaths[#deaths+1] = thisDeath
end
end
return deaths
end
function combate:GetCombatId()
return self.combat_id
end
+23 -23
View File
@@ -327,40 +327,39 @@
return table1 [4] < table2 [4]
end
--[[exported]] function Details:GetBarColor (actor)
--[[exported]] function Details:GetBarColor(actor)
actor = actor or self
if (actor.monster) then
return _unpack (Details.class_colors.ENEMY)
return _unpack(Details.class_colors.ENEMY)
elseif (actor.customColor) then
return unpack(actor.customColor)
return _unpack(actor.customColor)
elseif (actor.spellicon) then
return 0.729, 0.917, 1
elseif (actor.owner) then
return _unpack (Details.class_colors [actor.owner.classe or "UNKNOW"])
return _unpack(Details.class_colors[actor.owner.classe or "UNKNOW"])
elseif (actor.arena_team and Details.color_by_arena_team) then
if (actor.arena_team == 0) then
return _unpack (Details.class_colors.ARENA_GREEN)
return _unpack(Details.class_colors.ARENA_GREEN)
else
return _unpack (Details.class_colors.ARENA_YELLOW)
return _unpack(Details.class_colors.ARENA_YELLOW)
end
--elseif (actor.enemy and not actor.arena_enemy) then
-- return 0.94117, 0.1, 0.1, 1
else
if (not is_player_class [actor.classe] and actor.flag_original and _bit_band (actor.flag_original, 0x00000020) ~= 0) then --> neutral
return _unpack (Details.class_colors.NEUTRAL)
return _unpack(Details.class_colors.NEUTRAL)
elseif (actor.color) then
return _unpack(actor.color)
else
return _unpack (Details.class_colors [actor.classe or "UNKNOW"])
return _unpack(Details.class_colors [actor.classe or "UNKNOW"])
end
end
end
--[[exported]] function Details:GetSpellLink (spellid)
if (_type (spellid) ~= "number") then
return spellid
@@ -2842,29 +2841,30 @@ local InBarIconPadding = 6
set_text_size (bar, instance)
end
--[[ exported]] function Details:SetBarColors (bar, instance, r, g, b, a)
--[[ exported]] function Details:SetBarColors(bar, instance, r, g, b, a)
a = a or 1
if (instance.row_info.texture_class_colors) then
if (instance.bars_inverted) then
bar.right_to_left_texture:SetVertexColor (r, g, b, a)
bar.right_to_left_texture:SetVertexColor(r, g, b, a)
else
bar.textura:SetVertexColor (r, g, b, a)
bar.textura:SetVertexColor(r, g, b, a)
end
end
if (instance.row_info.texture_background_class_color) then
bar.background:SetVertexColor (r, g, b, a)
bar.background:SetVertexColor(r, g, b, a)
end
if (instance.row_info.textL_class_colors) then
bar.lineText1:SetTextColor (r, g, b, a)
bar.lineText1:SetTextColor(r, g, b, a)
end
if (instance.row_info.textR_class_colors) then
bar.lineText2:SetTextColor (r, g, b, a)
bar.lineText3:SetTextColor (r, g, b, a)
bar.lineText4:SetTextColor (r, g, b, a)
bar.lineText2:SetTextColor(r, g, b, a)
bar.lineText3:SetTextColor(r, g, b, a)
bar.lineText4:SetTextColor(r, g, b, a)
end
end
@@ -2954,11 +2954,11 @@ end
end
--> icon
self:SetClassIcon (thisLine.icone_classe, instance, class)
self:SetClassIcon(thisLine.icone_classe, instance, class)
--> texture color
self:SetBarColors (thisLine, instance, actor_class_color_r, actor_class_color_g, actor_class_color_b)
self:SetBarColors(thisLine, instance, actor_class_color_r, actor_class_color_g, actor_class_color_b)
--> left text
self:SetBarLeftText (thisLine, instance, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
self:SetBarLeftText(thisLine, instance, enemy, arena_enemy, arena_ally, UsingCustomLeftText)
end
+94 -92
View File
@@ -25,12 +25,14 @@ local _GetNumSubgroupMembers = GetNumSubgroupMembers
local _UnitAura = UnitAura
local _UnitGUID = UnitGUID
local _UnitName = UnitName
local format = _G.format
local UnitIsUnit = UnitIsUnit
local _string_replace = _detalhes.string.replace --details api
local _detalhes = _G._detalhes
local Details = _detalhes
local AceLocale = LibStub ("AceLocale-3.0")
local Loc = AceLocale:GetLocale ( "Details" )
@@ -195,57 +197,49 @@ end
local backgroundColor = {0, 0, 0, 1}
local backgroud_bar_damage = {value = 100, texture = [[Interface\AddOns\Details\images\bar_serenity]], color = {1, 0, 0, 0.1}}
--local backgroud_bar_heal = {value = 100, texture = [[Interface\AddOns\Details\images\bar_background]], color = {0, 0, 0, 1}}
function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
local eventos = morte [1]
local hora_da_morte = morte [2]
local hp_max = morte [5]
function Details:ShowDeathTooltip(combatObject, deathTable)
local events = deathTable[1]
local timeOfDeath = deathTable[2]
local maxHP = deathTable[5]
local battleress = false
local lastcooldown = false
local GameCooltip = GameCooltip
GameCooltip:Reset()
GameCooltip:SetType ("tooltipbar")
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color))
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
local barTypeColors = Details.death_log_colors
--death parser
for index, event in _ipairs (eventos) do
local hp = _math_floor (event[5]/hp_max*100)
if (hp > 100) then
for i, event in _ipairs (events) do
local currentHP = event[5]
local hp = floor(currentHP / maxHP * 100)
if (hp > 100) then
hp = 100
end
local evtype = event [1]
local spellname, _, spellicon = _GetSpellInfo (event [2])
local amount = event [3]
local time = event [4]
local source = event [6]
local combatObject = instancia:GetShowingCombat()
local evtype = event[1]
local spellName, _, spellIcon = _GetSpellInfo(event[2])
local amount = event[3]
local time = event[4]
local source = event[6]
if (time + 12 > hora_da_morte) then
if (time + 12 > timeOfDeath) then
if (type (evtype) == "boolean") then
--> is damage or heal
if (evtype) then
--> damage
local overkill = event [10] or 0
--is damage or heal?
if (evtype) then --bool true
--damage
local overkill = event[10] or 0
local critical = event[11] and (" " .. TEXT_MODE_A_STRING_RESULT_CRITICAL) or "" -- (Critical)
local crushing = event[12] and (" " .. TEXT_MODE_A_STRING_RESULT_CRUSHING) or "" -- (Crushing)
local critOrCrush = critical .. crushing
if (overkill > 0) then
--> deprecated as the parser now removes the overkill damage from total damage
--> this should now sum the overkill from [10] with the damage from [3]
--check the type of overkill that should be shown
@@ -255,115 +249,123 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
-- amount = amount - overkill
--end
overkill = " (" .. _detalhes:ToK (overkill) .. " |cFFFF8800overkill|r)"
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s |cFFFFFF00" .. spellname .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
overkill = " (" .. _detalhes:ToK(overkill) .. " |cFFFF8800overkill|r)"
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s |cFFFFFF00" .. spellName .. "|r (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK(amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
else
overkill = ""
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK (amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "-" .. _detalhes:ToK(amount) .. critOrCrush .. overkill .. " (" .. hp .. "%)", 1, "white", "white")
end
GameCooltip:AddIcon (spellicon)
if (event [9]) then
--> friendly fire
GameCooltip:AddStatusBar (hp, 1, barTypeColors.friendlyfire, true, backgroud_bar_damage)
--iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
if (event[9]) then
--friendly fire
GameCooltip:AddStatusBar(hp, 1, barTypeColors.friendlyfire, true, backgroud_bar_damage)
else
--> from a enemy
GameCooltip:AddStatusBar (hp, 1, barTypeColors.damage, true, backgroud_bar_damage)
--from a enemy
GameCooltip:AddStatusBar(hp, 1, barTypeColors.damage, true, backgroud_bar_damage)
end
else
--> heal
--heal
if (amount > _detalhes.deathlog_healingdone_min) then
if (combatObject.is_arena) then
if (amount > _detalhes.deathlog_healingdone_min_arena) then
GameCooltip:AddLine("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellicon)
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK(amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
GameCooltip:AddStatusBar(hp, 1, barTypeColors.heal, true)
end
else
GameCooltip:AddLine("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK (amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellicon)
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (|cFFC6B0D9" .. source .. "|r)", "+" .. _detalhes:ToK(amount) .. " (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
GameCooltip:AddStatusBar(hp, 1, barTypeColors.heal, true)
end
end
end
elseif (type (evtype) == "number") then
if (evtype == 1) then
--> cooldown
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s " .. spellname .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (100, 1, barTypeColors.cooldown, true)
--cooldown
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s " .. spellName .. " (" .. source .. ")", "cooldown (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon, nil, nil, nil, nil, .1, .9, .1, .9)
GameCooltip:AddStatusBar(100, 1, barTypeColors.cooldown, true)
elseif (evtype == 2 and not battleress) then
--> battle ress
--battle ress
battleress = event
elseif (evtype == 3) then
--> last cooldown used
--last cooldown used
lastcooldown = event
elseif (evtype == 4) then
--> debuff
GameCooltip:AddLine ("" .. _cstr ("%.1f", time - hora_da_morte) .. "s [x" .. amount .. "] " .. spellname .. " (" .. source .. ")", "debuff (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon (spellicon)
GameCooltip:AddStatusBar (100, 1, barTypeColors.debuff, true)
--debuff
GameCooltip:AddLine("" .. format("%.1f", time - timeOfDeath) .. "s [x" .. amount .. "] " .. spellName .. " (" .. source .. ")", "debuff (" .. hp .. "%)", 1, "white", "white")
GameCooltip:AddIcon(spellIcon)
GameCooltip:AddStatusBar(100, 1, barTypeColors.debuff, true)
end
end
end
end
GameCooltip:AddLine (morte [6] .. " " .. Loc ["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
GameCooltip:AddLine(deathTable[6] .. " " .. Loc["STRING_TIME_OF_DEATH"] , "-- -- -- ", 1, "white")
GameCooltip:AddIcon("Interface\\AddOns\\Details\\images\\small_icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar(0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
if (battleress) then
local nome_magia, _, icone_magia = _GetSpellInfo (battleress [2])
GameCooltip:AddLine ("+" .. _cstr ("%.1f", battleress[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. battleress[6] .. ")", "", 1, "white")
GameCooltip:AddIcon ("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar (0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
local spellName, _, spellIcon = _GetSpellInfo (battleress[2])
GameCooltip:AddLine("+" .. format("%.1f", battleress[4] - timeOfDeath) .. "s " .. spellName .. " (" .. battleress[6] .. ")", "", 1, "white")
GameCooltip:AddIcon("Interface\\Glues\\CharacterSelect\\Glues-AddOn-Icons", 1, 1, nil, nil, .75, 1, 0, 1)
GameCooltip:AddStatusBar(0, 1, .5, .5, .5, .5, false, {value = 100, color = {.5, .5, .5, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_vidro]]})
end
if (lastcooldown) then
if (lastcooldown[3] == 1) then
local nome_magia, _, icone_magia = _GetSpellInfo (lastcooldown [2])
GameCooltip:AddLine (_cstr ("%.1f", lastcooldown[4] - hora_da_morte) .. "s " .. nome_magia .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon (icone_magia)
if (lastcooldown[3] == 1) then
local spellName, _, spellIcon = _GetSpellInfo (lastcooldown[2])
GameCooltip:AddLine(format("%.1f", lastcooldown[4] - timeOfDeath) .. "s " .. spellName .. " (" .. Loc ["STRING_LAST_COOLDOWN"] .. ")")
GameCooltip:AddIcon(spellIcon)
else
GameCooltip:AddLine (Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
GameCooltip:AddLine(Loc ["STRING_NOLAST_COOLDOWN"])
GameCooltip:AddIcon([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]], 1, 1, 18, 18)
end
GameCooltip:AddStatusBar (0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
GameCooltip:AddStatusBar(0, 1, 1, 1, 1, 1, false, {value = 100, color = {.3, .3, .3, 1}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar_serenity]]})
end
GameCooltip:SetOption ("StatusBarHeightMod", -6)
GameCooltip:SetOption ("FixedWidth", (type (_detalhes.death_tooltip_width) == "number" and _detalhes.death_tooltip_width) or 300)
GameCooltip:SetOption("StatusBarHeightMod", -6)
GameCooltip:SetOption("FixedWidth", (type(_detalhes.death_tooltip_width) == "number" and _detalhes.death_tooltip_width) or 300)
GameCooltip:SetOption("TextSize", _detalhes.tooltip.fontsize)
GameCooltip:SetOption("TextFont", _detalhes.tooltip.fontface)
GameCooltip:SetOption("LeftBorderSize", -4)
GameCooltip:SetOption("RightBorderSize", 5)
GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
GameCooltip:SetOption("StatusBarTexture", [[Interface\AddOns\Details\images\BantoBar]])
GameCooltip:SetWallpaper(1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
GameCooltip:SetBackdrop(1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color)
end
function _detalhes:ToolTipDead (instancia, morte, esta_barra)
local GameCooltip = GameCooltip
Details:ShowDeathTooltip(instancia:GetShowingCombat(), morte)
GameCooltip:SetOption ("TextSize", _detalhes.tooltip.fontsize)
GameCooltip:SetOption ("TextFont", _detalhes.tooltip.fontface)
GameCooltip:SetOption ("LeftBorderSize", -4)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_reverse]])
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\BantoBar]])
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true)
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color)
local myPoint = _detalhes.tooltip.anchor_point
local anchorPoint = _detalhes.tooltip.anchor_relative
local x_Offset = _detalhes.tooltip.anchor_offset[1]
local y_Offset = _detalhes.tooltip.anchor_offset[2]
if (_detalhes.tooltip.anchored_to == 1) then
GameCooltip:SetHost (esta_barra, myPoint, anchorPoint, x_Offset, y_Offset)
else
GameCooltip:SetHost (DetailsTooltipAnchor, myPoint, anchorPoint, x_Offset, y_Offset)
end
GameCooltip:ShowCooltip()
end
local function RefreshBarraMorte (morte, barra, instancia)
+67 -60
View File
@@ -175,22 +175,22 @@
--> check is didn't changed the spec:
if (_detalhes.streamer_config.quick_detection) then
--> validate the spec more times if on quick detection
_detalhes:ScheduleTimer ("ReGuessSpec", 2, {novo_objeto, self})
_detalhes:ScheduleTimer ("ReGuessSpec", 4, {novo_objeto, self})
_detalhes:ScheduleTimer ("ReGuessSpec", 6, {novo_objeto, self})
_detalhes:ScheduleTimer("ReGuessSpec", 2, {novo_objeto})
_detalhes:ScheduleTimer("ReGuessSpec", 4, {novo_objeto})
_detalhes:ScheduleTimer("ReGuessSpec", 6, {novo_objeto})
end
_detalhes:ScheduleTimer ("ReGuessSpec", 15, {novo_objeto, self})
_detalhes:ScheduleTimer("ReGuessSpec", 15, {novo_objeto})
--print (nome, "spec em cache:", have_cached)
else
if (_detalhes.streamer_config.quick_detection) then
--> shoot detection early if in quick detection
_detalhes:ScheduleTimer ("GuessSpec", 1, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessSpec", 1, {novo_objeto, nil, 1})
else
_detalhes:ScheduleTimer ("GuessSpec", 3, {novo_objeto, self, 1})
_detalhes:ScheduleTimer("GuessSpec", 3, {novo_objeto, nil, 1})
end
end
end
local _, engClass = _UnitClass (nome or "")
if (engClass) then
@@ -207,71 +207,69 @@
return
end
end
novo_objeto.classe = "UNKNOW"
return true
end
end
--> read the actor flag
local read_actor_flag = function (novo_objeto, dono_do_pet, serial, flag, nome, container_type)
local read_actor_flag = function(actorObject, dono_do_pet, serial, flag, nome, container_type)
if (flag) then
--> um player
--> this is player actor
if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then
if (not _detalhes.ignore_nicktag) then
novo_objeto.displayName = _detalhes:GetNickname (nome, false, true) --> serial, default, silent
if (novo_objeto.displayName and novo_objeto.displayName ~= "") then
actorObject.displayName = _detalhes:GetNickname (nome, false, true) --> serial, default, silent
if (actorObject.displayName and actorObject.displayName ~= "") then
--don't display empty nicknames
if (novo_objeto.displayName:find(" ")) then
if (actorObject.displayName:find(" ")) then
if (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
actorObject.displayName = nome:gsub (("%-.*"), "")
else
novo_objeto.displayName = nome
actorObject.displayName = nome
end
end
end
end
if (not novo_objeto.displayName) then
if (not actorObject.displayName) then
if (_detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), "")
actorObject.displayName = nome:gsub(("%-.*"), "")
else
novo_objeto.displayName = nome
actorObject.displayName = nome
end
end
if (_detalhes.all_players_are_group or _detalhes.immersion_enabled) then
novo_objeto.grupo = true
actorObject.grupo = true
end
--special spells to add into the group view
local spellId = Details.SpecialSpellActorsName[novo_objeto.nome]
local spellId = Details.SpecialSpellActorsName[actorObject.nome]
if (spellId) then
novo_objeto.grupo = true
actorObject.grupo = true
if (Details.KyrianWeaponSpellIds[spellId]) then
novo_objeto.spellicon = GetSpellTexture(Details.KyrianWeaponActorSpellId)
novo_objeto.nome = Details.KyrianWeaponActorName
novo_objeto.displayName = Details.KyrianWeaponActorName
novo_objeto.customColor = Details.KyrianWeaponColor
actorObject.spellicon = GetSpellTexture(Details.KyrianWeaponActorSpellId)
actorObject.nome = Details.KyrianWeaponActorName
actorObject.displayName = Details.KyrianWeaponActorName
actorObject.customColor = Details.KyrianWeaponColor
nome = Details.KyrianWeaponActorName
else
novo_objeto.spellicon = GetSpellTexture(spellId)
actorObject.spellicon = GetSpellTexture(spellId)
end
end
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and novo_objeto.classe ~= "UNKNOW" and novo_objeto.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
novo_objeto.grupo = true
if ((_bit_band (flag, IS_GROUP_OBJECT) ~= 0 and actorObject.classe ~= "UNKNOW" and actorObject.classe ~= "UNGROUPPLAYER") or _detalhes:IsInCache (serial)) then
actorObject.grupo = true
if (_detalhes:IsATank (serial)) then
novo_objeto.isTank = true
actorObject.isTank = true
end
else
if (_detalhes.pvp_as_group and (_detalhes.tabela_vigente and _detalhes.tabela_vigente.is_pvp) and _detalhes.is_in_battleground) then
novo_objeto.grupo = true
actorObject.grupo = true
end
end
@@ -279,32 +277,35 @@
if (_detalhes.duel_candidates [serial]) then
--> check if is recent
if (_detalhes.duel_candidates [serial]+20 > GetTime()) then
novo_objeto.grupo = true
novo_objeto.enemy = true
actorObject.grupo = true
actorObject.enemy = true
end
end
if (_detalhes.is_in_arena) then
local my_team_color = GetBattlefieldArenaFaction and GetBattlefieldArenaFaction() or 0
--local my_team_color = GetBattlefieldArenaFaction and GetBattlefieldArenaFaction() or 0
if (novo_objeto.grupo) then --> is ally
novo_objeto.arena_ally = true
novo_objeto.arena_team = 0 --my_team_color | forcing the player team to always be the same color
else --> is enemy
novo_objeto.enemy = true
novo_objeto.arena_enemy = true
novo_objeto.arena_team = 1 -- - my_team_color
--my team
if (actorObject.grupo) then
actorObject.arena_ally = true
actorObject.arena_team = 0 -- former my_team_color | forcing the player team to always be the same color
--enemy team
else
actorObject.enemy = true
actorObject.arena_enemy = true
actorObject.arena_team = 1 -- former my_team_color
end
local arena_props = _detalhes.arena_table [nome]
if (arena_props) then
novo_objeto.role = arena_props.role
actorObject.role = arena_props.role
if (arena_props.role == "NONE") then
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned(nome)
if (role and role ~= "NONE") then
novo_objeto.role = role
actorObject.role = role
end
end
else
@@ -316,10 +317,10 @@
local spec = GetArenaOpponentSpec and GetArenaOpponentSpec (i)
if (spec) then
local id, name, description, icon, role, class = DetailsFramework.GetSpecializationInfoByID (spec) --thanks pas06
novo_objeto.role = role
novo_objeto.classe = class
novo_objeto.enemy = true
novo_objeto.arena_enemy = true
actorObject.role = role
actorObject.classe = class
actorObject.enemy = true
actorObject.arena_enemy = true
found = true
end
end
@@ -327,47 +328,53 @@
local role = UnitGroupRolesAssigned and UnitGroupRolesAssigned (nome)
if (role and role ~= "NONE") then
novo_objeto.role = role
actorObject.role = role
found = true
end
if (not found and nome == _detalhes.playername) then
local role = UnitGroupRolesAssigned ("player")
if (role and role ~= "NONE") then
novo_objeto.role = role
actorObject.role = role
end
end
end
novo_objeto.grupo = true
actorObject.grupo = true
end
--player custom bar color
--at this position in the code, the color will replace colors from arena matches
if (Details.use_self_color) then
actorObject.customColor = Details.class_colors.SELF
end
--> um pet
elseif (dono_do_pet) then
novo_objeto.owner = dono_do_pet
novo_objeto.ownerName = dono_do_pet.nome
elseif (dono_do_pet) then
actorObject.owner = dono_do_pet
actorObject.ownerName = dono_do_pet.nome
if (_IsInInstance() and _detalhes.remove_realm_from_name) then
novo_objeto.displayName = nome:gsub (("%-.*"), ">")
actorObject.displayName = nome:gsub (("%-.*"), ">")
else
novo_objeto.displayName = nome
actorObject.displayName = nome
end
--local pet_npc_template = _detalhes:GetNpcIdFromGuid (serial)
--if (pet_npc_template == 86933) then --viviane
-- novo_objeto.grupo = true
-- actorObject.grupo = true
--end
else
--> anything else that isn't a player or a pet
novo_objeto.displayName = nome
actorObject.displayName = nome
--[=[
--Chromie - From 'The Deaths of Chromie'
if (serial and type (serial) == "string") then
if (serial:match ("^Creature%-0%-%d+%-%d+%-%d+%-122663%-%w+$")) then
novo_objeto.grupo = true
actorObject.grupo = true
end
end
--]=]
@@ -381,7 +388,7 @@
if (_bit_band (flag, OBJECT_TYPE_PETGUARDIAN) == 0) then
--> isn't a pet or guardian
novo_objeto.monster = true
actorObject.monster = true
end
if (serial and type (serial) == "string") then
+28 -23
View File
@@ -419,17 +419,21 @@
return options_frame
end
end
function _detalhes:CreatePluginWindowContainer()
local f = CreateFrame ("frame", "DetailsPluginContainerWindow", UIParent,"BackdropTemplate")
f:EnableMouse (true)
f:SetMovable (true)
f:SetPoint ("center", UIParent, "center")
f:SetBackdrop (_detalhes.PluginDefaults and _detalhes.PluginDefaults.Backdrop or {bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
f:SetBackdropColor (0, 0, 0, 0.3)
f:SetBackdropBorderColor(0, 0, 0, 1)
local scaleBar = DetailsFramework:CreateScaleBar(f, Details.options_window)
scaleBar:SetFrameStrata("fullscreen")
f:SetScale(Details.options_window.scale)
f:Hide()
--> members
@@ -550,7 +554,7 @@
--> get the plugin
local pluginObject = _detalhes:GetPlugin (pluginAbsName)
if (not pluginObject) then
for index, plugin in ipairs (f.EmbedPlugins) do
for index, plugin in ipairs (f.EmbedPlugins) do
if (plugin.real_name == pluginAbsName) then
pluginObject = plugin
end
@@ -638,27 +642,27 @@
PixelUtil.SetPoint (frame, "topleft", f, "topleft", 0, 0)
frame:Show()
end
--> a plugin request to be embed into the main plugin window
function f.EmbedPlugin (pluginObject, frame, isUtility)
--> a plugin request to be embed into the main plugin window
function f.EmbedPlugin(pluginObject, frame, isUtility)
--> check if the plugin has a frame
if (not pluginObject.Frame) then
f.DebugMsg ("plugin doesn't have a frame.")
return
end
--> create a button for this plugin
local newMenuButtom = f.CreatePluginMenuButton (pluginObject, isUtility)
local newMenuButtom = f.CreatePluginMenuButton(pluginObject, isUtility)
--> utility is true when the object isn't a real plugin, but instead a tool frame from the main addon being embed on this panel
if (isUtility) then
pluginObject.__var_Utility = true
end
pluginObject.__var_Frame = frame
--> sort buttons alphabetically, put utilities at the end
table.sort (f.MenuButtons, function (t1, t2)
table.sort (f.MenuButtons, function(t1, t2)
if (t1.IsUtility and t2.IsUtility) then
return t1.PluginName < t2.PluginName
elseif (t1.IsUtility) then
@@ -668,35 +672,36 @@
else
return t1.PluginName < t2.PluginName
end
end)
end)
--> reset the buttons points
local addingTools = false
for index, button in ipairs (f.MenuButtons) do
for index, button in ipairs(f.MenuButtons) do
button:ClearAllPoints()
PixelUtil.SetPoint (button, "center", menuBackground, "center", 0, 0)
PixelUtil.SetPoint(button, "center", menuBackground, "center", 0, 0)
if (button.IsUtility) then
--> add -20 to add a gap between plugins and utilities
if (not addingTools) then
--> add the header
addingTools = true
PixelUtil.SetPoint (titlebar_tools, "topleft", menuBackground, "topleft", 2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
PixelUtil.SetPoint (titlebar_tools, "topright", menuBackground, "topright", -2, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 20)
end
PixelUtil.SetPoint (button, "top", menuBackground, "top", 0, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index - 40)
else
PixelUtil.SetPoint (button, "top", menuBackground, "top", 0, f.MenuY + ( (index-1) * -f.MenuButtonHeight ) - index)
end
end
--> format the plugin main frame
f.RefreshFrame (frame)
--> add the plugin to embed table
tinsert (f.EmbedPlugins, pluginObject)
tinsert(f.EmbedPlugins, pluginObject)
frame:SetParent(f)
f.DebugMsg ("plugin added", pluginObject.__name)
end
+13 -4
View File
@@ -6,11 +6,12 @@ local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
--> config bookmarks
function Details:OpenBookmarkConfig()
if (not _G.DetailsBookmarkManager) then
DF:CreateSimplePanel (UIParent, 465, 460, Loc ["STRING_OPTIONS_MANAGE_BOOKMARKS"], "DetailsBookmarkManager")
local panel = _G.DetailsBookmarkManager
DF:ApplyStandardBackdrop (panel)
DF:ApplyStandardBackdrop(panel)
panel:SetBackdropColor(.1, .1, .1, .9)
panel.blocks = {}
local clear_func = function (self, button, id)
@@ -139,6 +140,14 @@ function Details:OpenBookmarkConfig()
end
end
_G.DetailsBookmarkManager:Show()
_G.DetailsBookmarkManager:Refresh()
local bookmarkFrame = _G.DetailsBookmarkManager
bookmarkFrame:Show()
bookmarkFrame:Refresh()
local optionsFrame = _G.DetailsOptionsWindow
if (optionsFrame) then
--parent is the plugin container
local currentOptionsScale = optionsFrame:GetParent():GetScale()
bookmarkFrame:SetScale(currentOptionsScale)
end
end
+56 -33
View File
@@ -9,15 +9,16 @@ function Details:OpenClassColorsConfig()
if (not _G.DetailsClassColorManager) then
DF:CreateSimplePanel (UIParent, 300, 425, Loc ["STRING_OPTIONS_CLASSCOLOR_MODIFY"], "DetailsClassColorManager")
local panel = _G.DetailsClassColorManager
DF:ApplyStandardBackdrop (panel)
DF:ApplyStandardBackdrop(panel)
panel:SetBackdropColor(.1, .1, .1, .9)
local upper_panel = CreateFrame ("frame", nil, panel,"BackdropTemplate")
upper_panel:SetAllPoints (panel)
upper_panel:SetFrameLevel (panel:GetFrameLevel()+3)
local y = -50
local callback = function (button, r, g, b, a, self)
self.MyObject.my_texture:SetVertexColor (r, g, b)
Details.class_colors [self.MyObject.my_class][1] = r
@@ -50,40 +51,45 @@ function Details:OpenClassColorsConfig()
local on_leave = function (self, capsule)
--GameCooltip:Hide()
end
local reset = DF:NewLabel (panel, panel, nil, nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:" .. 20 .. ":" .. 20 .. ":0:1:512:512:8:70:328:409|t " .. Loc ["STRING_OPTIONS_CLASSCOLOR_RESET"])
reset:SetPoint ("bottomright", panel, "bottomright", -23, 08)
local reset_texture = DF:CreateImage (panel, [[Interface\MONEYFRAME\UI-MONEYFRAME-BORDER]], 138, 45, "border")
reset_texture:SetPoint ("center", reset, "center", 0, -7)
reset_texture:SetDesaturated (true)
local reset = DF:NewLabel(panel, panel, nil, nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:" .. 20 .. ":" .. 20 .. ":0:1:512:512:8:70:328:409|t " .. Loc ["STRING_OPTIONS_CLASSCOLOR_RESET"])
reset:SetPoint("bottomright", panel, "bottomright", -23, 08)
local reset_texture = DF:CreateImage(panel, [[Interface\MONEYFRAME\UI-MONEYFRAME-BORDER]], 138, 45, "border")
reset_texture:SetPoint("center", reset, "center", 0, -7)
reset_texture:SetDesaturated(true)
panel.buttons = {}
for index, class_name in ipairs (CLASS_SORT_ORDER) do
local icon = DF:CreateImage (upper_panel, [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-CLASSES]], 32, 32, nil, CLASS_ICON_TCOORDS [class_name], "icon_" .. class_name)
for index, className in ipairs(CLASS_SORT_ORDER) do
local icon = DF:CreateImage (upper_panel, [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-CLASSES]], 32, 32, nil, CLASS_ICON_TCOORDS [className], "icon_" .. className)
if (index%2 ~= 0) then
icon:SetPoint (10, y)
icon:SetPoint(10, y)
else
icon:SetPoint (150, y)
icon:SetPoint(150, y)
y = y - 33
end
local bg_texture = DF:CreateImage (panel, [[Interface\AddOns\Details\images\bar_skyline]], 135, 30, "artwork")
bg_texture:SetPoint ("left", icon, "right", -32, 0)
local button = DF:CreateButton (panel, set_color, 135, 30, "set color", class_name, index)
button:SetPoint ("left", icon, "right", -32, 0)
button:InstallCustomTexture (nil, nil, nil, nil, true)
local backgroundTexture = DF:CreateImage(panel, [[Interface\AddOns\Details\images\bar_skyline]], 135, 30, "artwork")
backgroundTexture:SetPoint("left", icon, "right", -32, 0)
local button = DF:CreateButton(panel, set_color, 135, 30, className, className, index)
button:SetPoint("left", icon, "right", -32, 0)
button:InstallCustomTexture(nil, nil, nil, nil, true)
button:SetFrameLevel (panel:GetFrameLevel()+1)
button.text_overlay:ClearAllPoints()
button.text_overlay:SetPoint("left", icon.widget, "right", 2, 0)
button.text_overlay.textsize = 10
button.my_icon = icon
button.my_texture = bg_texture
button.my_class = class_name
button.my_texture = backgroundTexture
button.my_class = className
button:SetHook ("OnEnter", on_enter)
button:SetHook ("OnLeave", on_leave)
button:SetClickFunction (reset_color, nil, nil, "RightClick")
panel.buttons [class_name] = button
panel.buttons [className] = button
end
--make color options for death log bars
@@ -177,15 +183,32 @@ function Details:OpenClassColorsConfig()
desc = "Debuff",
},
}
DetailsFramework:BuildMenu(panel, deathLogOptions, 5, -285, 700, true)
--templates
local options_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = DF:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = DF:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = DF:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
DetailsFramework:BuildMenu(panel, deathLogOptions, 5, -285, 700, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
local deathLogColorsLabel = DF:CreateLabel(panel, "Colors on Death Log:", 12, "yellow")
deathLogColorsLabel:SetPoint("topleft", panel, "topleft", 5, -265)
end
for class, button in pairs (_G.DetailsClassColorManager.buttons) do
button.my_texture:SetVertexColor (unpack (Details.class_colors [class]))
end
_G.DetailsClassColorManager:Show()
local colorWindow = _G.DetailsClassColorManager
colorWindow:Show()
local optionsFrame = _G.DetailsOptionsWindow
if (optionsFrame) then
--parent is the plugin container
local currentOptionsScale = optionsFrame:GetParent():GetScale()
colorWindow:SetScale(currentOptionsScale)
end
end
+8 -21
View File
@@ -6,14 +6,14 @@ end
local Details = _G.Details
local DF = _G.DetailsFramework
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale("Details")
local SharedMedia = _G.LibStub:GetLibrary("LibSharedMedia-3.0")
local LDB = _G.LibStub ("LibDataBroker-1.1", true)
local LDBIcon = LDB and _G.LibStub("LibDBIcon-1.0", true)
--local SharedMedia = _G.LibStub:GetLibrary("LibSharedMedia-3.0")
--local LDB = _G.LibStub ("LibDataBroker-1.1", true)
--local LDBIcon = LDB and _G.LibStub("LibDBIcon-1.0", true)
--options panel namespace
Details.options = {}
local tinsert = _G.tinsert
--local tinsert = _G.tinsert
local unpack = _G.unpack
local CreateFrame = _G.CreateFrame
local UIParent = _G.UIParent
@@ -48,40 +48,27 @@ function Details.options.InitializeOptionsWindow(instance)
f.__name = "Options"
f.real_name = "DETAILS_OPTIONS"
f.__icon = [[Interface\Scenarios\ScenarioIcon-Interact]]
_G.DetailsPluginContainerWindow.EmbedPlugin (f, f, true)
_G.DetailsPluginContainerWindow.EmbedPlugin(f, f, true)
f.sectionFramesContainer = {}
Details:FormatBackground(f)
DF:ApplyStandardBackdrop (f)
DF:ApplyStandardBackdrop(f)
local titleBar = DF:CreateTitleBar(f, "Options Panel")
titleBar.Text:Hide()
local titleText = DF:NewLabel(titleBar, nil, "$parentTitleLabel", "title", "Details! " .. Loc ["STRING_OPTIONS_WINDOW"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
titleText:SetPoint("center", titleBar, "center")
--titleText:SetPoint("top", f, "top", 0, -8)
f:Hide()
DF:CreateScaleBar(DetailsOptionsWindow, Details.options_window)
DetailsOptionsWindow:SetScale (Details.options_window.scale)
--[=[]]
local closeButton = CreateFrame("button", "DetailsOptionsWindowCloseButton", DetailsOptionsWindow.widget, "UIPanelCloseButton")
closeButton:SetWidth(32)
closeButton:SetHeight(32)
--closeButton:SetPoint("TOPRIGHT", DetailsOptionsWindow.widget, "TOPRIGHT", 0, 0)
closeButton:SetText("X")
closeButton:SetFrameLevel(closeButton:GetFrameLevel()+2)
--]=]
--select the instance to edit
local onSelectInstance = function (_, _, instanceId)
local instance = _detalhes.tabela_instancias[instanceId]
if (not instance:IsEnabled() or not instance:IsStarted()) then
_detalhes.CriarInstancia (_, _, instance.meu_id)
end
Details.options.SetCurrentInstance(instance)
f.updateMicroFrames()
end
+47 -14
View File
@@ -561,6 +561,8 @@ do
desc = Loc ["STRING_OPTIONS_WC_BOOKMARK_DESC"],
},
{type = "blank"},
{--click through
type = "toggle",
get = function() return currentInstance.clickthrough_window end,
@@ -583,6 +585,32 @@ do
},
{type = "blank"},
{type = "label", get = function() return "Immersion" end, text_template = subSectionTitleTextTemplate}, --localize-me
{--show pets when solo
type = "toggle",
get = function() return Details.immersion_pets_on_solo_play end,
set = function (self, fixedparam, value)
Details.immersion_pets_on_solo_play = value
afterUpdate()
end,
name = "Show pets when solo", --localize-me
desc = "Show pets when solo",
},
{--always show players even on stardard mode
type = "toggle",
get = function() return _detalhes.all_players_are_group end,
set = function (self, fixedparam, value)
_detalhes.all_players_are_group = value
afterUpdate()
end,
name = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS"],
desc = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS_DESC"],
},
{type = "breakline"},
{type = "label", get = function() return Loc ["STRING_OPTIONS_SOCIAL"] end, text_template = subSectionTitleTextTemplate},
{--nickname
type = "textentry",
@@ -632,28 +660,33 @@ do
},
{type = "blank"},
{type = "label", get = function() return "Your Self" end, text_template = subSectionTitleTextTemplate},
{type = "label", get = function() return "Immersion" end, text_template = subSectionTitleTextTemplate}, --localize-me
{--show pets when solo
{--player bar color toggle
type = "toggle",
get = function() return Details.immersion_pets_on_solo_play end,
get = function() return Details.use_self_color end,
set = function (self, fixedparam, value)
Details.immersion_pets_on_solo_play = value
Details.use_self_color = value
afterUpdate()
end,
name = "Show pets when solo", --localize-me
desc = "Show pets when solo",
name = "Use Different Color for You",
desc = "Use a different color on your own bar",
},
{--always show players even on stardard mode
type = "toggle",
get = function() return _detalhes.all_players_are_group end,
set = function (self, fixedparam, value)
_detalhes.all_players_are_group = value
{--player bar color
type = "color",
get = function()
local r, g, b = unpack(Details.class_colors.SELF)
return {r, g, b, 1}
end,
set = function (self, r, g, b, a)
Details.class_colors.SELF[1] = r
Details.class_colors.SELF[2] = g
Details.class_colors.SELF[3] = b
afterUpdate()
end,
name = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS"],
desc = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS_DESC"],
end,
name = "Your Bar Color",
desc = "Your Bar Color",
},
}
+9 -7
View File
@@ -123,7 +123,7 @@
self.totalStatusBar:SetMinMaxValues(0, topResult)
self.totalStatusBar:SetValue(self.playerObject.total)
end
local createPlayerLine = function(self, index)
--create a new line
local line = _G.CreateFrame("button", "$parentLine" .. index, self, "BackdropTemplate")
@@ -132,20 +132,22 @@
line:SetPoint("topleft", self, "topleft", 1, -((index-1) * (player_line_height+1)) - 1)
line:SetSize(scrollbox_size[1]-19, player_line_height)
line:RegisterForClicks("LeftButtonDown", "RightButtonDown")
line:SetScript("OnEnter", lineOnEnter)
line:SetScript("OnLeave", lineOnLeave)
line:SetScript("OnClick", lineOnClick)
line:SetBackdrop({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1})
line:SetBackdropColor(unpack (scrollbox_line_backdrop_color))
line:SetBackdropBorderColor(0, 0, 0, 1)
local specIcon = line:CreateTexture("$parentSpecIcon", "artwork")
specIcon:SetSize (player_line_height, player_line_height)
specIcon:SetSize(player_line_height, player_line_height)
specIcon:SetAlpha(0.71)
local roleIcon = line:CreateTexture("$parentRoleIcon", "overlay")
roleIcon:SetSize ((player_line_height-2) / 2, (player_line_height-2) / 2)
roleIcon:SetSize((player_line_height-2) / 2, (player_line_height-2) / 2)
roleIcon:SetAlpha(0.71)
local playerName = DF:CreateLabel(line, "", "GameFontNormal")
playerName.textcolor = {1, 1, 1, .9}
playerName.textsize = 11
+7 -1
View File
@@ -835,6 +835,11 @@ local default_profile = {
1, -- [2]
0, -- [3]
},
["SELF"] = {
0.89019, -- [1]
0.32156, -- [2]
0.89019, -- [3]
},
},
death_log_colors = {
@@ -846,12 +851,13 @@ local default_profile = {
},
fade_speed = 0.15,
use_self_color = false,
--> minimap
minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1, text_format = 3},
data_broker_text = "",
--> horcorner
--> hotcorner
hotcorner_topleft = {hide = false},
--> PvP