diff --git a/Libs/LibHotCorners/LibHotCorners.lua b/Libs/LibHotCorners/LibHotCorners.lua
index 13db25d0..4fc846ce 100644
--- a/Libs/LibHotCorners/LibHotCorners.lua
+++ b/Libs/LibHotCorners/LibHotCorners.lua
@@ -8,6 +8,7 @@ end
local LBD = LibStub ("LibDataBroker-1.1")
local debug = false
+local tinsert = tinsert
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> main function
@@ -15,7 +16,8 @@ local debug = false
LibHotCorners.embeds = LibHotCorners.embeds or {}
local embed_functions = {
"RegisterHotCornerButton",
- "HideHotCornerButton"
+ "HideHotCornerButton",
+ "QuickHotCornerEnable"
}
function LibHotCorners:Embed (target)
@@ -39,9 +41,25 @@ local debug = false
end
function LibHotCorners:RegisterHotCornerButton (name, corner, savedtable, fname, icon, tooltip, clickfunc, menus, quickfunc, onenter, onleave)
+
corner = string.lower (corner)
test (corner)
+ if (savedtable and not LibHotCorners.options) then
+ if (not savedtable.__cachedoptions) then
+ savedtable.__cachedoptions = {age = 0, clicks = {}, disabled = {}}
+ end
+ LibHotCorners.options = savedtable.__cachedoptions
+ LibHotCorners.options.age = LibHotCorners.options.age + 1
+ elseif (savedtable) then
+ if (LibHotCorners.options.age < savedtable.__cachedoptions.age) then
+ LibHotCorners.options = savedtable.__cachedoptions
+ LibHotCorners.options.age = LibHotCorners.options.age + 1
+ end
+ end
+
+ savedtable = savedtable or {}
+
tinsert (LibHotCorners [corner], {name = name, fname = fname, savedtable = savedtable, icon = icon, tooltip = tooltip, click = clickfunc, menus = menus, quickfunc = quickclick, onenter = onenter, onleave = onleave})
LibHotCorners [corner].map [name] = #LibHotCorners [corner]
@@ -94,7 +112,7 @@ local debug = false
addon_table.savedtable.hide = value
- print (LibHotCorners, corner)
+ --print (LibHotCorners, corner)
LibHotCorners [corner].is_enabled = false
for index, button_table in ipairs (corner_table) do
@@ -114,7 +132,7 @@ local debug = false
return
end
if (dataobj.icon and dataobj.OnClick and not dataobj.HotCornerIgnore) then
- LibHotCorners:RegisterHotCornerButton (name, "TopLeft", {}, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
+ LibHotCorners:RegisterHotCornerButton (name, "TopLeft", nil, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
end
end
LBD.RegisterCallback (LibHotCorners, "DataBrokerCallback")
@@ -124,12 +142,15 @@ local debug = false
f:SetScript ("OnEvent", function()
for name, dataobj in LBD:DataObjectIterator() do
if (dataobj.type and dataobj.icon and dataobj.OnClick and not dataobj.HotCornerIgnore) then
- LibHotCorners:RegisterHotCornerButton (name, "TopLeft", {}, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
+ LibHotCorners:RegisterHotCornerButton (name, "TopLeft", nil, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
end
end
- --for k, v in pairs (LBD.attributestorage) do
- -- print (k, v.type)
- --end
+ for k, v in pairs (LBD.attributestorage) do
+ --print (k, v)
+ --print ("----------------")
+ --vardump (v)
+
+ end
f:UnregisterEvent ("PLAYER_LOGIN")
end)
@@ -163,6 +184,10 @@ local debug = false
end
--> corner frame on enter
+ local more_clicked = function (t1, t2)
+ return t1[1] > t2[1]
+ end
+
function HotCornersOnEnter (self)
if (not LibHotCorners [self.position].is_enabled) then
return
@@ -172,7 +197,14 @@ local debug = false
local i = 1
+ local sort = {}
for index, button_table in ipairs (LibHotCorners [self.position]) do
+ tinsert (sort, {LibHotCorners.options.clicks [button_table.name] or 0, button_table})
+ end
+ table.sort (sort, more_clicked)
+
+ for index, button_table in ipairs (sort) do
+ button_table = button_table [2]
if (not button_table.widget) then
LibHotCorners:CreateAddonWidget (self, button_table, index, self.position)
end
@@ -247,6 +279,8 @@ local debug = false
self:SetPoint ("topleft", self:GetParent(), "topleft", self.x, -4)
end
if (self.table.click) then
+ LibHotCorners.options.clicks [self.table.name] = LibHotCorners.options.clicks [self.table.name] or 0
+ LibHotCorners.options.clicks [self.table.name] = LibHotCorners.options.clicks [self.table.name] + 1
self.table.click (self, button)
end
end
diff --git a/Libs/NickTag-1.0/NickTag-1.0.lua b/Libs/NickTag-1.0/NickTag-1.0.lua
index f2334d80..af101b17 100644
--- a/Libs/NickTag-1.0/NickTag-1.0.lua
+++ b/Libs/NickTag-1.0/NickTag-1.0.lua
@@ -122,9 +122,13 @@ end
{[[Interface\EncounterJournal\UI-EJ-BOSS-Baelog]], "Baelog"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Baron Ashbury]], "Baron Ashbury"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Baron Silverlaine]], "Baron Silverlaine"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Blood Guard Porung]], "Blood Guard Porung"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Bronjahm]], "Bronjahm"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Brother Korloff]], "Brother Korloff"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Captain Skarloc]], "Captain Skarloc"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Chief Ukorz Sandscalp]], "Chief Ukorz Sandscalp"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Kolurg]], "Commander Kolurg"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Malor]], "Commander Malor"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Sarannis]], "Commander Sarannis"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Springvale]], "Commander Springvale"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Commander Stoutbeard]], "Commander Stoutbeard"},
@@ -138,10 +142,17 @@ end
{[[Interface\EncounterJournal\UI-EJ-BOSS-Empyreal Queens]], "Lu'lin"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Exarch Maladaar]], "Exarch Maladaar"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Fineous Darkvire]], "Fineous Darkvire"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Galdarah]], "Galdarah"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Garajal the Spiritbinder]], "Garajal the Spiritbinder"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Garrosh Hellscream]], "Garrosh Hellscream"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-General Nazgrim]], "General Nazgrim"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Grand Champions-Alliance]], "Grand Champions-Alliance"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Grand Champions-Horde]], "Grand Champions-Horde"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Grand Magus Telestra]], "Grand Magus Telestra"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-HateRel]], "HateRel"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Hazzarah]], "Hazzarah"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Hearthsinger Forresten]], "Hearthsinger Forresten"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Helix Gearbreaker]], "Helix Gearbreaker"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Botanist Freywinn]], "High Botanist Freywinn"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Inquisitor Whitemane]], "High Inquisitor Whitemane"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-High Interrogator Gerstahn]], "High Interrogator Gerstahn"},
@@ -151,12 +162,14 @@ end
{[[Interface\EncounterJournal\UI-EJ-BOSS-Hydromancer Velratha]], "Hydromancer Velratha"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Illyanna Ravenoak]], "Illyanna Ravenoak"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Ingvar the Plunderer]], "Ingvar the Plunderer"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Instructor Galford]], "Instructor Galford"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Instructor Malicia]], "Instructor Malicia"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Interrogator Vishas]], "Interrogator Vishas"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Isiset]], "Isiset"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-JainaProudmoore]], "Jaina Proudmoore"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Jandice Barov]], "Jandice Barov"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Kaelthas Sunstrider]], "Kaelthas Sunstrider"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Kelidan the Breaker]], "Kelidan the Breaker"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Krick]], "Krick"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lady Anacondra]], "Lady Anacondra"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Lady Illucia Barov]], "Lady Illucia Barov"},
@@ -180,12 +193,20 @@ end
{[[Interface\EncounterJournal\UI-EJ-BOSS-Princess Moira Bronzebeard]], "Princess Moira Bronzebeard"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-QueenAzshara]], "Queen Azshara"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Randolph Moloch]], "Randolph Moloch"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Renataki]], "Renataki"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Ribbly Screwspigot]], "Ribbly Screwspigot"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Scarlet Commander Mograine]], "Scarlet Commander Mograine"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Selin Fireheart]], "Selin Fireheart"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Siegecrafter Blackfuse]], "Siegecrafter Blackfuse"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Skarvald the Constructor]], "Skarvald the Constructor"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-Tribunal of the Ages]], "Tribunal of the Ages"},
{[[Interface\EncounterJournal\UI-EJ-BOSS-TyrandeWhisperwind]], "Tyrande Whisperwind"},
- {[[Interface\EncounterJournal\UI-EJ-BOSS-Vanessa VanCleef]], "Vanessa VanCleef"}
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Twilight Lord Kelris]], "Twilight Lord Kelris"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Vanessa VanCleef]], "Vanessa VanCleef"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Vazruden]], "Vazruden"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Warchief Rend Blackhand]], "Warchief Rend Blackhand"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Willey Hopebreaker]], "Willey Hopebreaker"},
+ {[[Interface\EncounterJournal\UI-EJ-BOSS-Witch Doctor Zumrah]], "Witch Doctor Zumrah"},
}
------------------------------------------------------------------------------------------------------------------------------------------------------
--> send and receive functions
diff --git a/Libs/libs.xml b/Libs/libs.xml
index 5bc88c23..17da9d48 100644
--- a/Libs/libs.xml
+++ b/Libs/libs.xml
@@ -9,8 +9,8 @@
-
+
\ No newline at end of file
diff --git a/boot.lua b/boot.lua
index 3fc34917..9a99fb26 100644
--- a/boot.lua
+++ b/boot.lua
@@ -8,9 +8,9 @@
_ = nil
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
- _detalhes.userversion = "v1.13.8a"
+ _detalhes.userversion = "v1.14.0"
_detalhes.version = "Alpha 017"
- _detalhes.realversion = 17
+ _detalhes.realversion = 18
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> initialization stuff
diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua
index 6ff05dce..e32616a7 100644
--- a/classes/classe_damage.lua
+++ b/classes/classe_damage.lua
@@ -64,8 +64,14 @@ local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
+local FormatTooltipNumber = ToKFunctions [8]
+local TooltipMaximizedMethod = 1
+
local CLASS_ICON_TCOORDS = _G.CLASS_ICON_TCOORDS
+local key_overlay = {1, 1, 1, .1}
+local key_overlay_press = {1, 1, 1, .2}
+
local info = _detalhes.janela_info
local keyName
@@ -241,20 +247,13 @@ function atributo_damage:ContainerRefreshDps (container, combat_time)
end
-function _detalhes:ToolTipFrags (instancia, frag, esta_barra)
+function _detalhes:ToolTipFrags (instancia, frag, esta_barra, keydown)
--vardump (frag)
local name = frag [1]
local GameCooltip = GameCooltip
- GameCooltip:Reset()
- GameCooltip:SetType ("tooltip")
- GameCooltip:SetOwner (esta_barra)
- GameCooltip:SetOption ("LeftBorderSize", -5)
- GameCooltip:SetOption ("RightBorderSize", 5)
- GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
-
--> mantendo a função o mais low level possível
local damage_container = instancia.showing [1]
@@ -288,23 +287,39 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra)
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
- GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
- for i = 1, math.min (6, #damage_taken_table) do
+ local min = 6
+ local ismaximized = false
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
+ min = 99
+ ismaximized = true
+ end
+
+ if (ismaximized) then
+ --highlight shift key
+ GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
+ GameCooltip:AddStatusBar (100, 1, .1, .1, .1, 1)
+ else
+ GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
+ GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ end
+
+ for i = 1, math.min (min, #damage_taken_table) do
local t = damage_taken_table [i]
- GameCooltip:AddLine (t [1], _detalhes:comma_value (t [2]))
+ GameCooltip:AddLine (t [1], FormatTooltipNumber (_, t [2]))
local classe = t [3]
if (not classe) then
classe = "UNKNOW"
end
+
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
else
GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
end
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, "white")
@@ -414,7 +429,7 @@ function atributo_damage:ReportSingleVoidZoneLine (actor, instancia)
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
end
-function _detalhes:ToolTipVoidZones (instancia, actor, barra)
+function _detalhes:ToolTipVoidZones (instancia, actor, barra, keydown)
local damage_actor = instancia.showing[1]:PegarCombatente (_, actor.damage_twin)
local habilidade
@@ -460,20 +475,13 @@ function _detalhes:ToolTipVoidZones (instancia, actor, barra)
local GameCooltip = GameCooltip
- GameCooltip:Reset()
- GameCooltip:SetType ("tooltip")
- GameCooltip:SetOwner (barra)
- GameCooltip:SetOption ("LeftBorderSize", -5)
- GameCooltip:SetOption ("RightBorderSize", 5)
- GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
-
for _, alvo in _ipairs (container) do
local minutos, segundos = _math_floor (alvo.uptime / 60), _math_floor (alvo.uptime % 60)
if (minutos > 0) then
- GameCooltip:AddLine (alvo.nome, _detalhes:comma_value (alvo.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
+ GameCooltip:AddLine (alvo.nome, FormatTooltipNumber (_, alvo.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")")
else
- GameCooltip:AddLine (alvo.nome, _detalhes:comma_value (alvo.damage) .. " (" .. segundos .. "s" .. ")")
+ GameCooltip:AddLine (alvo.nome, FormatTooltipNumber (_, alvo.damage) .. " (" .. segundos .. "s" .. ")")
end
local classe = _detalhes:GetClass (alvo.nome)
@@ -483,7 +491,7 @@ function _detalhes:ToolTipVoidZones (instancia, actor, barra)
GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1)
end
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
@@ -1417,8 +1425,7 @@ local barAlha = .6
end
---------> DAMAGE DONE & DPS
-local key_overlay = {1, 1, 1, .1}
-local key_overlay_press = {1, 1, 1, .2}
+
function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
@@ -1431,6 +1438,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
do
--> TOP HABILIDADES
+
+ --get variables
local ActorDamage = self.total_without_pet
local ActorDamageWithPet = self.total
if (ActorDamage == 0) then
@@ -1439,6 +1448,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local ActorSkillsContainer = self.spell_tables._ActorTable
local ActorSkillsSortTable = {}
+ --get time type
local meu_tempo
if (_detalhes.time_type == 1 or not self.grupo) then
meu_tempo = self:Tempo()
@@ -1446,56 +1456,60 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
meu_tempo = self:GetCombatTime()
end
+ --add and sort
for _spellid, _skill in _pairs (ActorSkillsContainer) do
ActorSkillsSortTable [#ActorSkillsSortTable+1] = {_spellid, _skill.total, _skill.total/meu_tempo}
- --local nome_magia, _, icone_magia = _GetSpellInfo (_spellid)
- --print ("==============")
- --print (nome_magia, _skill.total)
end
_table_sort (ActorSkillsSortTable, _detalhes.Sort2)
--> TOP INIMIGOS
+ --get variables
local ActorTargetsContainer = self.targets._ActorTable
local ActorTargetsSortTable = {}
+
+ --add and sort
for _, _target in _ipairs (ActorTargetsContainer) do
ActorTargetsSortTable [#ActorTargetsSortTable+1] = {_target.nome, _target.total}
end
_table_sort (ActorTargetsSortTable, _detalhes.Sort2)
-
+ --tooltip stuff
local tooltip_max_abilities = _detalhes.tooltip_max_abilities
if (instancia.sub_atributo == 2) then
tooltip_max_abilities = 6
end
- if (keydown == "shift") then
+
+ local is_maximized = false
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
tooltip_max_abilities = 99
+ is_maximized = true
end
--> MOSTRA HABILIDADES
GameCooltip:AddLine (Loc ["STRING_SPELLS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875)
- if (tooltip_max_abilities == 99) then
+ if (is_maximized) then
+ --highlight shift key
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
- --habilidades
-
+ --habilidades
if (#ActorSkillsSortTable > 0) then
for i = 1, _math_min (tooltip_max_abilities, #ActorSkillsSortTable) do
local SkillTable = ActorSkillsSortTable [i]
local nome_magia, _, icone_magia = _GetSpellInfo (SkillTable [1])
if (instancia.sub_atributo == 1 or instancia.sub_atributo == 6) then
- GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (SkillTable [2]) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)")
+ GameCooltip:AddLine (nome_magia..": ", FormatTooltipNumber (_, SkillTable [2]) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)")
else
- GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (_math_floor (SkillTable [3])) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)")
+ GameCooltip:AddLine (nome_magia..": ", FormatTooltipNumber (_, _math_floor (SkillTable [3])) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)")
end
GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14)
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
else
GameCooltip:AddLine (Loc ["STRING_NO_SPELL"])
@@ -1506,12 +1520,16 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
local max_targets = _detalhes.tooltip_max_targets
- if (keydown == "ctrl") then
+ local is_maximized = false
+ if (keydown == "ctrl" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 4) then
max_targets = 99
+ is_maximized = true
end
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0, 0.03125, 0.126953125, 0.15625)
- if (max_targets == 99) then
+
+ if (is_maximized) then
+ --highlight
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
@@ -1521,9 +1539,9 @@ 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]..": ", _detalhes:comma_value (este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)")
+ 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:AddStatusBar (100, 1, .1, .1, .1, .2)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
end
end
@@ -1582,11 +1600,17 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local _quantidade = 0
local added_logo = false
+
_table_sort (totais, _detalhes.Sort2)
+ local ismaximized = false
+ if (keydown == "alt" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 5) then
+ ismaximized = true
+ end
+
for index, _table in _ipairs (totais) do
- if (_table [2] > 0 and (index < 3 or keydown == "alt")) then
+ if (_table [2] > 0 and (index < 3 or ismaximized)) then
if (not added_logo) then
added_logo = true
@@ -1594,7 +1618,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
- if (keydown == "alt") then
+ if (ismaximized) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_alt]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
@@ -1606,11 +1630,11 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown)
local n = _table [1]:gsub (("%s%<.*"), "")
if (instancia.sub_atributo == 1) then
- GameCooltip:AddLine (n, _detalhes:comma_value (_table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
+ GameCooltip:AddLine (n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
else
- GameCooltip:AddLine (n, _detalhes:comma_value ( _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
+ GameCooltip:AddLine (n, FormatTooltipNumber (_, _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
end
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
end
@@ -1656,15 +1680,18 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
max = 6
end
- if (keydown == "shift") then
+ local ismaximized = false
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
max = #meus_agressores
+ ismaximized = true
end
GameCooltip:AddLine (Loc ["STRING_FROM"], nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875)
- if (keydown == "shift") then
+ if (ismaximized) then
+ --highlight
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
@@ -1673,7 +1700,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
end
for i = 1, max do
- GameCooltip:AddLine (meus_agressores[i][1]..": ", _detalhes:comma_value (meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
+ GameCooltip:AddLine (meus_agressores[i][1]..": ", FormatTooltipNumber (_, meus_agressores[i][2]).." (".._cstr("%.1f", (meus_agressores[i][2]/damage_taken) * 100).."%)")
local classe = meus_agressores[i][3]
if (not classe) then
@@ -1685,7 +1712,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown)
else
GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
end
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
return true
@@ -1727,16 +1754,18 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.224609375, 0.056640625, 0.140625)
- if (keydown == "shift") then
+ local ismaximized = false
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local max_abilities = _detalhes.tooltip_max_abilities
- if (keydown == "shift") then
+ if (ismaximized) then
max_abilities = 99
end
@@ -1746,9 +1775,9 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
classe = "UNKNOW"
end
- GameCooltip:AddLine (DamagedPlayers[i][1]..": ", _detalhes:comma_value (DamagedPlayers[i][2]).." (".._cstr("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
+ GameCooltip:AddLine (DamagedPlayers[i][1]..": ", FormatTooltipNumber (_, DamagedPlayers[i][2]).." (".._cstr("%.1f", DamagedPlayers[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14)
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
if (classe == "UNKNOW") then
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"]))
@@ -1762,24 +1791,26 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown
GameCooltip:AddIcon ([[Interface\PVPFrame\bg-down-on]], 1, 1, 14, 14, 0, 1, 0, 1)
- if (keydown == "ctrl") then
+ local ismaximized = false
+ if (keydown == "ctrl" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 4) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local max_abilities2 = _detalhes.tooltip_max_abilities
- if (keydown == "ctrl") then
+ if (ismaximized) then
max_abilities2 = 99
end
for i = 1, _math_min (max_abilities2, #Skills) do
local nome, _, icone = _GetSpellInfo (Skills[i][1])
- GameCooltip:AddLine (nome.." (x".. Skills[i][3].."): ", _detalhes:comma_value (Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)")
+ GameCooltip:AddLine (nome.." (x".. Skills[i][3].."): ", FormatTooltipNumber (_, Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)")
GameCooltip:AddIcon (icone, nil, nil, 14, 14)
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
return true
@@ -2818,6 +2849,8 @@ end
--> atualize a funcao de abreviacao
function atributo_damage:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
+ FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
+ TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
--> diminui o total das tabelas do combate
diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua
index 46e11057..1e07bdd5 100644
--- a/classes/classe_energy.lua
+++ b/classes/classe_energy.lua
@@ -65,6 +65,9 @@ local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
+local FormatTooltipNumber = ToKFunctions [8]
+local TooltipMaximizedMethod = 1
+
local info = _detalhes.janela_info
local keyName
@@ -686,11 +689,11 @@ end
---------> TOOLTIPS BIFURCAÇÃO
-function atributo_energy:ToolTip (instancia, numero, barra)
+function atributo_energy:ToolTip (instancia, numero, barra, keydown)
--> seria possivel aqui colocar o icone da classe dele?
--GameCooltip:AddLine (barra.colocacao..". "..self.nome)
if (instancia.sub_atributo <= 4) then
- return self:ToolTipRegenRecebido (instancia, numero, barra)
+ return self:ToolTipRegenRecebido (instancia, numero, barra, keydown)
end
end
--> tooltip locals
@@ -698,7 +701,10 @@ local r, g, b
local headerColor = "yellow"
local barAlha = .6
-function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
+local key_overlay = {1, 1, 1, .1}
+local key_overlay_press = {1, 1, 1, .2}
+
+function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown)
local owner = self.owner
if (owner and owner.classe) then
@@ -720,33 +726,60 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra)
-----------------------------------------------------------------
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
GameCooltip:AddIcon ([[Interface\HELPFRAME\ReportLagIcon-Spells]], 1, 1, 14, 14, 0.21875, 0.78125, 0.21875, 0.78125)
- GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
+
+ local ismaximized = false
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
+ GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
+ GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
+ else
+ GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
+ GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
+ end
local max = #habilidades
if (max > 3) then
max = 3
end
+
+ if (ismaximized) then
+ max = 99
+ end
- for i = 1, max do
+ for i = 1, math.min (#habilidades, max) do
local nome_magia, _, icone_magia = _GetSpellInfo (habilidades[i][1])
- GameCooltip:AddLine (nome_magia..": ", _detalhes:comma_value (habilidades[i][2]).." (".._cstr("%.1f", (habilidades[i][2]/total_regenerado) * 100).."%)")
+ GameCooltip:AddLine (nome_magia..": ", FormatTooltipNumber (_, habilidades[i][2]).." (".._cstr("%.1f", (habilidades[i][2]/total_regenerado) * 100).."%)")
GameCooltip:AddIcon (icone_magia)
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
-----------------------------------------------------------------
+
GameCooltip:AddLine (Loc ["STRING_PLAYERS"], nil, nil, headerColor, nil, 12) --> localiza-me
GameCooltip:AddIcon ([[Interface\HELPFRAME\HelpIcon-HotIssues]], 1, 1, 14, 14, 0.21875, 0.78125, 0.21875, 0.78125)
- GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
+
+ local ismaximized = false
+ if (keydown == "ctrl" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 4) then
+ GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
+ GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
+ else
+ GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
+ GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
+ end
max = #fontes
if (max > 3) then
max = 3
end
- for i = 1, max do
- GameCooltip:AddLine (fontes[i][1]..": ", _detalhes:comma_value (fontes[i][2]).." (".._cstr("%.1f", (fontes[i][2]/total_regenerado) * 100).."%)")
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ if (ismaximized) then
+ max = 99
+ end
+
+ for i = 1, math.min (#fontes, max) do
+ GameCooltip:AddLine (fontes[i][1]..": ", FormatTooltipNumber (_, fontes[i][2]).." (".._cstr("%.1f", (fontes[i][2]/total_regenerado) * 100).."%)")
+ _detalhes:AddTooltipBackgroundStatusbar()
local classe = fontes[i][3]
if (not classe) then
@@ -969,6 +1002,8 @@ end
--> atualize a funcao de abreviacao
function atributo_energy:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
+ FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
+ TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
--> subtract total from a combat table
diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua
index ca9a18c4..2c7d4e91 100644
--- a/classes/classe_heal.lua
+++ b/classes/classe_heal.lua
@@ -61,6 +61,9 @@ local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
+local FormatTooltipNumber = ToKFunctions [8]
+local TooltipMaximizedMethod = 1
+
local info = _detalhes.janela_info
local keyName
@@ -860,27 +863,29 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
- if (keydown == "shift") then
+ local ismaximized = false
+
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
-
_table_sort (meus_curadores, function (a, b) return a[2] > b[2] end)
local max = #meus_curadores
if (max > 6) then
max = 6
end
- if (keydown == "shift") then
+ if (ismaximized) then
max = 99
end
for i = 1, _math_min (max, #meus_curadores) do
- GameCooltip:AddLine (meus_curadores[i][1]..": ", _detalhes:comma_value (meus_curadores[i][2]).." (".._cstr ("%.1f", (meus_curadores[i][2]/total_curado) * 100).."%)")
+ GameCooltip:AddLine (meus_curadores[i][1]..": ", FormatTooltipNumber (_, meus_curadores[i][2]).." (".._cstr ("%.1f", (meus_curadores[i][2]/total_curado) * 100).."%)")
local classe = meus_curadores[i][3]
if (not classe) then
classe = "UNKNOW"
@@ -890,7 +895,7 @@ function atributo_heal:ToolTip_HealingTaken (instancia, numero, barra, keydown)
else
GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe]))
end
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
return true
@@ -898,6 +903,7 @@ end
---------> HEALING DONE / HPS / OVERHEAL
local background_heal_vs_absorbs = {value = 100, color = {1, 1, 0, .25}, specialSpark = false, texture = [[Interface\AddOns\Details\images\bar4_glass]]}
+
function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local owner = self.owner
@@ -944,9 +950,11 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
GameCooltip:AddLine (Loc ["STRING_SPELLS"], nil, nil, headerColor, nil, 12) --> localiza-me
GameCooltip:AddIcon ([[Interface\RAIDFRAME\Raid-Icon-Rez]], 1, 1, 14, 14, 0.109375, 0.890625, 0.0625, 0.90625)
- if (keydown == "shift") then
+ local ismaximized = false
+ if (keydown == "shift" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 3) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
@@ -957,7 +965,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
tooltip_max_abilities = 6
end
- if (keydown == "shift") then
+ if (ismaximized) then
tooltip_max_abilities = 99
end
@@ -966,16 +974,16 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
break
end
if (instancia.sub_atributo == 2) then --> hps
- GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
+ GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", FormatTooltipNumber (_, _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
elseif (instancia.sub_atributo == 3) then --> overheal
local overheal = ActorHealingTable[i][2]
local total = ActorHealingTable[i][6]
- GameCooltip:AddLine (ActorHealingTable[i][4][1] .." (|cFFFF3333" .. _math_floor ( (overheal / (overheal+total)) *100) .. "%|r):", _detalhes:comma_value ( _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
+ GameCooltip:AddLine (ActorHealingTable[i][4][1] .." (|cFFFF3333" .. _math_floor ( (overheal / (overheal+total)) *100) .. "%|r):", FormatTooltipNumber (_, _math_floor (ActorHealingTable[i][5])).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
else
- GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", _detalhes:comma_value (ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
+ GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", FormatTooltipNumber (_, ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)")
end
GameCooltip:AddIcon (ActorHealingTable[i][4][3], nil, nil, 14, 14)
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
end
if (instancia.sub_atributo == 6) then
@@ -991,16 +999,18 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
GameCooltip:AddLine (Loc ["STRING_TARGETS"].."", nil, nil, headerColor, nil, 12)
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TutorialFrame-LevelUp]], 1, 1, 14, 14, 0.10546875, 0.89453125, 0.05859375, 0.6796875)
- if (keydown == "ctrl") then
+ local ismaximized = false
+ if (keydown == "ctrl" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 4) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
+ ismaximized = true
else
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_ctrl]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
end
local tooltip_max_abilities2 = _detalhes.tooltip_max_abilities
- if (keydown == "ctrl") then
+ if (ismaximized) then
tooltip_max_abilities2 = 99
end
@@ -1009,12 +1019,12 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
break
end
- if (tooltip_max_abilities2 == 99 and ActorHealingTargets[i][1]:find (_detalhes.playername)) then
- GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)", nil, "yellow")
+ if (ismaximized and ActorHealingTargets[i][1]:find (_detalhes.playername)) then
+ GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", FormatTooltipNumber (_, ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)", nil, "yellow")
GameCooltip:AddStatusBar (100, 1, .5, .5, .5, .7)
else
- GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", _detalhes:comma_value (ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ GameCooltip:AddLine (ActorHealingTargets[i][1]..": ", FormatTooltipNumber (_, ActorHealingTargets[i][2]) .." (".._cstr ("%.1f", ActorHealingTargets[i][3]).."%)")
+ _detalhes:AddTooltipBackgroundStatusbar()
end
local targetActor = container:PegarCombatente (nil, ActorHealingTargets[i][1])
@@ -1088,9 +1098,14 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
_table_sort (totais, _detalhes.Sort2)
+ local ismaximized = false
+ if (keydown == "alt" or TooltipMaximizedMethod == 2 or TooltipMaximizedMethod == 5) then
+ ismaximized = true
+ end
+
for index, _table in _ipairs (totais) do
- if (_table [2] > 0 and (index < 3 or keydown == "alt")) then
+ if (_table [2] > 0 and (index < 3 or ismaximized)) then
if (not added_logo) then
added_logo = true
@@ -1098,7 +1113,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
GameCooltip:AddIcon ([[Interface\COMMON\friendship-heart]], 1, 1, 14, 14, 0.21875, 0.78125, 0.09375, 0.6875)
- if (keydown == "alt") then
+ if (ismaximized) then
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_alt]], 1, 2, 24, 12, 0, 1, 0, 0.640625, key_overlay_press)
GameCooltip:AddStatusBar (100, 1, r, g, b, 1)
else
@@ -1110,11 +1125,11 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown)
local n = _table [1]:gsub (("%s%<.*"), "")
if (instancia.sub_atributo == 2) then
- GameCooltip:AddLine (n, _detalhes:comma_value ( _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
+ GameCooltip:AddLine (n, FormatTooltipNumber (_, _math_floor (_table [3])) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
else
- GameCooltip:AddLine (n, _detalhes:comma_value (_table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
+ GameCooltip:AddLine (n, FormatTooltipNumber (_, _table [2]) .. " (" .. _math_floor (_table [2]/self.total*100) .. "%)")
end
- GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
+ _detalhes:AddTooltipBackgroundStatusbar()
GameCooltip:AddIcon ([[Interface\AddOns\Details\images\classes_small]], 1, 1, 14, 14, 0.25, 0.49609375, 0.75, 1)
end
end
@@ -1817,6 +1832,8 @@ end
--> atualize a funcao de abreviacao
function atributo_heal:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
+ FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
+ TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
--> subtract total from a combat table
diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua
index 5b602295..541f864d 100644
--- a/classes/classe_instancia.lua
+++ b/classes/classe_instancia.lua
@@ -941,6 +941,9 @@ end
--local skin = fazer aqui o esquema de resgatar a skin salva no profile.
+ new_instance:ChangeSkin ("Minimalistic")
+ new_instance:ChangeSkin ("Default Skin")
+
--> apply standard skin if have one saved
if (_detalhes.standard_skin) then
diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua
index 1a2b66ae..faf8302b 100644
--- a/classes/classe_instancia_include.lua
+++ b/classes/classe_instancia_include.lua
@@ -48,8 +48,6 @@ _detalhes.instance_defaults = {
--show bottom statusbar
show_statusbar = true,
statusbar_info = {alpha = 1, overlay = {1, 1, 1}},
- --blackwhiite icons
- desaturated_menu = false,
--hide main window attribute icon
hide_icon = false,
--anchor side of main window toolbar (1 = top 2 = bottom)
@@ -65,24 +63,32 @@ _detalhes.instance_defaults = {
--sort direction is the direction of results on bars (1 = top to bottom 2 = bottom to top)
bars_sort_direction = 1,
--reset button info
- resetbutton_info = {text_color = {1, 0.82, 0, 1}, text_color_small = {1, 0.82, 0, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}, always_small = false},
+ resetbutton_config = {size = {10, 16}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button]], highlight_texture = [[Interface\Addons\Details\Images\reset_button]], normal_texcoord = {0, 1, 0, 1}, highlight_texcoord = {0, 1, 0, 1}, normal_vertexcolor = {1, 1, 1, 1}, highlight_vertexcolor = {1, 1, 1, 1}},
--instance button info
- instancebutton_info = {text_color = {1, 0.82, 0, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
+ instancebutton_config = {size = {20, 16}, anchor = {2, 0}, highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], textcolor = {1, 1, 1, 1}, textsize = 11, textfont = "Friz Quadrata TT", textshadow = false},
--close button info
- closebutton_info = {color_overlay = {1, 1, 1, 1}},
+ closebutton_config = {size = {18, 18}, anchor = {0, 0}, normal_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Up]], highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], pushed_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Down]]},
--menus:
--anchor store the anchor point of main menu
- menu_anchor = {5, 1, side = 1},
+ 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
+ menu2_anchor = {14, 3}, --close instance erase on top position
+ menu2_anchor_down = {14, 3}, --close instance erase on bottom position
+ --blackwhiite icons
+ desaturated_menu = false, --mode segment attribute report
+ desaturated_menu2 = false, --reset instance close
--icons on menu
- menu_icons = {true, true, true, true},
+ menu_icons = {true, true, true, true}, --mode segment attribute report
+ menu2_icons = {true, true, true}, --reset instance close
--menu icons size multiplicator factor
- menu_icons_size = 1.0,
- --auto hide window borders
- menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1, ignorebars = false},
- --auto hide menu
+ menu_icons_size = 1.0, --mode segment attribute report
+ menu2_icons_size = 1.0, --reset instance close
+ --auto hide menu buttons
auto_hide_menu = {left = false, right = false},
--attribute text
attribute_text = {enabled = false, anchor = {5, 1}, text_face = "Friz Quadrata TT", text_size = 12, text_color = {1, 1, 1, 1}, side = 1, shadow = false},
+ --auto hide window borders statusbar main menu
+ menu_alpha = {enabled = false, iconstoo = true, onenter = 1, onleave = 1, ignorebars = false},
--instance button anchor store the anchor point of instance and delete button
instance_button_anchor = {-27, 1},
--total bar
diff --git a/classes/classe_others.lua b/classes/classe_others.lua
index 52058655..8c334d29 100644
--- a/classes/classe_others.lua
+++ b/classes/classe_others.lua
@@ -65,6 +65,9 @@ local ToKFunctions = _detalhes.ToKFunctions
local SelectedToKFunction = ToKFunctions [1]
local UsingCustomRightText = false
+local FormatTooltipNumber = ToKFunctions [8]
+local TooltipMaximizedMethod = 1
+
local info = _detalhes.janela_info
local keyName
@@ -152,7 +155,7 @@ function atributo_misc:NovaTabela (serial, nome, link)
return _new_miscActor
end
-function _detalhes:ToolTipDead (instancia, morte, esta_barra)
+function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown)
local eventos = morte [1]
local hora_da_morte = morte [2]
@@ -835,35 +838,35 @@ end
---------> TOOLTIPS BIFURCAÇÃO
-function atributo_misc:ToolTip (instancia, numero, barra)
+function atributo_misc:ToolTip (instancia, numero, barra, keydown)
--> seria possivel aqui colocar o icone da classe dele?
GameTooltip:ClearLines()
GameTooltip:AddLine (barra.colocacao..". "..self.nome)
if (instancia.sub_atributo == 3) then --> interrupt
- return self:ToolTipInterrupt (instancia, numero, barra)
+ return self:ToolTipInterrupt (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 1) then --> cc_break
- return self:ToolTipCC (instancia, numero, barra)
+ return self:ToolTipCC (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 2) then --> ress
- return self:ToolTipRess (instancia, numero, barra)
+ return self:ToolTipRess (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 4) then --> dispell
- return self:ToolTipDispell (instancia, numero, barra)
+ return self:ToolTipDispell (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 5) then --> mortes
- return self:ToolTipDead (instancia, numero, barra)
+ return self:ToolTipDead (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 6) then --> defensive cooldowns
- return self:ToolTipDefensiveCooldowns (instancia, numero, barra)
+ return self:ToolTipDefensiveCooldowns (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 7) then --> buff uptime
- return self:ToolTipBuffUptime (instancia, numero, barra)
+ return self:ToolTipBuffUptime (instancia, numero, barra, keydown)
elseif (instancia.sub_atributo == 8) then --> debuff uptime
- return self:ToolTipDebuffUptime (instancia, numero, barra)
+ return self:ToolTipDebuffUptime (instancia, numero, barra, keydown)
end
end
+
--> tooltip locals
local r, g, b
local headerColor = "yellow"
local barAlha = .6
-
function atributo_misc:ToolTipDead (instancia, numero, barra)
local last_dead = self.dead_log [#self.dead_log]
@@ -951,7 +954,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#meus_dispells > 0) then
- for i = 1, _math_min (3, #meus_dispells) do
+ for i = 1, _math_min (25, #meus_dispells) do
local esta_habilidade = meus_dispells[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
@@ -974,7 +977,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#buffs_dispelados > 0) then
- for i = 1, _math_min (3, #buffs_dispelados) do
+ for i = 1, _math_min (25, #buffs_dispelados) do
local esta_habilidade = buffs_dispelados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
@@ -993,7 +996,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra)
end
_table_sort (alvos_dispelados, _detalhes.Sort2)
- for i = 1, _math_min (3, #alvos_dispelados) do
+ for i = 1, _math_min (25, #alvos_dispelados) do
if (alvos_dispelados[i][2] < 1) then
break
end
@@ -1365,7 +1368,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#cooldowns_usados > 0) then
- for i = 1, _math_min (15, #cooldowns_usados) do
+ for i = 1, _math_min (25, #cooldowns_usados) do
local esta_habilidade = cooldowns_usados[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
@@ -1390,7 +1393,7 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#alvos > 0) then
- for i = 1, _math_min (3, #alvos) do
+ for i = 1, _math_min (25, #alvos) do
GameCooltip:AddLine (alvos[i][1]..": ", alvos[i][2], 1, "white", "white")
GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3)
@@ -1517,7 +1520,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#meus_interrupts > 0) then
- for i = 1, _math_min (3, #meus_interrupts) do
+ for i = 1, _math_min (25, #meus_interrupts) do
local esta_habilidade = meus_interrupts[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
@@ -1541,7 +1544,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra)
GameCooltip:AddStatusBar (100, 1, r, g, b, barAlha)
if (#habilidades_interrompidas > 0) then
- for i = 1, _math_min (3, #habilidades_interrompidas) do
+ for i = 1, _math_min (25, #habilidades_interrompidas) do
local esta_habilidade = habilidades_interrompidas[i]
local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1])
GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)")
@@ -1863,6 +1866,8 @@ end
--> atualize a funcao de abreviacao
function atributo_misc:UpdateSelectedToKFunction()
SelectedToKFunction = ToKFunctions [_detalhes.ps_abbreviation]
+ FormatTooltipNumber = ToKFunctions [_detalhes.tooltip.abbreviation]
+ TooltipMaximizedMethod = _detalhes.tooltip.maximize_method
end
diff --git a/core/control.lua b/core/control.lua
index 940266a4..cce5f346 100644
--- a/core/control.lua
+++ b/core/control.lua
@@ -8,6 +8,7 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
+ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local _tempo = time()
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -553,7 +554,6 @@
if (_detalhes.SoloTables.CombatIDLast and _detalhes.SoloTables.CombatIDLast ~= 0) then --> volta os dados da luta anterior
_detalhes.SoloTables.CombatID = _detalhes.SoloTables.CombatIDLast
- _detalhes:RefreshSolo()
else
_detalhes:RefreshSolo()
@@ -900,11 +900,23 @@
local avatarPoint = {"bottomleft", "topleft", -3, -4}
local backgroundPoint = {{"bottomleft", "topleft", 0, -3}, {"bottomright", "topright", 0, -3}}
local textPoint = {"left", "right", -11, -5}
+ local avatarTexCoord = {0, 1, 0, 1}
+
+ function _detalhes:AddTooltipBackgroundStatusbar()
+ GameCooltip:AddStatusBar (100, 1, unpack (_detalhes.tooltip.background))
+ end
function _detalhes:MontaTooltip (frame, qual_barra, keydown)
-
+
+ local GameCooltip = GameCooltip
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
+
+ GameCooltip:SetOption ("TextSize", _detalhes.tooltip.fontsize)
+ GameCooltip:SetOption ("TextFont", _detalhes.tooltip.fontface)
+ GameCooltip:SetOption ("TextColor", _detalhes.tooltip.fontcolor)
+ GameCooltip:SetOption ("TextShadow", _detalhes.tooltip.fontshadow and "OUTLINE")
+
GameCooltip:SetOption ("LeftBorderSize", -5)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("MinWidth", 180)
@@ -919,21 +931,22 @@
--verifica por tooltips especiais:
if (objeto.dead) then --> é uma barra de dead
- return _detalhes:ToolTipDead (self, objeto, esta_barra) --> instância, [morte], barra
+ return _detalhes:ToolTipDead (self, objeto, esta_barra, keydown) --> instância, [morte], barra
elseif (objeto.frags) then
- return _detalhes:ToolTipFrags (self, objeto, esta_barra)
+ return _detalhes:ToolTipFrags (self, objeto, esta_barra, keydown)
elseif (objeto.boss_debuff) then
- return _detalhes:ToolTipVoidZones (self, objeto, esta_barra)
+ return _detalhes:ToolTipVoidZones (self, objeto, esta_barra, keydown)
end
local t = objeto:ToolTip (self, qual_barra, esta_barra, keydown) --> instância, nº barra, objeto barra, keydown
+
if (t) then
if (esta_barra.minha_tabela.serial and esta_barra.minha_tabela.serial ~= "") then
local avatar = NickTag:GetNicknameTable (esta_barra.minha_tabela.serial)
if (avatar) then
if (avatar [2]) then
- GameCooltip:SetBannerImage (1, avatar [2], 80, 40, avatarPoint, nil, nil) --> overlay [2] avatar path
+ GameCooltip:SetBannerImage (1, avatar [2], 80, 40, avatarPoint, avatarTexCoord, nil) --> overlay [2] avatar path
end
if (avatar [4]) then
GameCooltip:SetBannerImage (2, avatar [4], 200, 55, backgroundPoint, avatar [5], avatar [6]) --> background
@@ -944,7 +957,7 @@
end
end
- return GameCooltip:ShowCooltip()
+ GameCooltip:ShowCooltip()
end
end
diff --git a/core/parser.lua b/core/parser.lua
index ab9f9a17..5229e6c2 100644
--- a/core/parser.lua
+++ b/core/parser.lua
@@ -627,8 +627,8 @@
--> group checks
if (este_jogador.grupo) then
- _current_combat.totals_grupo[2] = _current_combat.totals_grupo[2]+amount
- _overall_combat.totals_grupo[2] = _overall_combat.totals_grupo[2]+amount
+ _current_combat.totals_grupo[2] = _current_combat.totals_grupo[2] + cura_efetiva
+ _overall_combat.totals_grupo[2] = _overall_combat.totals_grupo[2] + cura_efetiva
end
if (jogador_alvo.grupo) then
diff --git a/core/plugins_solo.lua b/core/plugins_solo.lua
index 2575ed34..882bdcfe 100644
--- a/core/plugins_solo.lua
+++ b/core/plugins_solo.lua
@@ -35,13 +35,6 @@
_detalhes.SoloTables.Attribute = SoloInstance.atributo
end
- --> details can call a refresh for an plugin window
- function _detalhes:RefreshSolo()
- if (_detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Refresh) then
- _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Refresh (nil, SoloInstance)
- end
- end
-
--> enable and disable Solo Mode for an Instance
function _detalhes:SoloMode (show)
if (show) then
@@ -104,6 +97,9 @@
else
+ --print ("--------------------------------")
+ --print (debugstack())
+
if (_detalhes.PluginCount.SOLO > 0) then
local solo_frame = _detalhes.SoloTables.Plugins [_detalhes.SoloTables.Mode].Frame
if (solo_frame) then
@@ -152,9 +148,7 @@
_detalhes.SoloTables.SpellCastTable = {} --> not used
_detalhes.SoloTables.TimeTable = {} --> not used
-
-
_detalhes.SoloTables.Mode = _detalhes.SoloTables.Mode or 1 --> solo mode
function _detalhes.SoloTables:GetActiveIndex()
@@ -203,15 +197,6 @@
return true
end
- function _detalhes:SoloCastTime (spell, start, tempo)
- if (start) then
- _detalhes.CastStart = tempo
- else
- local tempoGasto = _detalhes.CastStart - tempo
- _detalhes.CastStart = nil
- end
- end
-
function _detalhes:CloseSoloDebuffs()
local SoloDebuffUptime = _detalhes.tabela_vigente.SoloDebuffUptime
if (not SoloDebuffUptime) then
@@ -274,6 +259,7 @@
instancia = self
end
+
if (instancia.modo == modo_alone) then
--print ("arrumando a instancia "..instancia.meu_id)
if (instancia.iniciada) then
diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua
index dfafc594..8607b242 100644
--- a/core/plugins_statusbar.lua
+++ b/core/plugins_statusbar.lua
@@ -190,7 +190,9 @@
_detalhes.StatusBar:SetLeftPlugin (instance, instance.StatusBar.left)
end
end
+
+
--> select a new plugin in for an instance anchor
local ChoosePlugin = function (_, _, index, current_child, anchor)
@@ -262,6 +264,14 @@
end
+ function _detalhes.StatusBar:SetPlugin (instance, absolute_name, anchor)
+ local index = _detalhes.StatusBar:GetIndexFromAbsoluteName (absolute_name)
+ if (index and anchor) then
+ anchor = string.lower (anchor)
+ ChoosePlugin (nil, nil, index, instance.StatusBar [anchor], anchor)
+ end
+ end
+
--> on enter
local onEnterCooltipTexts = {
{text = "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:14:14:0:1:512:512:8:70:224:306|t " .. Loc ["STRING_PLUGIN_TOOLTIP_LEFTBUTTON"]},
@@ -1009,10 +1019,10 @@ do
local myframe = _detalhes.StatusBar:CreateChildFrame (instance, "DetailsClockInstance"..instance:GetInstanceId(), DEFAULT_CHILD_WIDTH, DEFAULT_CHILD_HEIGHT)
--> we place custom frame, widgets inside this function
- local texture = myframe:CreateTexture (nil, "overlay")
- texture:SetTexture ("Interface\\AddOns\\Details\\images\\clock")
- texture:SetPoint ("right", myframe.text.widget, "left")
- myframe.texture = texture
+ --local texture = myframe:CreateTexture (nil, "overlay")
+ --texture:SetTexture ("Interface\\AddOns\\Details\\images\\clock")
+ --texture:SetPoint ("right", myframe.text.widget, "left")
+ --myframe.texture = texture
local new_child = _detalhes.StatusBar:CreateChildTable (instance, Clock, myframe)
diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua
index 0a8fdd49..d1eeb7a3 100644
--- a/core/plugins_toolbar.lua
+++ b/core/plugins_toolbar.lua
@@ -195,9 +195,6 @@
local instance = _detalhes:GetInstance (lower_instance)
- _detalhes:ResetButtonSnapTo (instance)
- _detalhes.ResetButtonInstance = lower_instance
-
if (not just_refresh) then
for _, instancia in pairs (_detalhes.tabela_instancias) do
if (instancia.baseframe and instancia:IsAtiva()) then
diff --git a/core/util.lua b/core/util.lua
index 8c32a4a5..0ee505f8 100644
--- a/core/util.lua
+++ b/core/util.lua
@@ -106,8 +106,14 @@
function _detalhes:NoToK (numero)
return numero
end
+ --> put points in numbers
+ -- thanks http://richard.warburton.it
+ function _detalhes:comma_value(n)
+ local left,num,right = _string_match (n,'^([^%d]*%d)(%d*)(.-)$')
+ return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right
+ end
- _detalhes.ToKFunctions = {_detalhes.NoToK, _detalhes.ToK, _detalhes.ToK2, _detalhes.ToK0, _detalhes.ToKMin, _detalhes.ToK2Min, _detalhes.ToK0Min}
+ _detalhes.ToKFunctions = {_detalhes.NoToK, _detalhes.ToK, _detalhes.ToK2, _detalhes.ToK0, _detalhes.ToKMin, _detalhes.ToK2Min, _detalhes.ToK0Min, _detalhes.comma_value}
function string:ReplaceData (...)
local args = {...}
@@ -170,13 +176,6 @@
return unpack (values)
end
- --> put points in numbers
- -- thanks http://richard.warburton.it
- function _detalhes:comma_value(n)
- local left,num,right = _string_match (n,'^([^%d]*%d)(%d*)(.-)$')
- return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right
- end
-
--> trim thanks from http://lua-users.org/wiki/StringTrim
function _detalhes:trim (s)
local from = s:match"^%s*()"
@@ -259,6 +258,7 @@
function _detalhes:EstaEmCombate()
_detalhes:TimeDataTick()
+ _detalhes:BrokerTick()
if (_detalhes.zone_type == "pvp" or _InCombatLockdown()) then
return true
@@ -278,7 +278,6 @@
end
end
- LastDps = 0
_detalhes:SairDoCombate()
end
diff --git a/core/windows.lua b/core/windows.lua
index c9382744..ffe19c2e 100644
--- a/core/windows.lua
+++ b/core/windows.lua
@@ -312,26 +312,6 @@
if (self.mostrando == "normal") then --> somente alterar o tamanho das barras se tiver mostrando o gump normal
- if (self.meu_id == _detalhes.ResetButtonInstance) then
- if (self.baseframe:GetWidth() < 215 or self.resetbutton_info.always_small) then
- gump:Fade (_detalhes.ResetButton, 1)
- gump:Fade (_detalhes.ResetButton2, 0)
-
- local alpha = self:GetInstanceCurrentAlpha()
- _detalhes.ResetButton2:SetAlpha (alpha)
-
- _detalhes.ResetButtonMode = 2
- else
- gump:Fade (_detalhes.ResetButton, 0)
- gump:Fade (_detalhes.ResetButton2, 1)
-
- local alpha = self:GetInstanceCurrentAlpha()
- _detalhes.ResetButton2:SetAlpha (alpha)
-
- _detalhes.ResetButtonMode = 1
- end
- end
-
if (not self.baseframe.isStretching and self.stretchToo and #self.stretchToo > 0) then
if (self.eh_horizontal or self.eh_tudo or (self.verticalSnap and not self.eh_vertical)) then
for _, instancia in _ipairs (self.stretchToo) do
@@ -825,6 +805,18 @@
end
end
+ function f:TextConfig (fontsize, fontface, fontcolor)
+ for i = 1, 5 do
+
+ local line = f.lines [i]
+
+ _detalhes:SetFontSize (line, fontsize or 9)
+ _detalhes:SetFontFace (line, fontface or [[Fonts\FRIZQT__.TTF]])
+ _detalhes:SetFontColor (line, fontcolor or {.9, .9, .9, 1})
+
+ end
+ end
+
function f:SetBubbleText (line1, line2, line3, line4, line5)
if (not line1) then
for _, line in ipairs (f.lines) do
@@ -846,6 +838,7 @@
function f:SetOwner (frame, myPoint, hisPoint, x, y, alpha)
f:ClearAllPoints()
+ f:TextConfig()
f:SetBubbleText (nil)
t:SetTexCoord (0.7373046875, 0.9912109375, 0.6416015625, 0.7978515625)
f.isHorizontalFlipped = false
diff --git a/framework/cooltip.lua b/framework/cooltip.lua
index 8b5f8398..f173554c 100644
--- a/framework/cooltip.lua
+++ b/framework/cooltip.lua
@@ -88,6 +88,7 @@ function DetailsCreateCoolTip()
["TextSize"] = true,
["TextFont"] = true,
["TextColor"] = true,
+ ["TextShadow"] = true,
["LeftTextWidth"] = true,
["RightTextWidth"] = true,
["LeftTextHeight"] = true,
@@ -129,6 +130,7 @@ function DetailsCreateCoolTip()
["TextSize"] = nil,
["TextFont"] = nil,
["TextColor"] = nil,
+ ["TextShadow"] = nil,
["LeftTextWidth"] = nil,
["RightTextWidth"] = nil,
["LeftTextHeight"] = nil,
@@ -636,13 +638,15 @@ function DetailsCreateCoolTip()
menuButton.leftText:SetHeight (0)
end
- if (CoolTip.OptionsTable.TextFont and not leftTextTable [7]) then
+ if (CoolTip.OptionsTable.TextFont and not leftTextTable [7]) then --font
if (_G [CoolTip.OptionsTable.TextFont]) then
menuButton.leftText:SetFontObject (GameFontRed or CoolTip.OptionsTable.TextFont)
else
local font = SharedMedia:Fetch ("font", CoolTip.OptionsTable.TextFont)
local _, size, flags = menuButton.leftText:GetFont()
+ flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
+ size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.leftText:SetFont (font, size, flags)
end
@@ -650,18 +654,20 @@ function DetailsCreateCoolTip()
if (_G [leftTextTable [7]]) then
menuButton.leftText:SetFontObject (leftTextTable [7])
local face, size, flags = menuButton.leftText:GetFont()
+ flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.leftText:SetFont (face, size, flags)
else
local font = SharedMedia:Fetch ("font", leftTextTable [7])
local face, size, flags = menuButton.leftText:GetFont()
+ flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.leftText:SetFont (face, size, flags)
end
else
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or 10
face = leftTextTable [7] or [[Fonts\FRIZQT__.TTF]]
- flags = leftTextTable [8]
+ flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
menuButton.leftText:SetFont (face, size, flags)
end
@@ -707,6 +713,8 @@ function DetailsCreateCoolTip()
else
local font = SharedMedia:Fetch ("font", CoolTip.OptionsTable.TextFont)
local _, size, flags = menuButton.rightText:GetFont()
+ flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
+ size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.rightText:SetFont (font, size, flags)
end
@@ -714,11 +722,13 @@ function DetailsCreateCoolTip()
if (_G [rightTextTable [7]]) then
menuButton.rightText:SetFontObject (rightTextTable [7])
local face, size, flags = menuButton.rightText:GetFont()
+ flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.rightText:SetFont (face, size, flags)
else
local font = SharedMedia:Fetch ("font", rightTextTable [7])
local face, size, flags = menuButton.rightText:GetFont()
+ flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.rightText:SetFont (face, size, flags)
end
@@ -726,7 +736,7 @@ function DetailsCreateCoolTip()
else
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or 10
face = rightTextTable [7] or [[Fonts\FRIZQT__.TTF]]
- flags = rightTextTable [8]
+ flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
menuButton.rightText:SetFont (face, size, flags)
end
diff --git a/framework/dropdown.lua b/framework/dropdown.lua
index 8da08a82..388838e7 100644
--- a/framework/dropdown.lua
+++ b/framework/dropdown.lua
@@ -278,6 +278,8 @@ local DropDownMetaFunctions = {}
------------------------------------------------------------------------------------------------------------
--> scripts
+local last_opened = false
+
local function isOptionVisible (thisOption)
if (_type (thisOption.shown) == "boolean" or _type (thisOption.shown) == "function") then
if (not thisOption.shown) then
@@ -289,23 +291,116 @@ local function isOptionVisible (thisOption)
return true
end
-function DropDownMetaFunctions:Select (optionName, byOptionNumber)
+function DropDownMetaFunctions:Refresh()
local menu = self.func()
+ if (#menu == 0) then
+ self:NoOption (true)
+ self.no_options = true
+ return false
+ elseif (self.no_options) then
+ self.no_options = false
+ self:NoOption (false)
+ self:NoOptionSelected()
+ return true
+ end
+
+ return true
+end
+
+function DropDownMetaFunctions:NoOptionSelected()
+ self.label:SetText (self.empty_text or "no option selected")
+ self.label:SetTextColor (1, 1, 1, 0.4)
+ if (self.empty_icon) then
+ self.icon:SetTexture (self.empty_icon)
+ else
+ self.icon:SetTexture ([[Interface\COMMON\UI-ModelControlPanel]])
+ self.icon:SetTexCoord (0.625, 0.78125, 0.328125, 0.390625)
+ end
+ self.icon:SetVertexColor (1, 1, 1, 0.4)
+
+ self.last_select = nil
+end
+
+function DropDownMetaFunctions:NoOption (state)
+ if (state) then
+ self:Disable()
+ self:SetAlpha (0.5)
+
+ self.label:SetText ("no options")
+ self.label:SetTextColor (1, 1, 1, 0.4)
+ self.icon:SetTexture ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]])
+ self.icon:SetTexCoord (0, 1, 0, 1)
+ self.icon:SetVertexColor (1, 1, 1, 0.4)
+ else
+ self:Enable()
+ self:SetAlpha (1)
+ end
+end
+
+function DropDownMetaFunctions:Select (optionName, byOptionNumber)
+
+ if (type (optionName) == "boolean" and not optionName) then
+ self:NoOptionSelected()
+ return false
+ end
+
+ local menu = self.func()
+
+ if (#menu == 0) then
+ self:NoOption (true)
+ return true
+ else
+ self:NoOption (false)
+ end
if (byOptionNumber and type (optionName) == "number") then
- --print ("selected", optionName)
- return self:Selected (menu [optionName])
+ if (not menu [optionName]) then --> invalid index
+ self:NoOptionSelected()
+ return false
+ end
+ self:Selected (menu [optionName])
+ return true
end
for _, thisMenu in ipairs (menu) do
if (thisMenu.label == optionName and isOptionVisible (thisMenu)) then
- return self:Selected (thisMenu)
+ self:Selected (thisMenu)
+ return true
end
end
+
+ return false
+end
+
+function DropDownMetaFunctions:SetEmptyTextAndIcon (text, icon)
+ if (text) then
+ self.empty_text = text
+ end
+ if (icon) then
+ self.empty_icon = icon
+ end
+
+ self:Selected (self.last_select)
end
function DropDownMetaFunctions:Selected (_table)
+ if (not _table) then
+
+ --> there is any options?
+ if (not self:Refresh()) then
+ self.last_select = nil
+ return
+ end
+
+ --> exists options but none selected
+ self:NoOptionSelected()
+ return
+ end
+
+ self.last_select = _table
+ self:NoOption (false)
+
self.label:SetText (_table.label)
self.icon:SetTexture (_table.icon)
@@ -337,9 +432,9 @@ function DropDownMetaFunctions:Selected (_table)
end
if (_table.font) then
- self.label:SetFont (_table.font, 10.5)
+ self.label:SetFont (_table.font, 10)
else
- self.label:SetFont ("GameFontHighlightSmall", 10.5)
+ self.label:SetFont ("GameFontHighlightSmall", 10)
end
self:SetValue (_table.value)
@@ -368,6 +463,10 @@ function DropDownMetaFunctions:Open()
self.dropdown.dropdownborder:Show()
self.dropdown.arrowTexture:SetTexture ("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Down")
self.opened = true
+ if (last_opened) then
+ last_opened:Close()
+ end
+ last_opened = self
end
function DropDownMetaFunctions:Close()
@@ -383,6 +482,7 @@ function DropDownMetaFunctions:Close()
selectedTexture:Hide()
self.opened = false
+ last_opened = false
end
--> close by escape key
@@ -799,24 +899,16 @@ function gump:NewDropDown (parent, container, name, member, w, h, func, default)
_setmetatable (DropDownObject, DropDownMetaFunctions)
--> initialize first menu selected
- local menu = func()
+
if (type (default) == "string") then
DropDownObject:Select (default)
- else
- for i = default, #menu do
- local _table = menu [i]
- if (not _table) then
- break
- end
- if (isOptionVisible (_table)) then
- DropDownObject:Selected (_table)
- break
- end
+
+ elseif (type (default) == "number") then
+ if (not DropDownObject:Select (default)) then
+ DropDownObject:Select (default, true)
end
end
-
-
return DropDownObject
end
\ No newline at end of file
diff --git a/framework/dropdown.xml b/framework/dropdown.xml
index 85e878ee..c1f28ade 100644
--- a/framework/dropdown.xml
+++ b/framework/dropdown.xml
@@ -30,14 +30,17 @@
-
+
+
+
-
+
+
diff --git a/framework/panel.lua b/framework/panel.lua
index 46b1a514..3ad5605c 100644
--- a/framework/panel.lua
+++ b/framework/panel.lua
@@ -163,24 +163,28 @@ local APIFrameFunctions
--> methods
--> right click to close
- function PanelMetaFunctions:CreateRightClickLabel (textType, w, h)
+ function PanelMetaFunctions:CreateRightClickLabel (textType, w, h, close_text)
local text
w = w or 20
h = h or 20
- if (textType) then
- textType = string.lower (textType)
- if (textType == "short") then
- text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
- elseif (textType == "medium") then
- text = Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"]
- elseif (textType == "large") then
- text = Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"]
- end
+ if (close_text) then
+ text = close_text
else
- text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
+ if (textType) then
+ textType = string.lower (textType)
+ if (textType == "short") then
+ text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
+ elseif (textType == "medium") then
+ text = Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"]
+ elseif (textType == "large") then
+ text = Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"]
+ end
+ else
+ text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
+ end
end
-
+
return gump:NewLabel (self, _, "$parentRightMouseToClose", nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:"..w..":"..h..":0:1:512:512:8:70:328:409|t " .. text)
end
diff --git a/functions/profiles.lua b/functions/profiles.lua
index 0f506990..27228c4d 100644
--- a/functions/profiles.lua
+++ b/functions/profiles.lua
@@ -491,11 +491,11 @@ local default_profile = {
0.23, -- [3]
},
},
-
+
--> minimap
- minimap = {hide = false, radius = 160, minimapPos = 220},
+ minimap = {hide = false, radius = 160, minimapPos = 220, onclick_what_todo = 1, text_type = 1},
--> horcorner
- hotcorner_topleft = {hide = false, topleft_quick_click = true},
+ hotcorner_topleft = {hide = false, onclick_what_todo = 1, quickclick = true, quickclick_what_todo = 2},
--> PvP
only_pvp_frags = false,
@@ -568,9 +568,9 @@ local default_profile = {
--> skins
standard_skin = false, --?
skin = "Default Skin", --?
- --> modes
-
- --> switch
+
+ --> tooltip
+ tooltip = {fontface = "Friz Quadrata TT", fontsize = 10, fontcolor = {1, 1, 1, 1}, fontshadow = false, background = {.1, .1, .1, .3}, abbreviation = 8, maximize_method = 1, commands = {}},
}
diff --git a/functions/skins.lua b/functions/skins.lua
index 4eec6da1..214f07b0 100644
--- a/functions/skins.lua
+++ b/functions/skins.lua
@@ -35,6 +35,7 @@ local _
version = "1.0",
site = "unknown",
desc = "default skin for Details!",
+
can_change_alpha_head = false,
icon_anchor_main = {-1, 1},
icon_anchor_plugins = {-9, -7},
@@ -43,17 +44,43 @@ local _
-- the four anchors:
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
- close_button_anchor = {5, -7},
right_corner_anchor = {96, 0},
icon_point_anchor_bottom = {-37, 0},
left_corner_anchor_bottom = {-107, 0},
- close_button_anchor_bottom = {5, 6},
right_corner_anchor_bottom = {96, 0},
+ micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE"},
+
instance_cprops = {
- menu_anchor = {5, 1},
+
+ hide_icon = false,
+ menu_anchor = {5, -1, side = 1},
+ menu_anchor_down = {5, -1},
+ menu2_anchor = {37, 10},
+ menu2_anchor_down = {22, -6},
+ menu_icons_size = 1,
plugins_grow_direction = 2,
+ bg_alpha = 0.5,
+
+ --instance button
+ instancebutton_config = {size = {22, 14}, anchor = {-2, -1}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT",
+ normal_texture = [[Interface\AddOns\Details\images\skins\default_skin]],
+ normal_texcoord = {0.0087890625, 0.0322265625, 0.4140625, 0.4296875},
+ highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]],
+ pushed_texture = [[Interface\AddOns\Details\images\skins\default_skin]],
+ pushed_texcoord = {0.0673828125, 0.0908203125, 0.4140625, 0.4296875}
+ },
+ --reset button
+ resetbutton_config = {size = {22, 14}, anchor = {1, 0},
+ normal_texture = [[Interface\AddOns\Details\images\skins\default_skin]],
+ normal_texcoord = {0.0380859375, 0.0615234375, 0.4140625, 0.4296875},
+ highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]],
+ pushed_texture = [[Interface\AddOns\Details\images\skins\default_skin]],
+ pushed_texcoord = {0.0966796875, 0.1201171875, 0.4140625, 0.4296875}
+ },
+ --close button
+ closebutton_config = {size = {32, 32}},
}
})
@@ -72,51 +99,45 @@ local _
icon_anchor_plugins = {-7, -13},
icon_plugins_size = {19, 18},
- -- the four anchors:
+ --anchors:
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
- close_button_anchor = {4, -3},
right_corner_anchor = {96, 0},
icon_point_anchor_bottom = {-37, 12},
left_corner_anchor_bottom = {-107, 0},
- close_button_anchor_bottom = {5, 3},
right_corner_anchor_bottom = {96, 0},
- close_button_size = {24, 24},
-
- --reset button
- reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375},
- reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
-
- --instance button
- instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
-
--overwrites
instance_cprops = {
hide_icon = true,
- menu_anchor = {-81, 2, side = 2},
- instance_button_anchor = {-12, 3},
- instancebutton_info = {text_color = {.8, .6, .0, 0.8}, text_face = "Friz Quadrata TT", text_size = 10, color_overlay = {1, 1, 1, 1}},
- resetbutton_info = {text_color = {.8, .8, .8, 0.8}, text_color_small = {0, 0, 0, 0}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}, always_small = true},
+
+ menu_anchor = {-55, -1, side = 2},
+ menu_anchor_down = {-55, -1},
+ menu2_anchor = {32, 2},
+ menu2_anchor_down = {32, 2},
+
+ menu_icons_size = 0.8,
+ plugins_grow_direction = 1,
+
+ instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
+ resetbutton_config = {size = {8, 16}, anchor = {1, 0}},
+ closebutton_config = {size = {17, 17}},
+
show_sidebars = false,
show_statusbar = false,
color = {.3, .3, .3, 1},
bg_alpha = 0.2,
- plugins_grow_direction = 1,
+
row_info = {
texture = "Blizzard Character Skills Bar",
font_face = "Arial Narrow",
},
- attribute_text = {enabled = true, side = 1, text_size = 12, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"},
+ attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 3}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"},
},
callback = function (skin, instance, just_updating)
- DetailsResetButton2Text2:SetText ("")
-
- if (not just_updating and not instance:IsLowerInstance()) then
- instance:MenuAnchor (-64)
- end
+ --none
end,
})
@@ -128,9 +149,10 @@ local _
site = "unknown",
desc = "a simple skin with opaque colors.",
- micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10},
+ micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10, left = "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE"},
can_change_alpha_head = true,
+
icon_anchor_main = {-1, -5},
icon_anchor_plugins = {-7, -13},
icon_plugins_size = {19, 18},
@@ -138,19 +160,33 @@ local _
-- the four anchors:
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
- close_button_anchor = {3, -5},
right_corner_anchor = {96, 0},
icon_point_anchor_bottom = {-37, 12},
left_corner_anchor_bottom = {-107, 0},
- close_button_anchor_bottom = {5, 6},
right_corner_anchor_bottom = {96, 0},
- close_button_size = {26, 26},
-
instance_cprops = {
- resetbutton_info = {always_small = true},
- instance_button_anchor = {-19, 1},
+
+ row_info = {
+ textL_outline = false,
+ textR_outline = false,
+ texture = "Blizzard Character Skills Bar",
+ texture_background = "Details Serenity",
+ texture_background_class_color = false,
+ fixed_texture_background_color = {0, 0, 0, .2},
+ },
+
+ menu_anchor = {2, -2, side = 1},
+ menu_anchor_down = {2, -4},
+ menu2_anchor = {32, 2},
+ menu2_anchor_down = {32, 2},
+
+ instancebutton_config = {size = {20, 16}, anchor = {5, 1}, textcolor = {.9, .9, .9, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
+ resetbutton_config = {size = {8, 16}, anchor = {1, -1}},
+
+ bg_alpha = 0.3,
+
}
})
@@ -174,30 +210,16 @@ local _
icon_plugins_size = {19, 18},
--micro frames
- micro_frames = {color = {.7, .7, .7, 1}, font = "Arial Narrow", size = 11},
-
- --reset button
- reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375},
- reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
- reset_button_small_size = {14, 12},
-
- --instance button
- instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
-
- --close button
- close_button_coords = {0.01904296875, 0.03369140625, 0.52197265625, 0.53662109375},
- close_button_size = {18, 18},
-
+ micro_frames = {color = {.7, .7, .7, 1}, font = "Arial Narrow", size = 11, left = "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE"},
+
-- the four anchors (for when the toolbar is on the top side)
icon_point_anchor = {-37, 0},
left_corner_anchor = {-107, 0},
- close_button_anchor = {-2, 0},
right_corner_anchor = {96, 0},
-- the four anchors (for when the toolbar is on the bottom side)
icon_point_anchor_bottom = {-37, 12},
left_corner_anchor_bottom = {-107, 0},
- close_button_anchor_bottom = {-2, 0},
right_corner_anchor_bottom = {96, 0},
--[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]]
@@ -221,17 +243,23 @@ local _
texture_background_class_color = false,
fixed_texture_background_color = {0, 0, 0, .2},
},
- resetbutton_info = {text_color = {0.7, 0.7, 0.7, 1}, text_color_small = {0, 0, 0, 0}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
- instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
- menu_anchor = {-18, 1},
- instance_button_anchor = {-27, 3},
+
+ instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
+ resetbutton_config = {size = {8, 16}, anchor = {1, 0}},
+ closebutton_config = {size = {22, 22}},
+
+ menu_anchor = {-19, -1, side = 1},
+ menu_anchor_down = {-58, 0},
+ menu2_anchor = {32, 5},
+ menu2_anchor_down = {32, 2},
+
hide_icon = true,
bg_alpha = 0.3,
wallpaper = {
enabled = true,
width = 244.0000362689358,
height = 96.00000674770899,
- texcoord = {0.001000000014901161, 0.3424842834472656, 0.5739999771118164, 1},
+ texcoord = {0.001000000014901161, 0.3424842834472656, 1, 0.5739999771118164},
overlay = {0, 0, 0, 0.498038113117218},
anchor = "all",
alpha = 0.4980392451398075,
@@ -384,32 +412,14 @@ local _
--micro frames
micro_frames = {color = {0.525490, 0.525490, 0.525490, 1}, font = "Arial Narrow", size = 11},
- --reset button
- reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375},
- --reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375},
- reset_button_small_coords = {0.1162109375, 0.13671875, 0.50390625, 0.5146484375+0.00048828125+0.00048828125}, -- 119 516 140 527
- reset_button_small_size = {22, 12},
- --instance button
- --instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625},
- instance_button_coords = {0.0185546875, 0.046875+0.00048828125, 0.4833984375, 0.498046875+0.00048828125},--19 495 48 510
- instance_button_size = 12,
- --0.00048828125
-
- --close button
- close_button_coords = {0.01904296875, 0.03369140625, 0.52197265625, 0.53662109375},
- close_button_size = {18, 18},
- reset_button_small_size = {22, 15},
-
-- the four anchors (for when the toolbar is on the top side)
icon_point_anchor = {-35, -0.5},
left_corner_anchor = {-107, 0},
- close_button_anchor = {-2, 0},
right_corner_anchor = {96, 0},
-- the four anchors (for when the toolbar is on the bottom side)
icon_point_anchor_bottom = {-37, 12},
left_corner_anchor_bottom = {-107, 0},
- close_button_anchor_bottom = {-2, 0},
right_corner_anchor_bottom = {96, 0},
--[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]]
@@ -423,13 +433,27 @@ 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 = {
- resetbutton_info = {text_color = {0.7, 0.7, 0.7, 1}, text_color_small = {0, 0, 0, 0}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}, always_small = true},
- instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}},
- menu_anchor = {-20, 1},
- instance_button_anchor = {-17, 3},
+
+ instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]},
+ resetbutton_config = {size = {8, 16}, anchor = {1, 0}},
+ closebutton_config = {size = {17, 17}},
+
+ menu_icons_size = 0.85,
+ menu_anchor = {-58, 0, side = 2},
+ menu_anchor_down = {-58, 0},
+ menu2_anchor = {32, 2},
+ menu2_anchor_down = {32, 2},
+ plugins_grow_direction = 1,
+
+ attribute_text = {enabled = true, anchor = {-20, 4}, text_face = "Friz Quadrata TT", text_size = 10, text_color = {1, 1, 1, .7}, side = 1, shadow = true},
+
hide_icon = true,
desaturated_menu = true,
+ desaturated_menu2 = true,
+
bg_alpha = 0.3,
+ show_statusbar = false,
+
row_info = {
texture = "Details Serenity",
texture_class_colors = true,
@@ -447,7 +471,7 @@ local _
enabled = true,
anchor = "all",
height = 89.00001440917025,
- alpha = 0.6,
+ alpha = 0.8,
texture = "Interface\\Glues\\CREDITS\\Badlands3",
}
}
diff --git a/functions/timedata.lua b/functions/timedata.lua
index 7ef1e711..b1035394 100644
--- a/functions/timedata.lua
+++ b/functions/timedata.lua
@@ -223,4 +223,24 @@
end
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+--> broker dps stuff
+
+ function _detalhes:BrokerTick()
+ local texttype = _detalhes.minimap.text_type
+ if (texttype == 1) then --dps
+ _detalhes.databroker.text = _detalhes.tabela_vigente.totals_grupo[1]
+
+ elseif (texttype == 2) then --hps
+ _detalhes.databroker.text = _detalhes.tabela_vigente.totals_grupo[2]
+
+ else
+ if (_detalhes.minimap.text_func) then
+ _detalhes.databroker.text = _detalhes.minimap.text_func()
+ else
+ _detalhes.databroker.text = 0
+ end
+ end
+
+ end
\ No newline at end of file
diff --git a/gumps/fw_mods.lua b/gumps/fw_mods.lua
index 696eddb3..50a58dea 100644
--- a/gumps/fw_mods.lua
+++ b/gumps/fw_mods.lua
@@ -45,7 +45,7 @@ function gump:NewDetailsButton (parent, container, instancia, func, param1, para
w = w or 16
h = h or 16
options = options or {}
-
+
local new_button = CreateFrame ("Button", FrameName, parent)
new_button:SetWidth (w)
new_button:SetHeight (h)
diff --git a/gumps/janela_custom.lua b/gumps/janela_custom.lua
index e4911450..bc9db60a 100644
--- a/gumps/janela_custom.lua
+++ b/gumps/janela_custom.lua
@@ -61,7 +61,7 @@ local function CreateCustomWindow()
frame.fundo:SetTexture ("Interface\\AddOns\\Details\\images\\custom_bg")
frame.fundo:SetPoint ("topleft", frame, "topleft")
- frame.move = gump:NewDetailsButton (frame, frame, _, function() end, nil, nil, 1, 1, "", "", "", "")
+ frame.move = gump:NewDetailsButton (frame, frame, _, function() end, nil, nil, 1, 1, "", "", "", "", nil, "DetailsCustomPanelMoveFrame")
frame.move:SetPoint ("topleft", frame, "topleft")
frame.move:SetPoint ("bottomright", frame, "bottomright")
frame.move:SetFrameLevel (frame:GetFrameLevel()+1)
@@ -162,7 +162,7 @@ local function CreateCustomWindow()
LeftButtons:SetDrawLayer ("overlay", 4)
--> botão de deletar um custom
- local DeleteButton = gump:NewDetailsButton (frame, frame, _, function()end, nil, nil, 60, 15, "", "", "", "")
+ local DeleteButton = gump:NewDetailsButton (frame, frame, _, function()end, nil, nil, 60, 15, "", "", "", "", nil, "DetailsCustomPanelDeleteButton")
DeleteButton.text:SetText (Loc ["STRING_CUSTOM_REMOVE"])
DeleteButton.text:SetJustifyH ("left")
DeleteButton.text:SetPoint ("left", DeleteButton, "left", 0, -1)
@@ -180,7 +180,7 @@ local function CreateCustomWindow()
removeTexture:SetDrawLayer ("overlay", 3)
--> botão de dar broadcast em um custom
- local BroadcastButton = gump:NewDetailsButton (frame, frame, _, function()end, nil, nil, 60, 15, "", "", "", "")
+ local BroadcastButton = gump:NewDetailsButton (frame, frame, _, function()end, nil, nil, 60, 15, "", "", "", "", nil, "DetailsCustomPanelBroadcastButton")
BroadcastButton.text:SetText (Loc ["STRING_CUSTOM_BROADCAST"])
BroadcastButton.text:SetJustifyH ("left")
BroadcastButton.text:SetPoint ("left", BroadcastButton, "left", 0, -1)
@@ -247,7 +247,7 @@ local function CreateCustomWindow()
for i = 1, 4 do
- local button = gump:NewDetailsButton (frame, frame, _, MainMenu, i, nil, 120, 15, "", "", "", "")
+ local button = gump:NewDetailsButton (frame, frame, _, MainMenu, i, nil, 120, 15, "", "", "", "", nil, "DetailsCustomPanelAttributeButton"..i)
button.MouseOnEnterHook = OnEnterHook
button.MouseOnLeaveHook = OnLeaveHook
@@ -839,7 +839,7 @@ local function CreateCustomWindow()
reset()
end
- local IconButton = gump:NewDetailsButton (frame, frame, _, ChooseIcon, nil, nil, 80, 15, "", "", "", "")
+ local IconButton = gump:NewDetailsButton (frame, frame, _, ChooseIcon, nil, nil, 80, 15, "", "", "", "", nil, "DetailsCustomPanelIconButton")
IconButton.text:SetText (Loc ["STRING_CUSTOM_ICON"])
IconButton.text:SetPoint ("left", IconButton, "left", 3, 0)
IconButton:SetPoint ("topleft", frame, "topleft", xStart+21, -118)
@@ -854,7 +854,7 @@ local function CreateCustomWindow()
Icon:SetHeight (22)
frame.icon = Icon
- local CreateButton = gump:NewDetailsButton (frame, frame, _, CreateFunction, nil, nil, 80, 15, "", "", "", "")
+ local CreateButton = gump:NewDetailsButton (frame, frame, _, CreateFunction, nil, nil, 80, 15, "", "", "", "", nil, "DetailsCustomPanelCreateButton")
CreateButton.text:SetText (Loc ["STRING_CUSTOM_CREATE"])
CreateButton:SetPoint ("topleft", frame, "topleft", 413, -118)
CreateButton:SetFrameLevel (frame:GetFrameLevel()+2)
diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua
index eae09a4f..dc7fb9d4 100644
--- a/gumps/janela_info.lua
+++ b/gumps/janela_info.lua
@@ -430,7 +430,7 @@ function gump:CriaDetalheInfo (index)
info.bg.reportar = gump:NewDetailsButton (info.bg, nil, nil, _detalhes.Reportar, _detalhes.janela_info, 10+index, 16, 16,
--_detalhes.icones.report.up, _detalhes.icones.report.down, _detalhes.icones.report.disabled)
- "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
+ "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport1")
info.bg.reportar:SetPoint ("BOTTOMLEFT", info.bg.overlay, "BOTTOMRIGHT", -33, 10)
gump:Fade (info.bg.reportar, 1)
@@ -737,9 +737,7 @@ function gump:CriaJanelaInfo()
--> fehcar com o esc
tinsert (UISpecialFrames, este_gump:GetName())
-
-
--> propriedades da janela
este_gump:SetPoint ("CENTER", UIParent)
--este_gump:SetWidth (640)
@@ -774,10 +772,13 @@ function gump:CriaJanelaInfo()
este_gump.bg1:SetPoint ("TOPLEFT", este_gump, "TOPLEFT", 0, 0)
--este_gump.bg1:SetWidth (512)
--este_gump.bg1:SetHeight (256)
- este_gump.bg1:SetTexture ("Interface\\AddOns\\Details\\images\\info_bg_part1")
- este_gump.bg1:SetTexture ("Interface\\AddOns\\Details\\images\\info_window_background")
este_gump.bg1:SetDrawLayer ("BORDER", 1)
+ function _detalhes:SetPlayerDetailsWindowTexture (texture)
+ este_gump.bg1:SetTexture (texture)
+ end
+ _detalhes:SetPlayerDetailsWindowTexture ("Interface\\AddOns\\Details\\images\\info_window_background")
+
este_gump.bg1_sec_texture = este_gump:CreateTexture (nil, "BORDER")
este_gump.bg1_sec_texture:SetDrawLayer ("BORDER", 2)
este_gump.bg1_sec_texture:SetPoint ("topleft", este_gump.bg1, "topleft", 356, -86)
@@ -828,7 +829,7 @@ function gump:CriaJanelaInfo()
end
end
- este_gump.grab = gump:NewDetailsButton (este_gump, este_gump, _, este_gump.ToFront, nil, nil, 590, 73, "", "", "", "", {OnGrab = "PassClick"})
+ este_gump.grab = gump:NewDetailsButton (este_gump, este_gump, _, este_gump.ToFront, nil, nil, 590, 73, "", "", "", "", {OnGrab = "PassClick"}, "DetailsJanelaInfoGrab")
este_gump.grab:SetPoint ("topleft",este_gump, "topleft")
este_gump.grab:SetFrameLevel (este_gump:GetFrameLevel()+1)
@@ -867,14 +868,14 @@ function gump:CriaJanelaInfo()
--> botão de reportar da caixa da esquerda, onde fica as barras principais
este_gump.report_esquerda = gump:NewDetailsButton (este_gump, este_gump, nil, _detalhes.Reportar, este_gump, 1, 16, 16,
- "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
+ "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport2")
--este_gump.report_esquerda:SetPoint ("BOTTOMLEFT", este_gump.container_barras, "TOPLEFT", 281, 3)
este_gump.report_esquerda:SetPoint ("BOTTOMLEFT", este_gump.container_barras, "TOPLEFT", 33, 3)
este_gump.report_esquerda:SetFrameLevel (este_gump:GetFrameLevel()+2)
--> botão de reportar da caixa dos alvos
este_gump.report_alvos = gump:NewDetailsButton (este_gump, este_gump, nil, _detalhes.Reportar, este_gump, 3, 16, 16,
- "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
+ "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport3")
este_gump.report_alvos:SetPoint ("BOTTOMRIGHT", este_gump.container_alvos, "TOPRIGHT", -2, -1)
este_gump.report_alvos:SetFrameLevel (3) --> solved inactive problem
@@ -919,7 +920,7 @@ function gump:CriaJanelaInfo()
--> botão de reportar da caixa da direita, onde estão os 5 quadrados
este_gump.report_direita = gump:NewDetailsButton (este_gump, este_gump, nil, _detalhes.Reportar, este_gump, 2, 16, 16,
- "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
+ "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", nil, "DetailsJanelaInfoReport4")
este_gump.report_direita:SetPoint ("TOPRIGHT", este_gump, "TOPRIGHT", -8, -57)
este_gump.report_direita:Hide()
diff --git a/gumps/janela_news.lua b/gumps/janela_news.lua
index 692c9fd4..fd72c776 100644
--- a/gumps/janela_news.lua
+++ b/gumps/janela_news.lua
@@ -16,9 +16,11 @@ end
function _detalhes:CreateOrOpenNewsWindow()
local frame = _G.DetailsNewsWindow
+ -- /script _detalhes.OpenNewsWindow()
+
if (not frame) then
--> construir a janela de news
- frame = CreateFrame ("frame", "DetailsNewsWindow", UIParent)
+ frame = CreateFrame ("frame", "DetailsNewsWindow", UIParent, "ButtonFrameTemplate")
frame:SetPoint ("center", UIParent, "center")
frame:SetFrameStrata ("HIGH")
frame:SetMovable (true)
@@ -28,31 +30,10 @@ function _detalhes:CreateOrOpenNewsWindow()
frame:SetScript ("OnMouseDown", function() frame:StartMoving() end)
frame:SetScript ("OnMouseUp", function() frame:StopMovingOrSizing() end)
-
- --> fundo
- local fundo = frame:CreateTexture (nil, "border")
- fundo:SetTexture ("Interface\\Addons\\Details\\images\\whatsnew")
- fundo:SetAllPoints (frame)
-
- --> fechar
- local close = CreateFrame ("Button", "DetailsNewsWindowClose", frame, "UIPanelCloseButton")
- close:SetWidth (32)
- close:SetHeight (32)
- close:SetPoint ("bottomright", frame, "topright", 3, -40)
- close:SetScript ("OnClick", function() frame:Hide() end)
-
- --> avatar
- local avatar = frame:CreateTexture (nil, "background")
- avatar:SetPoint ("topleft", frame, "topleft", 5, -5)
-
- --> titulo
- local titulo = _detalhes.gump:NewLabel (frame, nil, "$parentTitle", nil, "", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
- titulo:SetPoint ("center", frame, "center")
- titulo:SetPoint ("top", frame, "top", 0, -18)
--> reinstall textura
local textura = _detalhes.gump:NewImage (frame, [[Interface\DialogFrame\DialogAlertIcon]], 64, 64, nil, nil, nil, "$parentExclamacao")
- textura:SetPoint ("topleft", frame, "topleft", 60, -20)
+ textura:SetPoint ("topleft", frame, "topleft", 60, -10)
--> reinstall aviso
local reinstall = _detalhes.gump:NewLabel (frame, nil, "$parentReinstall", nil, "", "GameFontHighlightLeft", 10)
reinstall:SetPoint ("left", textura, "right", 2, -2)
@@ -61,10 +42,10 @@ function _detalhes:CreateOrOpenNewsWindow()
local frame_upper = CreateFrame ("scrollframe", nil, frame)
local frame_lower = CreateFrame ("frame", nil, frame_upper)
- frame_lower:SetSize (380, 390)
- frame_upper:SetPoint ("topleft", frame, "topleft", 85, -100)
- frame_upper:SetWidth (395)
- frame_upper:SetHeight (370)
+ frame_lower:SetSize (450, 390)
+ frame_upper:SetPoint ("topleft", frame, "topleft", 15, -70)
+ frame_upper:SetWidth (465)
+ frame_upper:SetHeight (400)
frame_upper:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
tile = true, tileSize = 16,
@@ -83,7 +64,7 @@ function _detalhes:CreateOrOpenNewsWindow()
slider:SetThumbTexture (slider.thumb)
slider:SetOrientation ("vertical");
- slider:SetSize (16, 369)
+ slider:SetSize (16, 399)
slider:SetPoint ("topleft", frame_upper, "topright")
slider:SetMinMaxValues (0, 1000)
slider:SetValue(0)
@@ -111,11 +92,11 @@ function _detalhes:CreateOrOpenNewsWindow()
texto:SetJustifyH ("left")
texto:SetJustifyV ("top")
texto:SetTextColor (1, 1, 1)
- texto:SetWidth (380)
+ texto:SetWidth (450)
texto:SetHeight (1400)
function frame:Title (title)
- titulo:SetText (title or "")
+ frame.TitleText:SetText (title or "")
end
function frame:Text (text)
@@ -123,7 +104,7 @@ function _detalhes:CreateOrOpenNewsWindow()
end
function frame:Icon (path)
- avatar:SetTexture (path or nil)
+ frame.portrait:SetTexture (path or nil)
end
frame:Hide()
diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua
index 7b3ad7c2..4cea64fb 100644
--- a/gumps/janela_options.lua
+++ b/gumps/janela_options.lua
@@ -21,6 +21,15 @@ bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", tile = true, tileSiz
local dropdown_backdrop_onenter = {0, 0, 0, 1}
local dropdown_backdrop_onleave = {.1, .1, .1, .9}
+_detalhes.options_window_background = [[Interface\AddOns\Details\images\options_window]]
+
+function _detalhes:SetOptionsWindowTexture (texture)
+ _detalhes.options_window_background = texture
+ if (_G.DetailsOptionsWindowBackground) then
+ _G.DetailsOptionsWindowBackground:SetTexture (texture)
+ end
+end
+
function _detalhes:OpenOptionsWindow (instance)
GameCooltip:Close()
@@ -67,10 +76,9 @@ function _detalhes:OpenOptionsWindow (instance)
--x 9 897 y 9 592
- local background = g:NewImage (window, [[Interface\AddOns\Details\images\options_window]], 897, 592, nil, nil, "background", "$parentBackground")
+ local background = g:NewImage (window, _detalhes.options_window_background, 897, 592, nil, nil, "background", "$parentBackground")
background:SetPoint (0, 0)
background:SetDrawLayer ("border")
- --background:SetTexCoord (0.0087890625, 0.8759765625, 0.0087890625, 0.578125)
background:SetTexCoord (0, 0.8759765625, 0, 0.578125)
local bigdog = g:NewImage (window, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180, 200, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
@@ -314,22 +322,44 @@ function _detalhes:OpenOptionsWindow (instance)
local fillbars = g:NewButton (window, _, "$parentCreateExampleBarsButton", nil, 110, 14, fill_bars, nil, nil, nil, "Create Test Bars")
fillbars:SetPoint ("bottomleft", window.widget, "bottomleft", 200, 12)
--fillbars:InstallCustomTexture()
-
+
+ --> right click to close
+ --local right_click_close = window:CreateRightClickLabel ("short", 14, 14, "Close")
+ --right_click_close:SetPoint ("left", fillbars, "right", 90, 0)
+ --_detalhes:SetFontColor (right_click_close.widget, {1, 0.82, 0, 1})
+ --_detalhes:SetFontFace (right_click_close.widget, [[Fonts\FRIZQT__.TTF]])
+ --_detalhes:SetFontOutline (right_click_close.widget, true)
+ --_detalhes:SetFontSize (right_click_close.widget, 12)
--> left panel buttons
local menus = { --labels nos menus
- {"Display", "Combat", "Profiles"},
+ {"Display", "Combat", "Tooltips", "Externals", "Profiles"},
{"Skin Selection", "Row Settings", "Row Texts", "Show & Hide Settings", "Window Settings", "Attribute Text", "Menus: Left Buttons", "Menus: Right Buttons", "Wallpaper", "Miscellaneous"},
-
{"Data Collector", "Performance Tweaks", "Plugins Management", "Spell Customization", "Data for Charts"}
}
local menus2 = {
- "Display", "Combat",
- "Skin Selection", "Row Settings", "Row Texts", "Window Settings", "Menus: Left Buttons", "Menus: Right Buttons", "Wallpaper", "Miscellaneous",
- "Performance Tweaks", "Data Collector",
- "Plugins Management", "Profiles", "Attribute Text", "Spell Customization", "Data for Charts", "Show & Hide Settings"
+ "Display", --1
+ "Combat", --2
+ "Skin Selection", --3
+ "Row Settings", --4
+ "Row Texts", --5
+ "Window Settings", --6
+ "Menus: Left Buttons", --7
+ "Menus: Right Buttons", --8
+ "Wallpaper", --9
+ "Performance Tweaks",--10
+ "Data Collector", --11
+ "Plugins Management",--12
+ "Profiles", --13
+ "Attribute Text", --14
+ "Spell Customization", --15
+ "Data for Charts", --16
+ "Show & Hide Settings", --17
+ "Miscellaneous", --18
+ "Externals", --19
+ "Tooltip", --20
}
local select_options = function (options_type, true_index)
@@ -410,7 +440,7 @@ local menus = { --labels nos menus
--> index dos menus
- local menus_settings = {1, 2, 13, 3, 4, 5, 17, 6, 14, 7, 8, 9, 18, 11, 10, 12, 15, 16}
+ local menus_settings = {1, 2, 20, 19, 13, 3, 4, 5, 17, 6, 14, 7, 8, 9, 18, 11, 10, 12, 15, 16}
--> create menus
@@ -504,6 +534,8 @@ local menus = { --labels nos menus
[16] = {}, --charts data
[17] = {}, --instance settings
[18] = {}, --miscellaneous settings
+ [19] = {}, --externals widgets
+ [20] = {}, --tooltips
} --> vai armazenar os frames das opções
@@ -516,11 +548,14 @@ local menus = { --labels nos menus
window.widget.isMoving = true
end
end)
- container:SetScript ("OnMouseUp", function()
+ container:SetScript ("OnMouseUp", function (self, button)
if (window.widget.isMoving) then
window.widget:StopMovingOrSizing()
window.widget.isMoving = false
end
+ if (button == "RightButton")then
+ DetailsOptionsWindow:Hide()
+ end
end)
container:SetBackdrop({
@@ -558,11 +593,14 @@ local menus = { --labels nos menus
window.widget.isMoving = true
end
end)
- container_slave:SetScript ("OnMouseUp", function()
+ container_slave:SetScript ("OnMouseUp", function (self, button)
if (window.widget.isMoving) then
window.widget:StopMovingOrSizing()
window.widget.isMoving = false
end
+ if (button == "RightButton")then
+ DetailsOptionsWindow:Hide()
+ end
end)
container_window:SetBackdrop({
@@ -619,6 +657,8 @@ local menus = { --labels nos menus
table.insert (window.options [16], window:create_box_no_scroll (16))
table.insert (window.options [17], window:create_box_no_scroll (17))
table.insert (window.options [18], window:create_box_no_scroll (18))
+ table.insert (window.options [19], window:create_box_no_scroll (19))
+ table.insert (window.options [20], window:create_box_no_scroll (20))
function window:hide_all_options()
for _, frame in ipairs (window.options) do
@@ -680,12 +720,31 @@ local menus = { --labels nos menus
--yellow_point:Hide()
end
+ local background_on_mouse_down = function (self)
+ if (not window.widget.isMoving) then
+ window.widget:StartMoving()
+ window.widget.isMoving = true
+ end
+ end
+
+ local background_on_mouse_up = function (self, button)
+ if (window.widget.isMoving) then
+ window.widget:StopMovingOrSizing()
+ window.widget.isMoving = false
+ end
+ if (button == "RightButton")then
+ DetailsOptionsWindow:Hide()
+ end
+ end
+
function window:create_line_background (frameX, label, parent)
local f = CreateFrame ("frame", nil, frameX)
f:SetPoint ("left", label.widget or label, "left", -2, 0)
f:SetSize (260, 16)
f:SetScript ("OnEnter", background_on_enter)
f:SetScript ("OnLeave", background_on_leave)
+ f:SetScript ("OnMouseDown", background_on_mouse_down)
+ f:SetScript ("OnMouseUp", background_on_mouse_up)
f:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}})
f:SetBackdropColor (0, 0, 0, 0)
f.parent = parent
@@ -705,13 +764,15 @@ local menus = { --labels nos menus
t:SetAlpha (.5)
end
+ return f
end
function window:CreateLineBackground (frame, widget_name, label_name, desc_loc)
frame [widget_name].info = desc_loc
- window:create_line_background (frame, frame [label_name], frame [widget_name])
+ local f = window:create_line_background (frame, frame [label_name], frame [widget_name])
frame [widget_name]:SetHook ("OnEnter", background_on_enter)
frame [widget_name]:SetHook ("OnLeave", background_on_leave)
+ return f
end
select_options (1)
@@ -726,6 +787,335 @@ local menus = { --labels nos menus
tinsert (_detalhes.savedCustomSpells, {1244684, a, b})
--]]
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Advanced Settings - Tooltips ~20
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+function window:CreateFrame20()
+
+ local frame20 = window.options [20][1]
+
+ local titulo_tooltips = g:NewLabel (frame20, _, "$parentTituloTooltipsText", "tooltipsTituloLabel", Loc ["STRING_OPTIONS_TOOLTIPS_TITLE"], "GameFontNormal", 16)
+ local titulo_tooltips_desc = g:NewLabel (frame20, _, "$parentTituloTooltipsText2", "tooltips2TituloLabel", Loc ["STRING_OPTIONS_TOOLTIPS_TITLE_DESC"], "GameFontNormal", 9, "white")
+ titulo_tooltips_desc.width = 350
+ titulo_tooltips_desc.height = 20
+
+ -- text color
+ local tooltip_text_color_callback = function (button, r, g, b, a)
+ _detalhes.tooltip.fontcolor = {r, g, b, a}
+ end
+ g:NewColorPickButton (frame20, "$parentTooltipTextColorPick", "TooltipTextColorPick", tooltip_text_color_callback)
+ g:NewLabel (frame20, _, "$parentTooltipTextColorLabel", "TooltipTextColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTCOLOR"], "GameFontHighlightLeft")
+ frame20.TooltipTextColorPick:SetPoint ("left", frame20.TooltipTextColorLabel, "right", 2, 0)
+ window:CreateLineBackground (frame20, "TooltipTextColorPick", "TooltipTextColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTCOLOR_DESC"])
+
+ -- text size
+ g:NewLabel (frame20, _, "$parentTooltipTextSizeLabel", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSIZE"], "GameFontHighlightLeft")
+ local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, 20, 8, 25, 1, tonumber (_detalhes.tooltip.fontsize))
+ s:SetBackdrop (slider_backdrop)
+ s:SetBackdropColor (unpack (slider_backdrop_color))
+ s:SetThumbSize (50)
+
+ frame20.TooltipTextSizeSlider:SetPoint ("left", frame20.TooltipTextSizeLabel, "right", 2)
+ frame20.TooltipTextSizeSlider:SetHook ("OnValueChange", function (self, _, amount)
+ _detalhes.tooltip.fontsize = amount
+ end)
+ window:CreateLineBackground (frame20, "TooltipTextSizeSlider", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSIZE_DESC"])
+
+ -- text face
+ local on_select_tooltip_font = function (self, _, fontName)
+ _detalhes.tooltip.fontface = fontName
+ end
+
+ local build_tooltip_menu = function()
+ local fonts = {}
+ for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
+ fonts [#fonts+1] = {value = name, label = name, onclick = on_select_tooltip_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
+ end
+ table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
+ return fonts
+ end
+
+ g:NewLabel (frame20, _, "$parentTooltipFontLabel", "TooltipFontLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTFACE"] , "GameFontHighlightLeft")
+ local d = g:NewDropDown (frame20, _, "$parentTooltipFontDropdown", "TooltipFontDropdown", DROPDOWN_WIDTH, 20, build_tooltip_menu, _detalhes.tooltip.fontface)
+ d.onenter_backdrop = dropdown_backdrop_onenter
+ d.onleave_backdrop = dropdown_backdrop_onleave
+ d:SetBackdrop (dropdown_backdrop)
+ d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame20.TooltipFontDropdown:SetPoint ("left", frame20.TooltipFontLabel, "right", 2)
+
+ window:CreateLineBackground (frame20, "TooltipFontDropdown", "TooltipFontLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTFACE_DESC"])
+
+ -- text shadow
+ g:NewLabel (frame20, _, "$parentTooltipShadowLabel", "TooltipShadowLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSHADOW"], "GameFontHighlightLeft")
+ g:NewSwitch (frame20, _, "$parentTooltipShadowSwitch", "TooltipShadowSwitch", 60, 20, nil, nil, _detalhes.tooltip.fontshadow)
+ frame20.TooltipShadowSwitch:SetPoint ("left", frame20.TooltipShadowLabel, "right", 2)
+ frame20.TooltipShadowSwitch.OnSwitch = function (self, _, value)
+ _detalhes.tooltip.fontshadow = value
+ end
+ window:CreateLineBackground (frame20, "TooltipShadowSwitch", "TooltipShadowLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSHADOW_DESC"])
+
+ -- background color
+ local tooltip_background_color_callback = function (button, r, g, b, a)
+ _detalhes.tooltip.background = {r, g, b, a}
+ end
+ g:NewColorPickButton (frame20, "$parentTooltipBackgroundColorPick", "TooltipBackgroundColorPick", tooltip_background_color_callback)
+ g:NewLabel (frame20, _, "$parentTooltipBackgroundColorLabel", "TooltipBackgroundColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BACKGROUNDCOLOR"], "GameFontHighlightLeft")
+ frame20.TooltipBackgroundColorPick:SetPoint ("left", frame20.TooltipBackgroundColorLabel, "right", 2, 0)
+ window:CreateLineBackground (frame20, "TooltipBackgroundColorPick", "TooltipBackgroundColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BACKGROUNDCOLOR_DESC"])
+
+ -- abbreviation method
+ g:NewLabel (frame20, _, "$parentTooltipDpsAbbreviateLabel", "TooltipdpsAbbreviateLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ABBREVIATION"], "GameFontHighlightLeft")
+ --
+ local onSelectTimeAbbreviation = function (_, _, abbreviationtype)
+ _detalhes.tooltip.abbreviation = abbreviationtype
+
+ _detalhes.atributo_damage:UpdateSelectedToKFunction()
+ _detalhes.atributo_heal:UpdateSelectedToKFunction()
+ _detalhes.atributo_energy:UpdateSelectedToKFunction()
+ _detalhes.atributo_misc:UpdateSelectedToKFunction()
+ end
+
+ local icon = [[Interface\COMMON\mini-hourglass]]
+ local iconcolor = {1, 1, 1, .5}
+ local abbreviationOptions = {
+ {value = 1, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_NONE"], desc = "Example: 305.500 -> 305500", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 2, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK"], desc = "Example: 305.500 -> 305.5K", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 3, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2"], desc = "Example: 305.500 -> 305K", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 4, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0"], desc = "Example: 25.305.500 -> 25M", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 5, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOKMIN"], desc = "Example: 305.500 -> 305.5k", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 6, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2MIN"], desc = "Example: 305.500 -> 305k", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 7, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0MIN"], desc = "Example: 25.305.500 -> 25m", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 8, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_COMMA"], desc = "Example: 25305500 -> 25.305.500", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor} --, desc = ""
+ }
+ local buildAbbreviationMenu = function()
+ return abbreviationOptions
+ end
+
+ local d = g:NewDropDown (frame20, _, "$parentTooltipAbbreviateDropdown", "TooltipdpsAbbreviateDropdown", 160, 20, buildAbbreviationMenu, _detalhes.tooltip.abbreviation)
+ d.onenter_backdrop = dropdown_backdrop_onenter
+ d.onleave_backdrop = dropdown_backdrop_onleave
+ d:SetBackdrop (dropdown_backdrop)
+ d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame20.TooltipdpsAbbreviateDropdown:SetPoint ("left", frame20.TooltipdpsAbbreviateLabel, "right", 2, 0)
+
+ window:CreateLineBackground (frame20, "TooltipdpsAbbreviateDropdown", "TooltipdpsAbbreviateLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ABBREVIATION_DESC"])
+
+ -- maximize
+ g:NewLabel (frame20, _, "$parentTooltipMaximizeLabel", "TooltipMaximizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE"], "GameFontHighlightLeft")
+ local onSelectMaximize = function (_, _, maximizeType)
+ _detalhes.tooltip.maximize_method = maximizeType
+ _detalhes.atributo_damage:UpdateSelectedToKFunction()
+ _detalhes.atributo_heal:UpdateSelectedToKFunction()
+ _detalhes.atributo_energy:UpdateSelectedToKFunction()
+ _detalhes.atributo_misc:UpdateSelectedToKFunction()
+ end
+
+ local icon = [[Interface\Buttons\UI-Panel-BiggerButton-Up]]
+ local iconcolor = {1, 1, 1, 1}
+ local iconcord = {0.1875, 0.78125+0.109375, 0.78125+0.109375+0.03, 0.21875-0.109375-0.03}
+
+ local maximizeOptions = {
+ {value = 1, label = Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE1"], onclick = onSelectMaximize, icon = icon, iconcolor = iconcolor, texcoord = iconcord}, --, desc = ""
+ {value = 2, label = Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE2"], onclick = onSelectMaximize, icon = icon, iconcolor = iconcolor, texcoord = iconcord}, --, desc = ""
+ {value = 3, label = Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE3"], onclick = onSelectMaximize, icon = icon, iconcolor = iconcolor, texcoord = iconcord}, --, desc = ""
+ {value = 4, label = Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE4"], onclick = onSelectMaximize, icon = icon, iconcolor = iconcolor, texcoord = iconcord}, --, desc = ""
+ {value = 5, label = Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE5"], onclick = onSelectMaximize, icon = icon, iconcolor = iconcolor, texcoord = iconcord}, --, desc = ""
+ }
+ local buildMaximizeMenu = function()
+ return maximizeOptions
+ end
+
+ local d = g:NewDropDown (frame20, _, "$parentTooltipMaximizeDropdown", "TooltipMaximizeDropdown", 160, 20, buildMaximizeMenu, _detalhes.tooltip.maximize_method)
+ d.onenter_backdrop = dropdown_backdrop_onenter
+ d.onleave_backdrop = dropdown_backdrop_onleave
+ d:SetBackdrop (dropdown_backdrop)
+ d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame20.TooltipMaximizeDropdown:SetPoint ("left", frame20.TooltipMaximizeLabel, "right", 2, 0)
+
+ window:CreateLineBackground (frame20, "TooltipMaximizeDropdown", "TooltipMaximizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_MAXIMIZE_DESC"])
+
+ --> anchors:
+ titulo_tooltips:SetPoint (10, -10)
+ titulo_tooltips_desc:SetPoint (10, -30)
+
+ frame20.TooltipTextColorLabel:SetPoint (10, -70)
+ frame20.TooltipTextSizeLabel:SetPoint (10, -95)
+ frame20.TooltipFontLabel:SetPoint (10, -120)
+ frame20.TooltipShadowLabel:SetPoint (10, -145)
+ frame20.TooltipBackgroundColorLabel:SetPoint (10, -170)
+ frame20.TooltipdpsAbbreviateLabel:SetPoint (10, -195)
+ frame20.TooltipMaximizeLabel:SetPoint (10, -220)
+
+end
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Advanced Settings - Externals Widgets ~19
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+function window:CreateFrame19()
+
+ local frame19 = window.options [19][1]
+
+ local titulo_externals = g:NewLabel (frame19, _, "$parentTituloExternalsText", "ExternalsTituloLabel", Loc ["STRING_OPTIONS_EXTERNALS_TITLE"], "GameFontNormal", 16)
+ local titulo_externals_desc = g:NewLabel (frame19, _, "$parentTituloExternalsText2", "Externals2TituloLabel", Loc ["STRING_OPTIONS_EXTERNALS_TITLE2"], "GameFontNormal", 9, "white")
+ titulo_externals_desc.width = 350
+ titulo_externals_desc.height = 20
+
+ --> minimap
+ --anchor
+ g:NewLabel (frame19, _, "$parentMinimapAnchor", "minimapAnchorLabel", Loc ["STRING_OPTIONS_MINIMAP_ANCHOR"], "GameFontNormal")
+
+ --show or hide
+ g:NewLabel (frame19, _, "$parentMinimapLabel", "minimapLabel", Loc ["STRING_OPTIONS_MINIMAP"], "GameFontHighlightLeft")
+ g:NewSwitch (frame19, _, "$parentMinimapSlider", "minimapSlider", 60, 20, _, _, not _detalhes.minimap.hide)
+
+ frame19.minimapSlider:SetPoint ("left", frame19.minimapLabel, "right", 2, 0)
+ frame19.minimapSlider.OnSwitch = function (self, _, value)
+ _detalhes.minimap.hide = not value
+
+ LDBIcon:Refresh ("Details!", _detalhes.minimap)
+ if (_detalhes.minimap.hide) then
+ LDBIcon:Hide ("Details!")
+ else
+ LDBIcon:Show ("Details!")
+ end
+ end
+ window:CreateLineBackground (frame19, "minimapSlider", "minimapLabel", Loc ["STRING_OPTIONS_MINIMAP_DESC"])
+
+ --on click action
+ do
+ g:NewLabel (frame19, _, "$parentMinimapActionLabel", "minimapActionLabel", Loc ["STRING_OPTIONS_MINIMAP_ACTION"], "GameFontHighlightLeft")
+ local on_select = function (_, _, option)
+ _detalhes.minimap.onclick_what_todo = option
+ end
+ local build_menu = function()
+ return {
+ {value = 1, label = Loc ["STRING_OPTIONS_MINIMAP_ACTION1"], onclick = on_select, icon = [[Interface\FriendsFrame\FriendsFrameScrollIcon]]},
+ {value = 2, label = Loc ["STRING_OPTIONS_MINIMAP_ACTION2"], onclick = on_select, icon = [[Interface\Buttons\UI-GuildButton-PublicNote-Up]], iconcolor = {1, .8, 0, 1}},
+ }
+ end
+ local dropdown = g:NewDropDown (frame19, _, "$parentMinimapActionDropdown", "minimapActionDropdown", 160, 20, build_menu, _detalhes.minimap.onclick_what_todo)
+ dropdown.onenter_backdrop = dropdown_backdrop_onenter
+ dropdown.onleave_backdrop = dropdown_backdrop_onleave
+ dropdown:SetBackdrop (dropdown_backdrop)
+ dropdown:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame19.minimapActionDropdown:SetPoint ("left", frame19.minimapActionLabel, "right", 2, 0)
+ window:CreateLineBackground (frame19, "minimapActionDropdown", "minimapActionLabel", Loc ["STRING_OPTIONS_MINIMAP_ACTION_DESC"])
+ end
+ --> hot corner
+
+ --anchor
+ g:NewLabel (frame19, _, "$parentHotcornerAnchor", "hotcornerAnchorLabel", Loc ["STRING_OPTIONS_HOTCORNER_ANCHOR"], "GameFontNormal")
+
+ --show or hide
+ g:NewLabel (frame19, _, "$parentHotcornerLabel", "hotcornerLabel", Loc ["STRING_OPTIONS_HOTCORNER"], "GameFontHighlightLeft")
+ g:NewSwitch (frame19, _, "$parentHotcornerSlider", "hotcornerSlider", 60, 20, _, _, not _detalhes.hotcorner_topleft.hide)
+
+ frame19.hotcornerSlider:SetPoint ("left", frame19.hotcornerLabel, "right", 2, 0)
+ frame19.hotcornerSlider.OnSwitch = function (self, _, value)
+ _detalhes:HideHotCornerButton ("Details!", "TOPLEFT", not value)
+ end
+ window:CreateLineBackground (frame19, "hotcornerSlider", "hotcornerLabel", Loc ["STRING_OPTIONS_HOTCORNER_DESC"])
+
+ --on click action
+ do
+ g:NewLabel (frame19, _, "$parentHotcornerActionLabel", "hotcornerActionLabel", Loc ["STRING_OPTIONS_HOTCORNER_ACTION"], "GameFontHighlightLeft")
+ local on_select = function (_, _, option)
+ _detalhes.hotcorner_topleft.onclick_what_todo = option
+ end
+ local build_menu = function()
+ return {
+ {value = 1, label = Loc ["STRING_OPTIONS_MINIMAP_ACTION1"], onclick = on_select, icon = [[Interface\FriendsFrame\FriendsFrameScrollIcon]]},
+ {value = 2, label = Loc ["STRING_OPTIONS_MINIMAP_ACTION2"], onclick = on_select, icon = [[Interface\Buttons\UI-GuildButton-PublicNote-Up]], iconcolor = {1, .8, 0, 1}},
+ }
+ end
+ local dropdown = g:NewDropDown (frame19, _, "$parentHotcornerActionDropdown", "hotcornerActionDropdown", 160, 20, build_menu, _detalhes.hotcorner_topleft.onclick_what_todo)
+ dropdown.onenter_backdrop = dropdown_backdrop_onenter
+ dropdown.onleave_backdrop = dropdown_backdrop_onleave
+ dropdown:SetBackdrop (dropdown_backdrop)
+ dropdown:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame19.hotcornerActionDropdown:SetPoint ("left", frame19.hotcornerActionLabel, "right", 2, 0)
+ window:CreateLineBackground (frame19, "hotcornerActionDropdown", "hotcornerActionLabel", Loc ["STRING_OPTIONS_HOTCORNER_ACTION_DESC"])
+ end
+
+ --quick click enabled
+ g:NewLabel (frame19, _, "$parentHotcornerQuickClickLabel", "hotcornerQuickClickLabel", Loc ["STRING_OPTIONS_HOTCORNER_QUICK_CLICK"], "GameFontHighlightLeft")
+ g:NewSwitch (frame19, _, "$parentHotcornerQuickClickSlider", "hotcornerQuickClickSlider", 60, 20, _, _, _detalhes.hotcorner_topleft.topleft_quick_click)
+
+ frame19.hotcornerQuickClickSlider:SetPoint ("left", frame19.hotcornerQuickClickLabel, "right", 2, 0)
+ frame19.hotcornerQuickClickSlider.OnSwitch = function (self, _, value)
+ _detalhes:QuickHotCornerEnable ("Details!", "TOPLEFT", value)
+ end
+ window:CreateLineBackground (frame19, "hotcornerQuickClickSlider", "hotcornerQuickClickLabel", Loc ["STRING_OPTIONS_HOTCORNER_QUICK_CLICK_DESC"])
+
+ --quick click function
+ do
+ g:NewLabel (frame19, _, "$parentQuickClickLabel", "quickClickLabel", Loc ["STRING_OPTIONS_HOTCORNER_QUICK_CLICK_FUNC"], "GameFontHighlightLeft")
+ local on_select = function (_, _, option)
+ _detalhes.hotcorner_topleft.quickclick_what_todo = option
+ end
+ local build_menu = function()
+ return {
+ {value = 1, label = Loc ["STRING_OPTIONS_MINIMAP_ACTION1"], onclick = on_select, icon = [[Interface\FriendsFrame\FriendsFrameScrollIcon]]},
+ {value = 2, label = Loc ["STRING_OPTIONS_MINIMAP_ACTION2"], onclick = on_select, icon = [[Interface\Buttons\UI-GuildButton-PublicNote-Up]], iconcolor = {1, .8, 0, 1}},
+ }
+ end
+ local dropdown = g:NewDropDown (frame19, _, "$parentQuickClickDropdown", "quickClickDropdown", 160, 20, build_menu, _detalhes.hotcorner_topleft.quickclick_what_todo)
+ dropdown.onenter_backdrop = dropdown_backdrop_onenter
+ dropdown.onleave_backdrop = dropdown_backdrop_onleave
+ dropdown:SetBackdrop (dropdown_backdrop)
+ dropdown:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame19.quickClickDropdown:SetPoint ("left", frame19.quickClickLabel, "right", 2, 0)
+ window:CreateLineBackground (frame19, "quickClickDropdown", "quickClickLabel", Loc ["STRING_OPTIONS_HOTCORNER_QUICK_CLICK_FUNC_DESC"])
+ end
+ --> broker
+ --anchor
+ g:NewLabel (frame19, _, "$parentHotcornerAnchor", "brokerAnchorLabel", Loc ["STRING_OPTIONS_DATABROKER"], "GameFontNormal")
+
+ --broker text
+ do
+ g:NewLabel (frame19, _, "$parentBrokerTextLabel", "brokerTextLabel", Loc ["STRING_OPTIONS_DATABROKER_TEXT"], "GameFontHighlightLeft")
+ local on_select = function (_, _, option)
+ _detalhes.minimap.text_type = option
+ end
+ local build_menu = function()
+ return {
+ {value = 1, label = Loc ["STRING_OPTIONS_DATABROKER_TEXT1"], onclick = on_select, icon = "Interface\\AddOns\\Details\\images\\atributos_icones", texcoord = {0, 0.125, 0, 1}},
+ {value = 2, label = Loc ["STRING_OPTIONS_DATABROKER_TEXT2"], onclick = on_select, icon = "Interface\\AddOns\\Details\\images\\atributos_icones", texcoord = {0.125, 0.25, 0, 1}},
+ }
+ end
+ local dropdown = g:NewDropDown (frame19, _, "$parentBrokerTextDropdown", "brokerTextDropdown", 160, 20, build_menu, _detalhes.minimap.text_type)
+ dropdown.onenter_backdrop = dropdown_backdrop_onenter
+ dropdown.onleave_backdrop = dropdown_backdrop_onleave
+ dropdown:SetBackdrop (dropdown_backdrop)
+ dropdown:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ frame19.brokerTextDropdown:SetPoint ("left", frame19.brokerTextLabel, "right", 2, 0)
+ window:CreateLineBackground (frame19, "brokerTextDropdown", "brokerTextLabel", Loc ["STRING_OPTIONS_DATABROKER_TEXT_DESC"])
+ end
+
+ --> anchors:
+ titulo_externals:SetPoint (10, -10)
+ titulo_externals_desc:SetPoint (10, -30)
+ frame19.minimapAnchorLabel:SetPoint (10, -70)
+ frame19.minimapLabel:SetPoint (10, -95)
+ frame19.minimapActionLabel:SetPoint (10, -120)
+
+ frame19.hotcornerAnchorLabel:SetPoint (10, -155)
+ frame19.hotcornerLabel:SetPoint (10, -180)
+ frame19.hotcornerActionLabel:SetPoint (10, -205)
+ frame19.hotcornerQuickClickLabel:SetPoint (10, -230)
+ frame19.quickClickLabel:SetPoint (10, -255)
+
+ frame19.brokerAnchorLabel:SetPoint (10, -290)
+ frame19.brokerTextLabel:SetPoint (10, -315)
+
+end
+
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Advanced Settings - Miscellaneous ~18
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -996,7 +1386,7 @@ function window:CreateFrame18()
end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Advanced Settings - Chart Data ~17
+-- Advanced Settings - Hide/Show Controls ~17
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function window:CreateFrame17()
@@ -1419,11 +1809,14 @@ function window:CreateFrame16()
local doimport = function()
local text = importframe:GetText()
- local unserialize, arg2, arg3 = select (2, _detalhes:Deserialize (text))
+ local unserialize = select (2, _detalhes:Deserialize (text))
if (type (unserialize) == "table") then
if (unserialize[1] and unserialize[2] and unserialize[3] and unserialize[4] and unserialize[5]) then
- _detalhes:RegisterUserTimeCapture (unpack (unserialize))
+ local register = _detalhes:TimeDataRegister (unpack (unserialize))
+ if (type (register) == "string") then
+ _detalhes:Msg (register)
+ end
else
_detalhes:Msg ("The import string is invalid.")
end
@@ -1770,7 +2163,7 @@ end
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- General Settings - Display ~14
+-- General Settings - attribute ~14
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function window:CreateFrame14()
@@ -2059,29 +2452,7 @@ function window:CreateFrame1()
window:create_line_background (frame1, frame1.maxInstancesLabel, frame1.maxInstancesSlider)
frame1.maxInstancesSlider:SetHook ("OnEnter", background_on_enter)
frame1.maxInstancesSlider:SetHook ("OnLeave", background_on_leave)
-
- --> Minimap Icon
- g:NewSwitch (frame1, _, "$parentMinimapSlider", "minimapSlider", 60, 20, _, _, not _detalhes.minimap.hide)
- g:NewLabel (frame1, _, "$parentMinimapLabel", "minimapLabel", Loc ["STRING_OPTIONS_MINIMAP"], "GameFontHighlightLeft")
- --
- frame1.minimapSlider:SetPoint ("left", frame1.minimapLabel, "right", 2, 0)
- frame1.minimapSlider.OnSwitch = function (self, _, value)
- _detalhes.minimap.hide = not value
-
- LDBIcon:Refresh ("Details!", _detalhes.minimap)
- if (_detalhes.minimap.hide) then
- LDBIcon:Hide ("Details!")
- else
- LDBIcon:Show ("Details!")
- end
- end
-
- frame1.minimapSlider.info = Loc ["STRING_OPTIONS_MINIMAP_DESC"]
-
- window:create_line_background (frame1, frame1.minimapLabel, frame1.minimapSlider)
- frame1.minimapSlider:SetHook ("OnEnter", background_on_enter)
- frame1.minimapSlider:SetHook ("OnLeave", background_on_leave)
-
+
---> Abbreviation Type
g:NewLabel (frame1, _, "$parentDpsAbbreviateLabel", "dpsAbbreviateLabel", Loc ["STRING_OPTIONS_PS_ABBREVIATE"], "GameFontHighlightLeft")
--
@@ -2104,7 +2475,8 @@ function window:CreateFrame1()
{value = 4, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0"], desc = "Example: 25.305.500 -> 25M", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
{value = 5, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOKMIN"], desc = "Example: 305.500 -> 305.5k", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
{value = 6, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2MIN"], desc = "Example: 305.500 -> 305k", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
- {value = 7, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0MIN"], desc = "Example: 25.305.500 -> 25m", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor} --, desc = ""
+ {value = 7, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK0MIN"], desc = "Example: 25.305.500 -> 25m", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor}, --, desc = ""
+ {value = 8, label = Loc ["STRING_OPTIONS_PS_ABBREVIATE_COMMA"], desc = "Example: 25305500 -> 25.305.500", onclick = onSelectTimeAbbreviation, icon = icon, iconcolor = iconcolor} --, desc = ""
}
local buildAbbreviationMenu = function()
return abbreviationOptions
@@ -2203,9 +2575,8 @@ function window:CreateFrame1()
frame1.segmentsLabel:SetPoint (w_start, -310)
frame1.scrollLabel:SetPoint (w_start, -335)
frame1.maxInstancesLabel:SetPoint (w_start, -360)
- frame1.minimapLabel:SetPoint (w_start, -385)
- frame1.dpsAbbreviateLabel:SetPoint (w_start, -410)
- frame1.realmNameLabel:SetPoint (w_start, -435)
+ frame1.dpsAbbreviateLabel:SetPoint (w_start, -385)
+ frame1.realmNameLabel:SetPoint (w_start, -410)
end
@@ -2304,7 +2675,7 @@ function window:CreateFrame13()
--> select profile
local profile_selected = function (_, instance, profile_name)
_detalhes:ApplyProfile (profile_name)
- _detalhes:Msg ("Profile loaded:", profile_name)
+ _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_LOADED"], profile_name)
_detalhes:OpenOptionsWindow (_G.DetailsOptionsWindow.instance)
end
local build_profile_menu = function()
@@ -2316,7 +2687,7 @@ function window:CreateFrame13()
return menu
end
- local select_profile_dropdown = g:NewDropDown (frame13, _, "$parentSelectProfileDropdown", "selectProfileDropdown", 160, 20, build_profile_menu, 1)
+ local select_profile_dropdown = g:NewDropDown (frame13, _, "$parentSelectProfileDropdown", "selectProfileDropdown", 160, 20, build_profile_menu, 0)
local d = select_profile_dropdown
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
@@ -2339,18 +2710,23 @@ function window:CreateFrame13()
local create_profile = function()
local text = profile_name:GetText()
if (text == "") then
- return _detalhes:Msg ("Name field is empty.")
+ return _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_FIELDEMPTY"])
end
+ profile_name:SetText ("")
+ profile_name:ClearFocus()
+
local new_profile = _detalhes:CreateProfile (text)
if (new_profile) then
_detalhes:ApplyProfile (text)
_detalhes:OpenOptionsWindow (_G.DetailsOptionsWindow.instance)
+ _G.DetailsOptionsWindow13SelectProfileCopyDropdown.MyObject:Refresh()
+ _G.DetailsOptionsWindow13SelectProfileEraseDropdown.MyObject:Refresh()
else
- return _detalhes:Msg ("Profile not created.")
+ return _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_NOTCREATED"])
end
end
- local profile_create_button = g:NewButton (frame13, _, "$parentProfileCreateButton", "profileCreateButton", 50, 19, create_profile, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"])
+ local profile_create_button = g:NewButton (frame13, _, "$parentProfileCreateButton", "profileCreateButton", 50, 18, create_profile, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"])
profile_create_button:InstallCustomTexture()
profile_create_button:SetPoint ("left", profile_name, "right", 2, 0)
@@ -2365,18 +2741,29 @@ function window:CreateFrame13()
--copiar o profile
local current_instance = _G.DetailsOptionsWindow.instance
_detalhes:ApplyProfile (profile_name, nil, true)
+ _G.DetailsOptionsWindow13SelectProfileCopyDropdown.MyObject:Select (false)
+ _G.DetailsOptionsWindow13SelectProfileCopyDropdown.MyObject:Refresh()
+
_detalhes:OpenOptionsWindow (current_instance)
+ _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_COPYOKEY"])
end
local build_copy_menu = function()
local menu = {}
+ local current = _detalhes:GetCurrentProfileName()
+
for index, profile_name in ipairs (_detalhes:GetProfileList()) do
- menu [#menu+1] = {value = profile_name, label = profile_name, onclick = profile_selectedCopy, icon = "Interface\\MINIMAP\\Vehicle-HammerGold-2"}
+ if (profile_name ~= current) then
+ menu [#menu+1] = {value = profile_name, label = profile_name, onclick = profile_selectedCopy, icon = "Interface\\MINIMAP\\Vehicle-HammerGold-2"}
+ end
end
return menu
end
- local select_profileCopy_dropdown = g:NewDropDown (frame13, _, "$parentSelectProfileCopyDropdown", "selectProfileCopyDropdown", 160, 20, build_copy_menu, 1)
+
+ local select_profileCopy_dropdown = g:NewDropDown (frame13, _, "$parentSelectProfileCopyDropdown", "selectProfileCopyDropdown", 160, 20, build_copy_menu, 0)
+ select_profileCopy_dropdown:SetEmptyTextAndIcon (Loc ["STRING_OPTIONS_PROFILE_SELECT"])
+
local d = select_profileCopy_dropdown
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
@@ -2395,18 +2782,30 @@ function window:CreateFrame13()
local profile_selectedErase = function (_, instance, profile_name)
local current_instance = _G.DetailsOptionsWindow.instance
_detalhes:EraseProfile (profile_name)
+
_detalhes:OpenOptionsWindow (current_instance)
+ _detalhes:Msg (Loc ["STRING_OPTIONS_PROFILE_REMOVEOKEY"])
+
+ _G.DetailsOptionsWindow13SelectProfileEraseDropdown.MyObject:Select (false)
+ _G.DetailsOptionsWindow13SelectProfileCopyDropdown.MyObject:Refresh()
+ _G.DetailsOptionsWindow13SelectProfileEraseDropdown.MyObject:Refresh()
end
local build_erase_menu = function()
local menu = {}
+
+ local current = _detalhes:GetCurrentProfileName()
for index, profile_name in ipairs (_detalhes:GetProfileList()) do
- menu [#menu+1] = {value = profile_name, label = profile_name, onclick = profile_selectedErase, icon = "Interface\\MINIMAP\\Vehicle-HammerGold-1", color = {1, 1, 1}, iconcolor = {1, .90, .90}}
+ if (profile_name ~= current) then
+ menu [#menu+1] = {value = profile_name, label = profile_name, onclick = profile_selectedErase, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], color = {1, 1, 1}, iconcolor = {1, .9, .9, 0.8}}
+ end
end
return menu
end
- local select_profileErase_dropdown = g:NewDropDown (frame13, _, "$parentSelectProfileEraseDropdown", "selectProfileEraseDropdown", 160, 20, build_erase_menu, 1)
+ local select_profileErase_dropdown = g:NewDropDown (frame13, _, "$parentSelectProfileEraseDropdown", "selectProfileEraseDropdown", 160, 20, build_erase_menu, 0)
+ select_profileErase_dropdown:SetEmptyTextAndIcon (Loc ["STRING_OPTIONS_PROFILE_SELECT"])
+
local d = select_profileErase_dropdown
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
@@ -2440,7 +2839,7 @@ function window:CreateFrame13()
profile_reset_button:SetHook ("OnEnter", background_on_enter)
profile_reset_button:SetHook ("OnLeave", background_on_leave)
- profile_reset_button.button.texture:SetVertexColor (1, .8, 0)
+ --profile_reset_button.button.texture:SetVertexColor (1, .8, 0)
--> anchors
titulo_profiles:SetPoint (10, -10)
@@ -2535,7 +2934,7 @@ function window:CreateFrame3()
end
-- skin
- local d = g:NewDropDown (frame3, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, 1)
+ local d = g:NewDropDown (frame3, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, 1)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
@@ -2578,8 +2977,12 @@ function window:CreateFrame3()
_detalhes.savedStyles [#_detalhes.savedStyles+1] = savedObject
frame3.saveStyleName.text = ""
+ frame3.saveStyleName:ClearFocus()
_detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_SKINCREATED"])
+
+ _G.DetailsOptionsWindow3CustomSkinLoadDropdown.MyObject:Refresh()
+ _G.DetailsOptionsWindow3CustomSkinRemoveDropdown.MyObject:Refresh()
end
@@ -2681,6 +3084,11 @@ function window:CreateFrame3()
--> reload options panel
_detalhes:OpenOptionsWindow (_G.DetailsOptionsWindow.instance)
+
+ _G.DetailsOptionsWindow3CustomSkinLoadDropdown.MyObject:Select (false)
+ _G.DetailsOptionsWindow3CustomSkinLoadDropdown.MyObject:Refresh()
+
+ _detalhes:Msg (Loc ["STRING_OPTIONS_SKIN_LOADED"])
end
local loadtable = {}
@@ -2692,7 +3100,8 @@ function window:CreateFrame3()
return loadtable
end
- local d = g:NewDropDown (frame3, _, "$parentCustomSkinLoadDropdown", "customSkinSelectDropdown", 160, 20, buildCustomSkinMenu, nil) -- func, default
+ local d = g:NewDropDown (frame3, _, "$parentCustomSkinLoadDropdown", "customSkinSelectDropdown", 160, 20, buildCustomSkinMenu, 0) -- func, default
+ d:SetEmptyTextAndIcon (Loc ["STRING_OPTIONS_SKIN_SELECT"])
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
@@ -2710,19 +3119,23 @@ function window:CreateFrame3()
--
local onSelectCustomSkinToErase = function (_, _, index)
table.remove (_detalhes.savedStyles, index)
- frame3.customSkinSelectToRemoveDropdown:Select (1)
+ _G.DetailsOptionsWindow3CustomSkinRemoveDropdown.MyObject:Select (false)
+ _G.DetailsOptionsWindow3CustomSkinLoadDropdown.MyObject:Refresh()
+ _G.DetailsOptionsWindow3CustomSkinRemoveDropdown.MyObject:Refresh()
+ _detalhes:Msg (Loc ["STRING_OPTIONS_SKIN_REMOVED"])
end
local loadtable2 = {}
local buildCustomSkinToEraseMenu = function()
table.wipe (loadtable2)
for index, _table in ipairs (_detalhes.savedStyles) do
- tinsert (loadtable2, {value = index, label = _table.name, onclick = onSelectCustomSkinToErase, icon = [[Interface\COMMON\VOICECHAT-MUTED]], iconcolor = {.7, .7, .5, 1}})
+ tinsert (loadtable2, {value = index, label = _table.name, onclick = onSelectCustomSkinToErase, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], color = {1, 1, 1}, iconcolor = {1, .9, .9, 0.8}})
end
return loadtable2
end
- local d = g:NewDropDown (frame3, _, "$parentCustomSkinRemoveDropdown", "customSkinSelectToRemoveDropdown", 160, 20, buildCustomSkinToEraseMenu, nil) -- func, default
+ local d = g:NewDropDown (frame3, _, "$parentCustomSkinRemoveDropdown", "customSkinSelectToRemoveDropdown", 160, 20, buildCustomSkinToEraseMenu, 0) -- func, default
+ d:SetEmptyTextAndIcon (Loc ["STRING_OPTIONS_SKIN_SELECT"])
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
@@ -2743,23 +3156,24 @@ function window:CreateFrame3()
titulo_skin_desc:SetPoint (10, -30)
--skin select
frame3.skinLabel:SetPoint (10, -70)
+
--title
- titulo_save:SetPoint (10, -105)
- titulo_save_desc:SetPoint (10, -125)
+ titulo_save:SetPoint (10, -115)
+ titulo_save_desc:SetPoint (10, -135)
--saving
- frame3.saveSkinLabel:SetPoint (10, -160)
+ frame3.saveSkinLabel:SetPoint (10, -170)
frame3.saveStyle:SetPoint ("left", frame3.saveStyleName, "right", 2)
--loading
- frame3.loadCustomSkinLabel:SetPoint (10, -185)
+ frame3.loadCustomSkinLabel:SetPoint (10, -195)
--removing
- frame3.removeCustomSkinLabel:SetPoint (10, -210)
+ frame3.removeCustomSkinLabel:SetPoint (10, -220)
- frame3.makeDefault:SetPoint (10, -245)
+ frame3.makeDefault:SetPoint (10, -255)
--frame3.resetToDefaults:SetPoint (10, -270)
- frame3.applyToAll:SetPoint (10, -270)
+ frame3.applyToAll:SetPoint (10, -280)
end
@@ -2775,124 +3189,68 @@ function window:CreateFrame4()
local titulo_bars_desc = g:NewLabel (frame4, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_BARS_DESC"], "GameFontNormal", 9, "white")
titulo_bars_desc.width = 320
- --> bar background color
-
- local rowcolorbackground_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a})
- end
- g:NewColorPickButton (frame4, "$parentRowBackgroundColorPick", "rowBackgroundColorPick", rowcolorbackground_callback)
- g:NewLabel (frame4, _, "$parentRowBackgroundColorPickLabel", "rowBackgroundPickLabel", Loc ["STRING_OPTIONS_TEXT_ROWCOLOR"], "GameFontHighlightLeft")
- frame4.rowBackgroundColorPick:SetPoint ("left", frame4.rowBackgroundPickLabel, "right", 2, 0)
-
- frame4.rowBackgroundColorPick.info = Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"]
- window:create_line_background (frame4, frame4.rowBackgroundPickLabel, frame4.rowBackgroundColorPick)
- frame4.rowBackgroundColorPick:SetHook ("OnEnter", background_on_enter)
- frame4.rowBackgroundColorPick:SetHook ("OnLeave", background_on_leave)
-
- --> bar texture by class color
- g:NewSwitch (frame4, _, "$parentClassColorSlider", "classColorSlider", 60, 20, _, _, instance.row_info.texture_class_colors)
-
-
- --> background with class color
- g:NewSwitch (frame4, _, "$parentBackgroundClassColorSlider", "rowBackgroundColorByClassSlider", 60, 20, _, _, instance.row_info.texture_background_class_color)
-
--> bar height
+ g:NewLabel (frame4, _, "$parentRowHeightLabel", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"], "GameFontHighlightLeft")
local s = g:NewSlider (frame4, _, "$parentSliderRowHeight", "rowHeightSlider", SLIDER_WIDTH, 20, 10, 30, 1, tonumber (instance.row_info.height))
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
- --> row texture color
+ frame4.rowHeightSlider:SetPoint ("left", frame4.rowHeightLabel, "right", 2)
+ frame4.rowHeightSlider:SetThumbSize (50)
+ frame4.rowHeightSlider:SetHook ("OnValueChange", function (self, instance, amount)
+ instance.row_info.height = amount
+ instance.row_height = instance.row_info.height+instance.row_info.space.between
+ instance:RefreshBars()
+ instance:InstanceReset()
+ instance:ReajustaGump()
+ end)
+ window:CreateLineBackground (frame4, "rowHeightSlider", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"])
- local rowcolor_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, {r, g, b})
- _G.DetailsOptionsWindow.instance.row_info.alpha = a
- _G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, a)
+ --> bar grow direction
+ local grow_switch_func = function (slider, value)
+ if (value == 1) then
+ return true
+ elseif (value == 2) then
+ return false
+ end
end
- g:NewColorPickButton (frame4, "$parentRowColorPick", "rowColorPick", rowcolor_callback)
- g:NewLabel (frame4, _, "$parentRowColorPickLabel", "rowPickColorLabel", Loc ["STRING_OPTIONS_TEXT_ROWCOLOR2"], "GameFontHighlightLeft")
- frame4.rowColorPick:SetPoint ("left", frame4.rowPickColorLabel, "right", 2, 0)
-
- frame4.rowColorPick.info = Loc ["STRING_OPTIONS_BAR_COLOR_DESC"]
- window:create_line_background (frame4, frame4.rowPickColorLabel, frame4.rowColorPick)
- frame4.rowColorPick:SetHook ("OnEnter", background_on_enter)
- frame4.rowColorPick:SetHook ("OnLeave", background_on_leave)
-
- --> bar grow direction
- local grow_switch_func = function (slider, value)
- if (value == 1) then
- return true
- elseif (value == 2) then
- return false
- end
+ local grow_return_func = function (slider, value)
+ if (value) then
+ return 1
+ else
+ return 2
end
- local grow_return_func = function (slider, value)
- if (value) then
- return 1
- else
- return 2
- end
- end
-
- g:NewSwitch (frame4, _, "$parentBarGrowDirectionSlider", "barGrowDirectionSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.bars_grow_direction, nil, grow_switch_func, grow_return_func)
- g:NewLabel (frame4, _, "$parentBarGrowDirectionLabel", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION"], "GameFontHighlightLeft")
-
- frame4.barGrowDirectionSlider:SetPoint ("left", frame4.barGrowDirectionLabel, "right", 2)
- frame4.barGrowDirectionSlider.OnSwitch = function (self, instance, value)
- instance:SetBarGrowDirection (value)
- end
- frame4.barGrowDirectionSlider.thumb:SetSize (50, 12)
-
- frame4.barGrowDirectionSlider.info = Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"]
- window:create_line_background (frame4, frame4.barGrowDirectionLabel, frame4.barGrowDirectionSlider)
- frame4.barGrowDirectionSlider:SetHook ("OnEnter", background_on_enter)
- frame4.barGrowDirectionSlider:SetHook ("OnLeave", background_on_leave)
-
- -- bar sort direction
-
- g:NewSwitch (frame4, _, "$parentBarSortDirectionSlider", "barSortDirectionSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.bars_sort_direction, nil, grow_switch_func, grow_return_func)
- g:NewLabel (frame4, _, "$parentBarSortDirectionLabel", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION"], "GameFontHighlightLeft")
-
- frame4.barSortDirectionSlider:SetPoint ("left", frame4.barSortDirectionLabel, "right", 2)
- frame4.barSortDirectionSlider.OnSwitch = function (self, instance, value)
- instance.bars_sort_direction = value
- _detalhes:AtualizaGumpPrincipal (-1, true)
- end
- frame4.barSortDirectionSlider.thumb:SetSize (50, 12)
-
- frame4.barSortDirectionSlider.info = Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"]
- window:create_line_background (frame4, frame4.barSortDirectionLabel, frame4.barSortDirectionSlider)
- frame4.barSortDirectionSlider:SetHook ("OnEnter", background_on_enter)
- frame4.barSortDirectionSlider:SetHook ("OnLeave", background_on_leave)
-
- -- Bar Settings
+ end
- g:NewLabel (frame4, _, "$parentRowUpperTextureAnchor", "rowUpperTextureLabel", "Top Texture", "GameFontNormal")
- g:NewLabel (frame4, _, "$parentRowLowerTextureAnchor", "rowLowerTextureLabel", "Bottom Texture (background)", "GameFontNormal")
- g:NewLabel (frame4, _, "$parentIconsAnchor", "rowIconsLabel", "Icons", "GameFontNormal")
-
- --alpha
- g:NewLabel (frame4, _, "$parentRowAlphaLabel", "rowAlphaLabel", "Alpha", "GameFontHighlightLeft")
- local s = g:NewSlider (frame4, _, "$parentRowAlphaSlider", "rowAlphaSlider", SLIDER_WIDTH, 20, 0.02, 1, 0.02, instance.row_info.alpha, true)
- s:SetBackdrop (slider_backdrop)
- s:SetBackdropColor (unpack (slider_backdrop_color))
- s:SetThumbSize (50)
-
- frame4.rowAlphaSlider:SetPoint ("left", frame4.rowAlphaLabel, "right", 2, 0)
- frame4.rowAlphaSlider.useDecimals = true
- frame4.rowAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount)
- self.amt:SetText (string.format ("%.2f", amount))
- instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, amount)
- return true
- end)
- frame4.rowAlphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2)
+ g:NewSwitch (frame4, _, "$parentBarGrowDirectionSlider", "barGrowDirectionSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.bars_grow_direction, nil, grow_switch_func, grow_return_func)
+ g:NewLabel (frame4, _, "$parentBarGrowDirectionLabel", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION"], "GameFontHighlightLeft")
- frame4.rowAlphaSlider.info = "Change the alpha of the row"
- window:create_line_background (frame4, frame4.rowAlphaLabel, frame4.rowAlphaSlider)
- frame4.rowAlphaSlider:SetHook ("OnEnter", background_on_enter)
- frame4.rowAlphaSlider:SetHook ("OnLeave", background_on_leave)
+ frame4.barGrowDirectionSlider:SetPoint ("left", frame4.barGrowDirectionLabel, "right", 2)
+ frame4.barGrowDirectionSlider.OnSwitch = function (self, instance, value)
+ instance:SetBarGrowDirection (value)
+ end
+ frame4.barGrowDirectionSlider.thumb:SetSize (50, 12)
+ window:CreateLineBackground (frame4, "barGrowDirectionSlider", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"])
+
+ -- bar sort direction
+
+ g:NewSwitch (frame4, _, "$parentBarSortDirectionSlider", "barSortDirectionSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.bars_sort_direction, nil, grow_switch_func, grow_return_func)
+ g:NewLabel (frame4, _, "$parentBarSortDirectionLabel", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION"], "GameFontHighlightLeft")
+
+ frame4.barSortDirectionSlider:SetPoint ("left", frame4.barSortDirectionLabel, "right", 2)
+ frame4.barSortDirectionSlider.OnSwitch = function (self, instance, value)
+ instance.bars_sort_direction = value
+ _detalhes:AtualizaGumpPrincipal (-1, true)
+ end
+ frame4.barSortDirectionSlider.thumb:SetSize (50, 12)
+ window:CreateLineBackground (frame4, "barSortDirectionSlider", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"])
- -- texture
+ --> Top Texture
+ --anchor
+ g:NewLabel (frame4, _, "$parentRowUpperTextureAnchor", "rowUpperTextureLabel", Loc ["STRING_OPTIONS_TEXT_TEXTUREU_ANCHOR"], "GameFontNormal")
+
+ --texture
local onSelectTexture = function (_, instance, textureName)
instance:SetBarSettings (nil, textureName)
end
@@ -2907,24 +3265,46 @@ function window:CreateFrame4()
return texTable
end
+ g:NewLabel (frame4, _, "$parentTextureLabel", "textureLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"], "GameFontHighlightLeft")
local d = g:NewDropDown (frame4, _, "$parentTextureDropdown", "textureDropdown", DROPDOWN_WIDTH, 20, buildTextureMenu, nil)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
-
- g:NewLabel (frame4, _, "$parentTextureLabel", "textureLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"], "GameFontHighlightLeft")
- --
- frame4.textureDropdown:SetPoint ("left", frame4.textureLabel, "right", 2)
-
- frame4.textureDropdown.info = Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"]
- window:create_line_background (frame4, frame4.textureLabel, frame4.textureDropdown)
- frame4.textureDropdown:SetHook ("OnEnter", background_on_enter)
- frame4.textureDropdown:SetHook ("OnLeave", background_on_leave)
-
- -- background texture
- --> bar background
+ frame4.textureDropdown:SetPoint ("left", frame4.textureLabel, "right", 2)
+ window:CreateLineBackground (frame4, "textureDropdown", "textureLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"])
+
+ -- row texture color
+ local rowcolor_callback = function (button, r, g, b, a)
+ _G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, {r, g, b})
+ _G.DetailsOptionsWindow.instance.row_info.alpha = a
+ _G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, a)
+ end
+ g:NewLabel (frame4, _, "$parentRowColorPickLabel", "rowPickColorLabel", Loc ["STRING_OPTIONS_TEXT_ROWCOLOR2"], "GameFontHighlightLeft")
+ g:NewColorPickButton (frame4, "$parentRowColorPick", "rowColorPick", rowcolor_callback)
+ frame4.rowColorPick:SetPoint ("left", frame4.rowPickColorLabel, "right", 2, 0)
+ local background = window:CreateLineBackground (frame4, "rowColorPick", "rowPickColorLabel", Loc ["STRING_OPTIONS_BAR_COLOR_DESC"])
+ background:SetSize (50, 16)
+
+ -- bar texture by class color
+ g:NewLabel (frame4, _, "$parentUseClassColorsLabel", "classColorsLabel", Loc ["STRING_OPTIONS_TEXT_ROWCOLOR_NOTCLASS"], "GameFontHighlightLeft")
+ g:NewSwitch (frame4, _, "$parentClassColorSlider", "classColorSlider", 60, 20, _, _, instance.row_info.texture_class_colors)
+ frame4.classColorSlider:SetFrameLevel (frame4.rowColorPick:GetFrameLevel()+2)
+ frame4.classColorSlider:SetPoint ("left", frame4.classColorsLabel, "right", 2, -1)
+ frame4.classColorSlider.OnSwitch = function (self, instance, value)
+ instance:SetBarSettings (nil, nil, value)
+ end
+ frame4.classColorsLabel:SetPoint ("left", frame4.rowColorPick, "right", 3, 0)
+ window:CreateLineBackground (frame4, "classColorSlider", "classColorsLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"])
+
+
+ --> Bottom Texture
+
+ --anchor
+ g:NewLabel (frame4, _, "$parentRowLowerTextureAnchor", "rowLowerTextureLabel", Loc ["STRING_OPTIONS_TEXT_TEXTUREL_ANCHOR"], "GameFontNormal")
+
+ --texture
local onSelectTextureBackground = function (_, instance, textureName)
instance:SetBarSettings (nil, nil, nil, nil, textureName)
end
@@ -2939,67 +3319,45 @@ function window:CreateFrame4()
return texTable2
end
+ g:NewLabel (frame4, _, "$parentRowBackgroundTextureLabel", "rowBackgroundLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"], "GameFontHighlightLeft")
local d = g:NewDropDown (frame4, _, "$parentRowBackgroundTextureDropdown", "rowBackgroundDropdown", DROPDOWN_WIDTH, 20, buildTextureMenu2, nil)
d.onenter_backdrop = dropdown_backdrop_onenter
d.onleave_backdrop = dropdown_backdrop_onleave
d:SetBackdrop (dropdown_backdrop)
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
- g:NewLabel (frame4, _, "$parentRowBackgroundTextureLabel", "rowBackgroundLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"], "GameFontHighlightLeft")
- --
frame4.rowBackgroundDropdown:SetPoint ("left", frame4.rowBackgroundLabel, "right", 2)
+ window:CreateLineBackground (frame4, "rowBackgroundDropdown", "rowBackgroundLabel", Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"])
+
+ --bar background color
+ local rowcolorbackground_callback = function (button, r, g, b, a)
+ _G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a})
+ end
+ g:NewColorPickButton (frame4, "$parentRowBackgroundColorPick", "rowBackgroundColorPick", rowcolorbackground_callback)
+ g:NewLabel (frame4, _, "$parentRowBackgroundColorPickLabel", "rowBackgroundPickLabel", Loc ["STRING_OPTIONS_TEXT_ROWCOLOR"], "GameFontHighlightLeft")
+ frame4.rowBackgroundColorPick:SetPoint ("left", frame4.rowBackgroundPickLabel, "right", 2, 0)
- frame4.rowBackgroundDropdown.info = Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"]
- window:create_line_background (frame4, frame4.rowBackgroundLabel, frame4.rowBackgroundDropdown)
- frame4.rowBackgroundDropdown:SetHook ("OnEnter", background_on_enter)
- frame4.rowBackgroundDropdown:SetHook ("OnLeave", background_on_leave)
-
- -- background color
- g:NewLabel (frame4, _, "$parentRowBackgroundColorLabel", "rowBackgroundColorLabel", Loc ["STRING_OPTIONS_BAR_BCOLOR"], "GameFontHighlightLeft")
-
- -- back background with class color
+ local background = window:CreateLineBackground (frame4, "rowBackgroundColorPick", "rowBackgroundPickLabel", Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"])
+ background:SetSize (50, 16)
+
+ --bar texture by class color
+ g:NewSwitch (frame4, _, "$parentBackgroundClassColorSlider", "rowBackgroundColorByClassSlider", 60, 20, _, _, instance.row_info.texture_background_class_color)
g:NewLabel (frame4, _, "$parentRowBackgroundClassColorLabel", "rowBackgroundColorByClassLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"], "GameFontHighlightLeft")
-
+ frame4.rowBackgroundColorByClassSlider:SetFrameLevel (frame4.rowBackgroundColorPick:GetFrameLevel()+2)
frame4.rowBackgroundColorByClassSlider:SetPoint ("left", frame4.rowBackgroundColorByClassLabel, "right", 2)
frame4.rowBackgroundColorByClassSlider.OnSwitch = function (self, instance, value)
instance:SetBarSettings (nil, nil, nil, nil, nil, value)
end
- frame4.rowBackgroundColorByClassSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"]
- window:create_line_background (frame4, frame4.rowBackgroundColorByClassLabel, frame4.rowBackgroundColorByClassSlider)
- frame4.rowBackgroundColorByClassSlider:SetHook ("OnEnter", background_on_enter)
- frame4.rowBackgroundColorByClassSlider:SetHook ("OnLeave", background_on_leave)
+ window:CreateLineBackground (frame4, "rowBackgroundColorByClassSlider", "rowBackgroundColorByClassLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"])
- -- height
- g:NewLabel (frame4, _, "$parentRowHeightLabel", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"], "GameFontHighlightLeft")
- --
- frame4.rowHeightSlider:SetPoint ("left", frame4.rowHeightLabel, "right", 2)
- frame4.rowHeightSlider:SetThumbSize (50)
- frame4.rowHeightSlider:SetHook ("OnValueChange", function (self, instance, amount)
- instance.row_info.height = amount
- instance.row_height = instance.row_info.height+instance.row_info.space.between
- instance:RefreshBars()
- instance:InstanceReset()
- instance:ReajustaGump()
- end)
+ frame4.rowBackgroundColorByClassLabel:SetPoint ("left", frame4.rowBackgroundColorPick, "right", 3)
+
+
+ --> Icons
+ --anchors
+ g:NewLabel (frame4, _, "$parentIconsAnchor", "rowIconsLabel", Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"], "GameFontNormal")
- frame4.rowHeightSlider.info = Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"]
- window:create_line_background (frame4, frame4.rowHeightLabel, frame4.rowHeightSlider)
- frame4.rowHeightSlider:SetHook ("OnEnter", background_on_enter)
- frame4.rowHeightSlider:SetHook ("OnLeave", background_on_leave)
-
- -- texture color by class color
- g:NewLabel (frame4, _, "$parentUseClassColorsLabel", "classColorsLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS"], "GameFontHighlightLeft")
- frame4.classColorSlider:SetPoint ("left", frame4.classColorsLabel, "right", 2)
- frame4.classColorSlider.OnSwitch = function (self, instance, value)
- instance:SetBarSettings (nil, nil, value)
- end
-
- frame4.classColorSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"]
- window:create_line_background (frame4, frame4.classColorsLabel, frame4.classColorSlider)
- frame4.classColorSlider:SetHook ("OnEnter", background_on_enter)
- frame4.classColorSlider:SetHook ("OnLeave", background_on_leave)
-
--icon file
g:NewLabel (frame4, _, "$parentIconFileLabel", "iconFileLabel", Loc ["STRING_OPTIONS_BAR_ICONFILE"], "GameFontHighlightLeft")
g:NewTextEntry (frame4, _, "$parentIconFileEntry", "iconFileEntry", 180, 20)
@@ -3066,22 +3424,18 @@ function window:CreateFrame4()
frame4.barSortDirectionLabel:SetPoint (10, -120) --sort direction
frame4.rowUpperTextureLabel:SetPoint (10, -155) --anchor
-
frame4.textureLabel:SetPoint (10, -180) --bar texture
- frame4.rowAlphaLabel:SetPoint (10, -205) --bar alpha slider
- frame4.classColorsLabel:SetPoint (10, -230) --class color
+ frame4.rowPickColorLabel:SetPoint (10, -205) --color pick
- frame4.rowPickColorLabel:SetPoint (10, -255)
+ frame4.rowLowerTextureLabel:SetPoint (10, -240)
+ frame4.rowBackgroundLabel:SetPoint (10, -265) --select background
+ frame4.rowBackgroundPickLabel:SetPoint (10, -290) --bar color background
- frame4.rowLowerTextureLabel:SetPoint (10, -290)
+ --frame4.rowBackgroundColorByClassLabel:SetPoint (10, -340) --class color background
- frame4.rowBackgroundLabel:SetPoint (10, -315) --select background
- frame4.rowBackgroundColorByClassLabel:SetPoint (10, -340) --class color background
- frame4.rowBackgroundPickLabel:SetPoint (10, -365) --bar color background
-
- frame4.rowIconsLabel:SetPoint (10, -405)
- frame4.iconFileLabel:SetPoint (10, -455)
- frame4.barStartLabel:SetPoint (10, -430)
+ frame4.rowIconsLabel:SetPoint (10, -325)
+ frame4.iconFileLabel:SetPoint (10, -350)
+ frame4.barStartLabel:SetPoint (10, -375)
end
@@ -3314,7 +3668,7 @@ function window:CreateFrame5()
frame5.fixedTextColorLabel:SetPoint (10, -220)
frame5.percentLabel:SetPoint (10, -245)
- g:NewLabel (frame5, _, "$parentCustomRightTextAnchor", "customRightTextAnchorLabel", "Custom Right Text", "GameFontNormal")
+ g:NewLabel (frame5, _, "$parentCustomRightTextAnchor", "customRightTextAnchorLabel", Loc ["STRING_OPTIONS_BARRIGHTTEXTCUSTOM_ANCHOR"], "GameFontNormal")
frame5.customRightTextAnchorLabel:SetPoint (10, -280)
frame5.cutomRightTextLabel:SetPoint (10, -305)
frame5.cutomRightTextEntryLabel:SetPoint (10, -330)
@@ -3445,9 +3799,7 @@ function window:CreateFrame6()
window:create_line_background (frame6, frame6.stretchAlwaysOnTopLabel, frame6.stretchAlwaysOnTopSlider)
frame6.stretchAlwaysOnTopSlider:SetHook ("OnEnter", background_on_enter)
frame6.stretchAlwaysOnTopSlider:SetHook ("OnLeave", background_on_leave)
-
-
-
+
-- instance toolbar side
g:NewSwitch (frame6, _, "$parentInstanceToolbarSideSlider", "instanceToolbarSideSlider", 80, 20, Loc ["STRING_BOTTOM"], Loc ["STRING_TOP"], instance.toolbar_side, nil, grow_switch_func, grow_return_func)
g:NewLabel (frame6, _, "$parentInstanceToolbarSideLabel", "instanceToolbarSideLabel", Loc ["STRING_OPTIONS_TOOLBARSIDE"], "GameFontHighlightLeft")
@@ -3456,7 +3808,8 @@ function window:CreateFrame6()
frame6.instanceToolbarSideSlider.OnSwitch = function (self, instance, value)
instance.toolbar_side = value
instance:ToolbarSide (side)
-
+ _G.DetailsOptionsWindow8:update_menuanchor_xy (instance)
+ _G.DetailsOptionsWindow7:update_menuanchor_xy (instance)
end
frame6.instanceToolbarSideSlider.thumb:SetSize (50, 12)
@@ -3659,6 +4012,16 @@ function window:CreateFrame7()
frame7.menuAnchorYSlider:SetHook ("OnEnter", background_on_enter)
frame7.menuAnchorYSlider:SetHook ("OnLeave", background_on_leave)
+ function frame7:update_menuanchor_xy (instance)
+ if (instance.toolbar_side == 1) then --top
+ frame7.menuAnchorXSlider:SetValue (editing_instance.menu_anchor [1])
+ frame7.menuAnchorYSlider:SetValue (editing_instance.menu_anchor [2])
+ elseif (instance.toolbar_side == 2) then --bottom
+ frame7.menuAnchorXSlider:SetValue (editing_instance.menu_anchor_down [1])
+ frame7.menuAnchorYSlider:SetValue (editing_instance.menu_anchor_down [2])
+ end
+ end
+
-- menu anchor left and right
local menusode_switch_func = function (slider, value)
@@ -3832,7 +4195,7 @@ function window:CreateFrame7()
frame7.menuIconSizeSlider:SetHook ("OnLeave", background_on_leave)
--auto hide menus
--text anchor on options menu
- g:NewLabel (frame7, _, "$parentAutoHideLabelAnchor", "autoHideLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_ANCHOR"], "GameFontNormal")
+ --g:NewLabel (frame7, _, "$parentAutoHideLabelAnchor", "autoHideLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_ANCHOR"], "GameFontNormal")
--left
g:NewLabel (frame7, _, "$parentAutoHideLeftMenuLabel", "autoHideLeftMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_LEFT"], "GameFontHighlightLeft")
@@ -3844,14 +4207,7 @@ function window:CreateFrame7()
end
window:CreateLineBackground (frame7, "autoHideLeftMenuSwitch", "autoHideLeftMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_DESC"])
--right
- g:NewLabel (frame7, _, "$parentAutoHideRightMenuLabel", "autoHideRightMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_RIGHT"], "GameFontHighlightLeft")
- g:NewSwitch (frame7, _, "$parentAutoHideRightMenuSwitch", "autoHideRightMenuSwitch", 60, 20, nil, nil, instance.auto_hide_menu.right)
- frame7.autoHideRightMenuSwitch:SetPoint ("left", frame7.autoHideRightMenuLabel, "right", 2)
- frame7.autoHideRightMenuSwitch.OnSwitch = function (self, instance, value)
- --do something
- instance:SetAutoHideMenu (nil, value)
- end
- window:CreateLineBackground (frame7, "autoHideRightMenuSwitch", "autoHideRightMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_DESC"])
+
--> anchors
titulo_toolbar:SetPoint (10, -10)
@@ -3865,9 +4221,9 @@ function window:CreateFrame7()
label_icons:SetPoint (10, -220)
frame7.menuIconSizeLabel:SetPoint (10, -245)
- frame7.autoHideLabel:SetPoint (10, -280)
- frame7.autoHideLeftMenuLabel:SetPoint (10, -305)
- frame7.autoHideRightMenuLabel:SetPoint (10, -330)
+ --frame7.autoHideLabel:SetPoint (10, -280)
+ frame7.autoHideLeftMenuLabel:SetPoint (10, -270)
+ --frame7.autoHideRightMenuLabel:SetPoint (10, -330)
@@ -3885,83 +4241,167 @@ function window:CreateFrame8()
local titulo_toolbar2_desc = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbar2Label", Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS_DESC"], "GameFontNormal", 9, "white")
titulo_toolbar2_desc.width = 320
- --> close button
- --button overlay
- local close_overlay_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetCloseButtonSettings ({r, g, b, a})
- end
- g:NewColorPickButton (frame8, "$parentCloseButtonColorPick", "closeButtonColorPick", close_overlay_callback)
- g:NewLabel (frame8, _, "$parentWindowCloseButtonLabel", "closeButtonColorLabel", Loc ["STRING_OPTIONS_CLOSE_OVERLAY"], "GameFontHighlightLeft")
- frame8.closeButtonColorPick:SetPoint ("left", frame8.closeButtonColorLabel, "right", 2, 0)
-
- frame8.closeButtonColorPick.info = Loc ["STRING_OPTIONS_CLOSE_OVERLAY_DESC"]
- window:create_line_background (frame8, frame8.closeButtonColorLabel, frame8.closeButtonColorPick)
- frame8.closeButtonColorPick:SetHook ("OnEnter", background_on_enter)
- frame8.closeButtonColorPick:SetHook ("OnLeave", background_on_leave)
-
- --> reset button
- --text color pick
-
- local reset_textcolor_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetDeleteButtonSettings (nil, nil, {r, g, b, a}, nil)
- end
- g:NewColorPickButton (frame8, "$parentResetTextColorPick", "resetTextColorPick", reset_textcolor_callback)
- g:NewLabel (frame8, _, "$parentResetTextLabel", "resetTextColorPickLabel", Loc ["STRING_OPTIONS_RESET_TEXTCOLOR"], "GameFontHighlightLeft")
- frame8.resetTextColorPick:SetPoint ("left", frame8.resetTextColorPickLabel, "right", 2, 0)
-
- frame8.resetTextColorPick.info = Loc ["STRING_OPTIONS_RESET_TEXTCOLOR_DESC"]
- window:create_line_background (frame8, frame8.resetTextColorPickLabel, frame8.resetTextColorPick)
- frame8.resetTextColorPick:SetHook ("OnEnter", background_on_enter)
- frame8.resetTextColorPick:SetHook ("OnLeave", background_on_leave)
-
- --text size
- local s = g:NewSlider (frame8, _, "$parentResetTextSizeSlider", "resetTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.resetbutton_info.text_size))
+ --> general settings:
+ -- menu anchors
+ local s = g:NewSlider (frame8, _, "$parentMenuAnchorXSlider", "menuAnchorXSlider", SLIDER_WIDTH, 20, -200, 200, 1, instance.menu2_anchor[1])
+ s:SetBackdrop (slider_backdrop)
+ s:SetBackdropColor (unpack (slider_backdrop_color))
+ s:SetThumbSize (50)
+ local s = g:NewSlider (frame8, _, "$parentMenuAnchorYSlider", "menuAnchorYSlider", SLIDER_WIDTH, 20, -30, 30, 1, instance.menu2_anchor[2])
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
- frame8.resetTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount)
- instance:SetDeleteButtonSettings (nil, amount)
+ g:NewLabel (frame8, _, "$parentMenuAnchorXLabel", "menuAnchorXLabel", Loc ["STRING_OPTIONS_MENU2_X"], "GameFontHighlightLeft")
+ g:NewLabel (frame8, _, "$parentMenuAnchorYLabel", "menuAnchorYLabel", Loc ["STRING_OPTIONS_MENU2_Y"], "GameFontHighlightLeft")
+
+ frame8.menuAnchorXSlider:SetPoint ("left", frame8.menuAnchorXLabel, "right", 2, -1)
+ frame8.menuAnchorYSlider:SetPoint ("left", frame8.menuAnchorYLabel, "right", 2)
+
+ frame8.menuAnchorXSlider:SetThumbSize (50)
+ frame8.menuAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x)
+ instance:Menu2Anchor (x, nil)
+ end)
+ frame8.menuAnchorYSlider:SetThumbSize (50)
+ frame8.menuAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y)
+ instance:Menu2Anchor (nil, y)
end)
- --reset always small
- g:NewSwitch (frame8, _, "$parentResetAlwaysSmallSlider", "resetAlwaysSmallSlider", 60, 20, _, _, instance.resetbutton_info.always_small)
+ frame8.menuAnchorXSlider.info = Loc ["STRING_OPTIONS_MENU2_X_DESC"]
+ window:create_line_background (frame8, frame8.menuAnchorXLabel, frame8.menuAnchorXSlider)
+ frame8.menuAnchorXSlider:SetHook ("OnEnter", background_on_enter)
+ frame8.menuAnchorXSlider:SetHook ("OnLeave", background_on_leave)
- --text face
- local reset_text_color_onselectfont = function (_, instance, fontName)
- _G.DetailsOptionsWindow.instance:SetDeleteButtonSettings (fontName)
- end
- local reset_text_color_build_font_menu = function()
- local fontObjects = SharedMedia:HashTable ("font")
- local fontTable = {}
- for name, fontPath in pairs (fontObjects) do
- fontTable[#fontTable+1] = {value = name, label = name, onclick = reset_text_color_onselectfont, font = fontPath, descfont = name, desc = "Way back up in the woods among the evergreens\nThere stood a log cabin made of earth and wood."}
+ frame8.menuAnchorYSlider.info = Loc ["STRING_OPTIONS_MENU2_X_DESC"]
+ window:create_line_background (frame8, frame8.menuAnchorYLabel, frame8.menuAnchorYSlider)
+ frame8.menuAnchorYSlider:SetHook ("OnEnter", background_on_enter)
+ frame8.menuAnchorYSlider:SetHook ("OnLeave", background_on_leave)
+
+ function frame8:update_menuanchor_xy (instance)
+ if (instance.toolbar_side == 1) then --top
+ frame8.menuAnchorXSlider:SetValue (editing_instance.menu2_anchor [1])
+ frame8.menuAnchorYSlider:SetValue (editing_instance.menu2_anchor [2])
+ elseif (instance.toolbar_side == 2) then --bottom
+ frame8.menuAnchorXSlider:SetValue (editing_instance.menu2_anchor_down [1])
+ frame8.menuAnchorYSlider:SetValue (editing_instance.menu2_anchor_down [2])
end
- table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
- return fontTable
end
- local d = g:NewDropDown (frame8, _, "$parentResetTextFontDropdown", "resetTextFontDropdown", DROPDOWN_WIDTH, 20, reset_text_color_build_font_menu, nil)
- d.onenter_backdrop = dropdown_backdrop_onenter
- d.onleave_backdrop = dropdown_backdrop_onleave
- d:SetBackdrop (dropdown_backdrop)
- d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
+
+ -- desaturate
+ g:NewSwitch (frame8, _, "$parentDesaturateMenuSlider", "desaturateMenuSlider", 60, 20, _, _, instance.desaturated_menu2)
+ g:NewLabel (frame8, _, "$parentDesaturateMenuLabel", "desaturateMenuLabel", Loc ["STRING_OPTIONS_DESATURATE_MENU"], "GameFontHighlightLeft")
+
+ frame8.desaturateMenuSlider:SetPoint ("left", frame8.desaturateMenuLabel, "right", 2)
+ frame8.desaturateMenuSlider.OnSwitch = function (self, instance, value)
+ instance:DesaturateMenu2 (value)
+ end
+ frame8.desaturateMenuSlider.info = Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"]
+ window:create_line_background (frame8, frame8.desaturateMenuLabel, frame8.desaturateMenuSlider)
+ frame8.desaturateMenuSlider:SetHook ("OnEnter", background_on_enter)
+ frame8.desaturateMenuSlider:SetHook ("OnLeave", background_on_leave)
+
+ --> show or hide buttons
+ local label_icons = g:NewLabel (frame8, _, "$parentShowButtonsLabel", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS"], "GameFontHighlightLeft")
+ local icon1 = g:NewImage (frame8, [[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 20, 20, "border", nil, "icon1", nil)
+ local icon2 = g:NewImage (frame8, [[Interface\AddOns\Details\images\icons]], 10, 14, "border", nil, "icon2", nil)
+ icon2:SetTexCoord (0.248046875, 0.287109375, 0.078125, 0.12890625) --127 40 147 66
+ icon2:SetVertexColor (.8, .8, .8, 1)
+ local icon3 = g:NewImage (frame8, [[Interface\AddOns\Details\images\reset_button]], 12, 20, "border", nil, "icon3", nil)
+
+ local X1 = g:NewImage (frame8, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x1", nil)
+ local X2 = g:NewImage (frame8, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x2", nil)
+ local X3 = g:NewImage (frame8, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x3", nil)
+ X1:SetVertexColor (1, 1, 1, .9)
+ X2:SetVertexColor (1, 1, 1, .9)
+ X3:SetVertexColor (1, 1, 1, .9)
+ local x_container = {X1, X2, X3}
+
+ local func = function (menu_button, arg1, arg2)
+ local instance = _G.DetailsOptionsWindow.instance
+ instance.menu2_icons [menu_button] = not instance.menu2_icons [menu_button]
+ instance:ToolbarMenu2Buttons()
+
+ if (instance.menu2_icons [menu_button]) then
+ x_container [menu_button]:Hide()
+ else
+ x_container [menu_button]:Show()
+ end
+ end
+
+ local button1 = g:NewButton (frame8, _, "$parentShowButtons1", "showButtons1Button", 21, 21, func, 1)
+ button1:InstallCustomTexture()
+ local button2 = g:NewButton (frame8, _, "$parentShowButtons2", "showButtons2Button", 21, 21, func, 2)
+ button2:InstallCustomTexture()
+ local button3 = g:NewButton (frame8, _, "$parentShowButtons3", "showButtons3Button", 21, 21, func, 3)
+ button3:InstallCustomTexture()
+
+ function frame8:update_icon_buttons (instance)
+ for i = 1, 3 do
+ if (instance.menu2_icons [i]) then
+ x_container [i]:Hide()
+ else
+ x_container [i]:Show()
+ end
+ end
+ end
+
+ button1:SetPoint ("left", label_icons, "right", 5, 0)
+ icon1:SetPoint ("center", button1, "center")
+ X1:SetPoint ("center", button1, "center")
+
+ button2:SetPoint ("left", icon1, "right", 2, 0)
+ icon2:SetPoint ("center", button2, "center")
+ X2:SetPoint ("center", button2, "center")
+
+ button3:SetPoint ("left", button2, "right", 2, 0)
+ icon3:SetPoint ("center", button3, "center")
+ X3:SetPoint ("center", button3, "center")
+
+ window:CreateLineBackground (frame8, "showButtons1Button", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS_DESC"])
+
+ --icon sizes
+ local s = g:NewSlider (frame8, _, "$parentMenuIconSizeSlider", "menuIconSizeSlider", SLIDER_WIDTH, 20, 0.4, 1.6, 0.05, instance.menu_icons_size, true)
+ s:SetBackdrop (slider_backdrop)
+ s:SetBackdropColor (unpack (slider_backdrop_color))
+ s.useDecimals = true
+ s.fine_tuning = 0.05
+
+ g:NewLabel (frame8, _, "$parentMenuIconSizeLabel", "menuIconSizeLabel", Loc ["STRING_OPTIONS_MENU_BUTTONSSIZE"], "GameFontHighlightLeft")
+
+ frame8.menuIconSizeSlider:SetPoint ("left", frame8.menuIconSizeLabel, "right", 2, -1)
+
+ frame8.menuIconSizeSlider:SetHook ("OnValueChange", function (self, instance, value)
+ instance:ToolbarMenu2ButtonsSize (value)
+ end)
+
+ frame8.menuIconSizeSlider.info = Loc ["STRING_OPTIONS_MENU_BUTTONSSIZE_DESC"]
+ window:create_line_background (frame8, frame8.menuIconSizeLabel, frame8.menuIconSizeSlider)
+ frame8.menuIconSizeSlider:SetHook ("OnEnter", background_on_enter)
+ frame8.menuIconSizeSlider:SetHook ("OnLeave", background_on_leave)
+
--> instance button
- --text color pick
--text size
- local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.instancebutton_info.text_size))
+ local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.instancebutton_config.textsize))
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
frame8.instanceTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount)
- instance:SetInstanceButtonSettings (nil, amount)
+ instance:ToolbarMenu2InstanceButtonSettings (nil, nil, amount, nil)
end)
- --button overlay
+
+ g:NewLabel (frame8, _, "$parentInstanceTextSizeLabel", "instanceTextSizeLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"], "GameFontHighlightLeft")
+ frame8.instanceTextSizeSlider:SetPoint ("left", frame8.instanceTextSizeLabel, "right", 2)
+
+ frame8.instanceTextSizeSlider.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"]
+ window:create_line_background (frame8, frame8.instanceTextSizeLabel, frame8.instanceTextSizeSlider)
+ frame8.instanceTextSizeSlider:SetHook ("OnEnter", background_on_enter)
+ frame8.instanceTextSizeSlider:SetHook ("OnLeave", background_on_leave)
--text face
local instance_text_color_onselectfont = function (_, instance, fontName)
- instance:SetInstanceButtonSettings (fontName)
+ instance:ToolbarMenu2InstanceButtonSettings (nil, fontName, nil, nil)
end
local instance_text_color_build_font_menu = function()
local fontObjects = SharedMedia:HashTable ("font")
@@ -3978,60 +4418,17 @@ function window:CreateFrame8()
d:SetBackdrop (dropdown_backdrop)
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
-
-
- -- reset button
-
- -- text font
+ g:NewLabel (frame8, _, "$parentInstanceTextFontLabel", "instanceTextFontLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"], "GameFontHighlightLeft")
+ frame8.instanceTextFontDropdown:SetPoint ("left", frame8.instanceTextFontLabel, "right", 2)
- g:NewLabel (frame8, _, "$parentResetTextFontLabel", "resetTextFontLabel", Loc ["STRING_OPTIONS_RESET_TEXTFONT"], "GameFontHighlightLeft")
- frame8.resetTextFontDropdown:SetPoint ("left", frame8.resetTextFontLabel, "right", 2)
+ frame8.instanceTextFontDropdown.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"]
+ window:create_line_background (frame8, frame8.instanceTextFontLabel, frame8.instanceTextFontDropdown)
+ frame8.instanceTextFontDropdown:SetHook ("OnEnter", background_on_enter)
+ frame8.instanceTextFontDropdown:SetHook ("OnLeave", background_on_leave)
- frame8.resetTextFontDropdown.info = Loc ["STRING_OPTIONS_RESET_TEXTFONT_DESC"]
- window:create_line_background (frame8, frame8.resetTextFontLabel, frame8.resetTextFontDropdown)
- frame8.resetTextFontDropdown:SetHook ("OnEnter", background_on_enter)
- frame8.resetTextFontDropdown:SetHook ("OnLeave", background_on_leave)
-
- -- text size
- g:NewLabel (frame8, _, "$parentResetTextSizeLabel", "resetTextSizeLabel", Loc ["STRING_OPTIONS_RESET_TEXTSIZE"], "GameFontHighlightLeft")
- frame8.resetTextSizeSlider:SetPoint ("left", frame8.resetTextSizeLabel, "right", 2)
-
- frame8.resetTextSizeSlider.info = Loc ["STRING_OPTIONS_RESET_TEXTSIZE_DESC"]
- window:create_line_background (frame8, frame8.resetTextSizeLabel, frame8.resetTextSizeSlider)
- frame8.resetTextSizeSlider:SetHook ("OnEnter", background_on_enter)
- frame8.resetTextSizeSlider:SetHook ("OnLeave", background_on_leave)
-
- -- color overlay
- local reset_overlaycolor_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetDeleteButtonSettings (nil, nil, nil, {r, g, b, a})
- end
- g:NewColorPickButton (frame8, "$parentResetOverlayColorPick", "resetOverlayColorPick", reset_overlaycolor_callback)
- g:NewLabel (frame8, _, "$parentResetOverlayLabel", "resetOverlayColorPickLabel", Loc ["STRING_OPTIONS_RESET_OVERLAY"], "GameFontHighlightLeft")
- frame8.resetOverlayColorPick:SetPoint ("left", frame8.resetOverlayColorPickLabel, "right", 2, 0)
-
- frame8.resetOverlayColorPick.info = Loc ["STRING_OPTIONS_RESET_OVERLAY_DESC"]
- window:create_line_background (frame8, frame8.resetOverlayColorPickLabel, frame8.resetOverlayColorPick)
- frame8.resetOverlayColorPick:SetHook ("OnEnter", background_on_enter)
- frame8.resetOverlayColorPick:SetHook ("OnLeave", background_on_leave)
-
- -- reset always small
- g:NewLabel (frame8, _, "$parentResetAlwaysSmallLabel", "resetAlwaysSmallLabel", Loc ["STRING_OPTIONS_RESET_SMALL"], "GameFontHighlightLeft")
-
- frame8.resetAlwaysSmallSlider:SetPoint ("left", frame8.resetAlwaysSmallLabel, "right", 2)
- frame8.resetAlwaysSmallSlider.OnSwitch = function (self, instance, value)
- instance:SetDeleteButtonSettings (nil, nil, nil, nil, value)
- end
-
- frame8.resetAlwaysSmallSlider.info = Loc ["STRING_OPTIONS_RESET_SMALL_DESC"]
- window:create_line_background (frame8, frame8.resetAlwaysSmallLabel, frame8.resetAlwaysSmallSlider)
- frame8.resetAlwaysSmallSlider:SetHook ("OnEnter", background_on_enter)
- frame8.resetAlwaysSmallSlider:SetHook ("OnLeave", background_on_leave)
-
- -- instance button
-- text color
-
local instance_textcolor_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetInstanceButtonSettings (nil, nil, {r, g, b, a})
+ _G.DetailsOptionsWindow.instance:ToolbarMenu2InstanceButtonSettings ({r, g, b, a}, nil, nil, nil)
end
g:NewColorPickButton (frame8, "$parentInstanceTextColorPick", "instanceTextColorPick", instance_textcolor_callback)
g:NewLabel (frame8, _, "$parentInstanceTextLabel", "instanceTextColorPickLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"], "GameFontHighlightLeft")
@@ -4041,106 +4438,44 @@ function window:CreateFrame8()
window:create_line_background (frame8, frame8.instanceTextColorPickLabel, frame8.instanceTextColorPick)
frame8.instanceTextColorPick:SetHook ("OnEnter", background_on_enter)
frame8.instanceTextColorPick:SetHook ("OnLeave", background_on_leave)
-
- -- text font
- g:NewLabel (frame8, _, "$parentInstanceTextFontLabel", "instanceTextFontLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"], "GameFontHighlightLeft")
- frame8.instanceTextFontDropdown:SetPoint ("left", frame8.instanceTextFontLabel, "right", 2)
-
- frame8.instanceTextFontDropdown.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"]
- window:create_line_background (frame8, frame8.instanceTextFontLabel, frame8.instanceTextFontDropdown)
- frame8.instanceTextFontDropdown:SetHook ("OnEnter", background_on_enter)
- frame8.instanceTextFontDropdown:SetHook ("OnLeave", background_on_leave)
-
- -- text size
- g:NewLabel (frame8, _, "$parentInstanceTextSizeLabel", "instanceTextSizeLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"], "GameFontHighlightLeft")
- frame8.instanceTextSizeSlider:SetPoint ("left", frame8.instanceTextSizeLabel, "right", 2)
-
- frame8.instanceTextSizeSlider.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"]
- window:create_line_background (frame8, frame8.instanceTextSizeLabel, frame8.instanceTextSizeSlider)
- frame8.instanceTextSizeSlider:SetHook ("OnEnter", background_on_enter)
- frame8.instanceTextSizeSlider:SetHook ("OnLeave", background_on_leave)
- -- color overlay
-
- local instance_overlaycolor_callback = function (button, r, g, b, a)
- _G.DetailsOptionsWindow.instance:SetInstanceButtonSettings (nil, nil, nil, {r, g, b, a})
+ --text shadow
+ g:NewLabel (frame8, _, "$parentInstanceTextShadowLabel", "instanceTextShadowLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SHADOW"], "GameFontHighlightLeft")
+ g:NewSwitch (frame8, _, "$parentInstanceTexShadowtSwitch", "instanceTextShadowSwitch", 60, 20, nil, nil, instance.instancebutton_config.textshadow)
+ frame8.instanceTextShadowSwitch:SetPoint ("left", frame8.instanceTextShadowLabel, "right", 2)
+ frame8.instanceTextShadowSwitch.OnSwitch = function (self, instance, value)
+ instance:ToolbarMenu2InstanceButtonSettings (nil, nil, nil, value)
end
- g:NewColorPickButton (frame8, "$parentInstanceOverlayColorPick", "instanceOverlayColorPick", instance_overlaycolor_callback)
- g:NewLabel (frame8, _, "$parentInstanceOverlayLabel", "instanceOverlayColorPickLabel", Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"], "GameFontHighlightLeft")
- frame8.instanceOverlayColorPick:SetPoint ("left", frame8.instanceOverlayColorPickLabel, "right", 2, 0)
-
- frame8.instanceOverlayColorPick.info = Loc ["STRING_OPTIONS_INSTANCE_OVERLAY_DESC"]
- window:create_line_background (frame8, frame8.instanceOverlayColorPickLabel, frame8.instanceOverlayColorPick)
- frame8.instanceOverlayColorPick:SetHook ("OnEnter", background_on_enter)
- frame8.instanceOverlayColorPick:SetHook ("OnLeave", background_on_leave)
+ window:CreateLineBackground (frame8, "instanceTextShadowSwitch", "instanceTextShadowLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SHADOW_DESC"])
- --> instance button anchor
- local s = g:NewSlider (frame8, _, "$parentInstanceButtonAnchorXSlider", "instanceButtonAnchorXSlider", SLIDER_WIDTH, 20, -200, 20, 1, instance.instance_button_anchor[1])
- s:SetBackdrop (slider_backdrop)
- s:SetBackdropColor (unpack (slider_backdrop_color))
- s:SetThumbSize (50)
- local s = g:NewSlider (frame8, _, "$parentInstanceButtonAnchorYSlider", "instanceButtonAnchorYSlider", SLIDER_WIDTH, 20, -10, 10, 1, instance.instance_button_anchor[2])
- s:SetBackdrop (slider_backdrop)
- s:SetBackdropColor (unpack (slider_backdrop_color))
- s:SetThumbSize (50)
-
- g:NewLabel (frame8, _, "$parentInstanceButtonAnchorXLabel", "instanceButtonAnchorXLabel", Loc ["STRING_OPTIONS_INSBUTTON_X"], "GameFontHighlightLeft")
- frame8.instanceButtonAnchorXSlider:SetPoint ("left", frame8.instanceButtonAnchorXLabel, "right", 2)
- frame8.instanceButtonAnchorXSlider:SetThumbSize (50)
- frame8.instanceButtonAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x)
- instance:InstanceButtonAnchor (x, nil)
- end)
+ --> auto hide menu
+ g:NewLabel (frame8, _, "$parentAutoHideRightMenuLabel", "autoHideRightMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_RIGHT"], "GameFontHighlightLeft")
+ g:NewSwitch (frame8, _, "$parentAutoHideRightMenuSwitch", "autoHideRightMenuSwitch", 60, 20, nil, nil, instance.auto_hide_menu.right)
+ frame8.autoHideRightMenuSwitch:SetPoint ("left", frame8.autoHideRightMenuLabel, "right", 2)
+ frame8.autoHideRightMenuSwitch.OnSwitch = function (self, instance, value)
+ --do something
+ instance:SetAutoHideMenu (nil, value)
+ end
+ window:CreateLineBackground (frame8, "autoHideRightMenuSwitch", "autoHideRightMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_DESC"])
- frame8.instanceButtonAnchorXSlider.info = Loc ["STRING_OPTIONS_INSBUTTON_X_DESC"]
- window:create_line_background (frame8, frame8.instanceButtonAnchorXLabel, frame8.instanceButtonAnchorXSlider)
- frame8.instanceButtonAnchorXSlider:SetHook ("OnEnter", background_on_enter)
- frame8.instanceButtonAnchorXSlider:SetHook ("OnLeave", background_on_leave)
-
- g:NewLabel (frame8, _, "$parentInstanceButtonAnchorYLabel", "instanceButtonAnchorYLabel", Loc ["STRING_OPTIONS_INSBUTTON_Y"], "GameFontHighlightLeft")
- frame8.instanceButtonAnchorYSlider:SetPoint ("left", frame8.instanceButtonAnchorYLabel, "right", 2)
- frame8.instanceButtonAnchorYSlider:SetThumbSize (50)
- frame8.instanceButtonAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y)
- instance:InstanceButtonAnchor (nil, y)
- end)
-
- frame8.instanceButtonAnchorYSlider.info =Loc ["STRING_OPTIONS_INSBUTTON_Y_DESC"]
- window:create_line_background (frame8, frame8.instanceButtonAnchorYLabel, frame8.instanceButtonAnchorYSlider)
- frame8.instanceButtonAnchorYSlider:SetHook ("OnEnter", background_on_enter)
- frame8.instanceButtonAnchorYSlider:SetHook ("OnLeave", background_on_leave)
-
-
-
- -- close button
- -- color overlay
-
-
+ --> anchors
titulo_toolbar2:SetPoint (10, -10)
titulo_toolbar2_desc:SetPoint (10, -30)
+ frame8.menuAnchorXLabel:SetPoint (10, -70)
+ frame8.menuAnchorYLabel:SetPoint (10, -95)
+ frame8.desaturateMenuLabel:SetPoint (10, -120)
+ frame8.showButtonsLabel:SetPoint (10, -145)
+ frame8.menuIconSizeLabel:SetPoint (10, -170)
+ frame8.autoHideRightMenuLabel:SetPoint (10, -195)
+
g:NewLabel (frame8, _, "$parentInstanceButtonAnchor", "instanceAnchorLabel", Loc ["STRING_OPTIONS_INSTANCE_BUTTON_ANCHOR"], "GameFontNormal")
- g:NewLabel (frame8, _, "$parentResetButtonAnchor", "resetAnchorLabel", Loc ["STRING_OPTIONS_RESET_BUTTON_ANCHOR"], "GameFontNormal")
- g:NewLabel (frame8, _, "$parentCloseButtonAnchor", "closeAnchorLabel", Loc ["STRING_OPTIONS_CLOSE_BUTTON_ANCHOR"], "GameFontNormal")
+ frame8.instanceAnchorLabel:SetPoint (10, -230)
- frame8.instanceAnchorLabel:SetPoint (10, -75)
-
- frame8.instanceTextColorPickLabel:SetPoint (10, -100)
- frame8.instanceTextFontLabel:SetPoint (10, -125)
- frame8.instanceTextSizeLabel:SetPoint (10, -150)
- frame8.instanceOverlayColorPickLabel:SetPoint (10, -175)
- frame8.instanceButtonAnchorXLabel:SetPoint (10, -200)
- frame8.instanceButtonAnchorYLabel:SetPoint (10, -225)
-
- frame8.resetAnchorLabel:SetPoint (10, -260)
-
- frame8.resetTextColorPickLabel:SetPoint (10, -285)
- frame8.resetTextFontLabel:SetPoint (10, -310)
- frame8.resetTextSizeLabel:SetPoint (10, -335)
- frame8.resetOverlayColorPickLabel:SetPoint (10, -360)
- frame8.resetAlwaysSmallLabel:SetPoint (10, -385)
-
- frame8.closeAnchorLabel:SetPoint (10, -420)
-
- frame8.closeButtonColorLabel:SetPoint (10, -445)
+ frame8.instanceTextColorPickLabel:SetPoint (10, -255)
+ frame8.instanceTextFontLabel:SetPoint (10, -280)
+ frame8.instanceTextSizeLabel:SetPoint (10, -305)
+ frame8.instanceTextShadowLabel:SetPoint (10, -330)
end
@@ -4382,7 +4717,7 @@ function window:CreateFrame9()
{value = "ARCHEOLOGY", label = "Archeology", onclick = onSelectMainTexture, icon = [[Interface\ARCHEOLOGY\Arch-Icon-Marker]]},
{value = "CREDITS", label = "Burning Crusade", onclick = onSelectMainTexture, icon = [[Interface\ICONS\TEMP]]},
{value = "DEATHKNIGHT", label = "Death Knight", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DEATHKNIGHT"]},
- {value = "DRESSUP", label = "Class Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]},
+ {value = "DRESSUP", label = "Race Background", onclick = onSelectMainTexture, icon = [[Interface\ICONS\INV_Chest_Cloth_17]]},
{value = "DRUID", label = "Druid", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["DRUID"]},
{value = "HUNTER", label = "Hunter", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["HUNTER"]},
{value = "MAGE", label = "Mage", onclick = onSelectMainTexture, icon = _detalhes.class_icons_small, texcoord = _detalhes.class_coords ["MAGE"]},
@@ -4482,23 +4817,23 @@ function window:CreateFrame9()
--128 64
- local icon1 = g:NewImage (frame9, nil, 128, 64, nil, nil, nil, "$parentIcon1")
+ local icon1 = g:NewImage (frame9, nil, 128, 64, "border", nil, nil, "$parentIcon1")
icon1:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
icon1:SetPoint ("topleft", frame9.wallpaperPreviewAnchorLabel.widget, "bottomleft", 0, -5)
icon1:SetDrawLayer ("artwork", 0)
icon1:SetTexCoord (0.337890625, 0.5859375, 0.59375, 0.716796875-0.0009765625) --173 304 300 367
- local icon2 = g:NewImage (frame9, nil, 128, 64, nil, nil, nil, "$parentIcon2")
+ local icon2 = g:NewImage (frame9, nil, 128, 64, "border", nil, nil, "$parentIcon2")
icon2:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
icon2:SetPoint ("left", icon1.widget, "right")
icon2:SetDrawLayer ("artwork", 0)
icon2:SetTexCoord (0.337890625, 0.5859375, 0.59375, 0.716796875-0.0009765625) --173 304 300 367
- local icon3 = g:NewImage (frame9, nil, 128, 64, nil, nil, nil, "$parentIcon3")
+ local icon3 = g:NewImage (frame9, nil, 128, 64, "border", nil, nil, "$parentIcon3")
icon3:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
icon3:SetPoint ("top", icon1.widget, "bottom")
icon3:SetDrawLayer ("artwork", 0)
icon3:SetTexCoord (0.337890625, 0.5859375, 0.59375+0.0009765625, 0.716796875) --173 304 300 367
- local icon4 = g:NewImage (frame9, nil, 128, 64, nil, nil, nil, "$parentIcon4")
+ local icon4 = g:NewImage (frame9, nil, 128, 64, "border", nil, nil, "$parentIcon4")
icon4:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
icon4:SetPoint ("left", icon3.widget, "right")
icon4:SetDrawLayer ("artwork", 0)
@@ -4510,9 +4845,43 @@ function window:CreateFrame9()
icon4:SetVertexColor (.15, .15, .15, 1)
local preview = frame9:CreateTexture (nil, "overlay")
+ preview:SetDrawLayer ("overlay", 1)
preview:SetSize (256, 128)
preview:SetPoint ("topleft", frame9.wallpaperPreviewAnchorLabel.widget, "bottomleft", 0, -5)
+ local w, h = 20, 20
+ local L1 = frame9:CreateTexture (nil, "overlay")
+ L1:SetPoint ("topleft", preview, "topleft")
+ L1:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
+ L1:SetTexCoord (0.13671875+0.0009765625, 0.234375, 0.29296875, 0.1953125+0.0009765625)
+ L1:SetSize (w, h)
+ L1:SetDrawLayer ("overlay", 2)
+ L1:SetVertexColor (1, 1, 1, .8)
+
+ local L2 = frame9:CreateTexture (nil, "overlay")
+ L2:SetPoint ("bottomleft", preview, "bottomleft")
+ L2:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
+ L2:SetTexCoord (0.13671875+0.0009765625, 0.234375, 0.1953125+0.0009765625, 0.29296875)
+ L2:SetSize (w, h)
+ L2:SetDrawLayer ("overlay", 2)
+ L2:SetVertexColor (1, 1, 1, .8)
+
+ local L3 = frame9:CreateTexture (nil, "overlay")
+ L3:SetPoint ("bottomright", preview, "bottomright")
+ L3:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
+ L3:SetTexCoord (0.234375, 0.13671875+0.0009765625, 0.1953125+0.0009765625, 0.29296875)
+ L3:SetSize (w, h)
+ L3:SetDrawLayer ("overlay", 2)
+ L3:SetVertexColor (1, 1, 1, .8)
+
+ local L4 = frame9:CreateTexture (nil, "overlay")
+ L4:SetPoint ("topright", preview, "topright")
+ L4:SetTexture ("Interface\\AddOns\\Details\\images\\icons")
+ L4:SetTexCoord (0.234375, 0.13671875+0.0009765625, 0.29296875, 0.1953125+0.0009765625)
+ L4:SetSize (w, h)
+ L4:SetDrawLayer ("overlay", 2)
+ L4:SetVertexColor (1, 1, 1, .8)
+
function window:update_wallpaper_info()
local w = _G.DetailsOptionsWindow.instance.wallpaper
@@ -4548,7 +4917,7 @@ function window:CreateFrame9()
preview:SetVertexColor (unpack (w.overlay))
preview:SetAlpha (w.alpha)
- frame9.wallpaperCurrentLabel.text = "Texture File: " .. (w.texture or "-- -- --") .. "\nAlpha: " .. a .. "\nOverlay red: " .. red .. " green: " .. green .. " blue: " .. blue .. "\nCut (top): " .. t .. "\nCut (bottom): " .. b .. "\nCut (left): " .. l .. "\nCut (right): " .. r
+ frame9.wallpaperCurrentLabel.text = "Texture File: " .. (w.texture or "-- -- --") .. "\nAlpha: " .. a .. "\nOverlay: |cFFFFAAAAred|r: " .. math.floor(red/255*100) .. "% |cFFAAFFAAgreen|r: " .. math.floor(green/255*100) .. "% |cFFAAAAFFblue|r: " .. math.floor(blue/255*100) .. "%\nCut (|cFFC0C0C0top|r): " .. t .. "\nCut (|cFFC0C0C0bottom|r): " .. b .. "\nCut (|cFFC0C0C0left|r): " .. l .. "\nCut (|cFFC0C0C0right|r): " .. r
end
--current settings
@@ -4874,9 +5243,10 @@ end
frame3.concatenateTrashSlider.tooltip = "Concatenate the next boss segments into only one."
--]]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+-- Advanced Plugins Config ~12
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function window:CreateFrame12()
@@ -4894,7 +5264,7 @@ function window:CreateFrame12()
local y = -20
--toolbar
- g:NewLabel (frame4, _, "$parentToolbarPluginsLabel", "toolbarLabel", "Toolbar Plugins", "GameFontNormal", 16)
+ g:NewLabel (frame4, _, "$parentToolbarPluginsLabel", "toolbarLabel", Loc ["STRING_OPTIONS_PLUGINS_TOOLBAR_ANCHOR"], "GameFontNormal", 16)
frame4.toolbarLabel:SetPoint ("topleft", frame4, "topleft", 10, y)
y = y - 30
@@ -4903,14 +5273,14 @@ function window:CreateFrame12()
local descbar = frame4:CreateTexture (nil, "artwork")
descbar:SetTexture (.3, .3, .3, .8)
descbar:SetPoint ("topleft", frame4, "topleft", 5, y+3)
- descbar:SetSize (480, 20)
- g:NewLabel (frame4, _, "$parentDescNameLabel", "descNameLabel", "Name", "GameFontNormal", 12)
+ descbar:SetSize (650, 20)
+ g:NewLabel (frame4, _, "$parentDescNameLabel", "descNameLabel", Loc ["STRING_OPTIONS_PLUGINS_NAME"], "GameFontNormal", 12)
frame4.descNameLabel:SetPoint ("topleft", frame4, "topleft", 15, y)
- g:NewLabel (frame4, _, "$parentDescAuthorLabel", "descAuthorLabel", "Author", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescAuthorLabel", "descAuthorLabel", Loc ["STRING_OPTIONS_PLUGINS_AUTHOR"], "GameFontNormal", 12)
frame4.descAuthorLabel:SetPoint ("topleft", frame4, "topleft", 180, y)
- g:NewLabel (frame4, _, "$parentDescVersionLabel", "descVersionLabel", "Version", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescVersionLabel", "descVersionLabel", Loc ["STRING_OPTIONS_PLUGINS_VERSION"], "GameFontNormal", 12)
frame4.descVersionLabel:SetPoint ("topleft", frame4, "topleft", 290, y)
- g:NewLabel (frame4, _, "$parentDescEnabledLabel", "descEnabledLabel", "Enabled", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescEnabledLabel", "descEnabledLabel", Loc ["STRING_OPTIONS_PLUGINS_ENABLED"], "GameFontNormal", 12)
frame4.descEnabledLabel:SetPoint ("topleft", frame4, "topleft", 400, y)
end
@@ -4921,7 +5291,7 @@ function window:CreateFrame12()
for absName, pluginObject in pairs (allplugins_toolbar) do
local bframe = CreateFrame ("frame", "OptionsPluginToolbarBG", frame4)
- bframe:SetSize (480, 20)
+ bframe:SetSize (640, 20)
bframe:SetPoint ("topleft", frame4, "topleft", 10, y)
bframe:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1}})
bframe:SetBackdropColor (.3, .3, .3, .3)
@@ -4961,7 +5331,7 @@ function window:CreateFrame12()
y = y - 10
--raid
- g:NewLabel (frame4, _, "$parentRaidPluginsLabel", "raidLabel", "Raid Plugins", "GameFontNormal", 16)
+ g:NewLabel (frame4, _, "$parentRaidPluginsLabel", "raidLabel", Loc ["STRING_OPTIONS_PLUGINS_RAID_ANCHOR"], "GameFontNormal", 16)
frame4.raidLabel:SetPoint ("topleft", frame4, "topleft", 10, y)
y = y - 30
@@ -4970,14 +5340,14 @@ function window:CreateFrame12()
local descbar = frame4:CreateTexture (nil, "artwork")
descbar:SetTexture (.3, .3, .3, .8)
descbar:SetPoint ("topleft", frame4, "topleft", 5, y+3)
- descbar:SetSize (480, 20)
- g:NewLabel (frame4, _, "$parentDescNameLabel2", "descNameLabel", "Name", "GameFontNormal", 12)
+ descbar:SetSize (650, 20)
+ g:NewLabel (frame4, _, "$parentDescNameLabel2", "descNameLabel", Loc ["STRING_OPTIONS_PLUGINS_NAME"], "GameFontNormal", 12)
frame4.descNameLabel:SetPoint ("topleft", frame4, "topleft", 15, y)
- g:NewLabel (frame4, _, "$parentDescAuthorLabel2", "descAuthorLabel", "Author", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescAuthorLabel2", "descAuthorLabel", Loc ["STRING_OPTIONS_PLUGINS_AUTHOR"], "GameFontNormal", 12)
frame4.descAuthorLabel:SetPoint ("topleft", frame4, "topleft", 180, y)
- g:NewLabel (frame4, _, "$parentDescVersionLabel2", "descVersionLabel", "Version", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescVersionLabel2", "descVersionLabel", Loc ["STRING_OPTIONS_PLUGINS_VERSION"], "GameFontNormal", 12)
frame4.descVersionLabel:SetPoint ("topleft", frame4, "topleft", 290, y)
- g:NewLabel (frame4, _, "$parentDescEnabledLabel2", "descEnabledLabel", "Enabled", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescEnabledLabel2", "descEnabledLabel", Loc ["STRING_OPTIONS_PLUGINS_ENABLED"], "GameFontNormal", 12)
frame4.descEnabledLabel:SetPoint ("topleft", frame4, "topleft", 400, y)
end
@@ -4988,7 +5358,7 @@ function window:CreateFrame12()
for absName, pluginObject in pairs (allplugins_raid) do
local bframe = CreateFrame ("frame", "OptionsPluginRaidBG", frame4)
- bframe:SetSize (480, 20)
+ bframe:SetSize (640, 20)
bframe:SetPoint ("topleft", frame4, "topleft", 10, y)
bframe:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1}})
bframe:SetBackdropColor (.3, .3, .3, .3)
@@ -5030,7 +5400,7 @@ function window:CreateFrame12()
y = y - 10
-- solo
- g:NewLabel (frame4, _, "$parentSoloPluginsLabel", "soloLabel", "Solo Plugins", "GameFontNormal", 16)
+ g:NewLabel (frame4, _, "$parentSoloPluginsLabel", "soloLabel", Loc ["STRING_OPTIONS_PLUGINS_SOLO_ANCHOR"], "GameFontNormal", 16)
frame4.soloLabel:SetPoint ("topleft", frame4, "topleft", 10, y)
y = y - 30
@@ -5039,14 +5409,14 @@ function window:CreateFrame12()
local descbar = frame4:CreateTexture (nil, "artwork")
descbar:SetTexture (.3, .3, .3, .8)
descbar:SetPoint ("topleft", frame4, "topleft", 5, y+3)
- descbar:SetSize (480, 20)
- g:NewLabel (frame4, _, "$parentDescNameLabel3", "descNameLabel", "Name", "GameFontNormal", 12)
+ descbar:SetSize (650, 20)
+ g:NewLabel (frame4, _, "$parentDescNameLabel3", "descNameLabel", Loc ["STRING_OPTIONS_PLUGINS_NAME"], "GameFontNormal", 12)
frame4.descNameLabel:SetPoint ("topleft", frame4, "topleft", 15, y)
- g:NewLabel (frame4, _, "$parentDescAuthorLabel3", "descAuthorLabel", "Author", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescAuthorLabel3", "descAuthorLabel", Loc ["STRING_OPTIONS_PLUGINS_AUTHOR"], "GameFontNormal", 12)
frame4.descAuthorLabel:SetPoint ("topleft", frame4, "topleft", 180, y)
- g:NewLabel (frame4, _, "$parentDescVersionLabel3", "descVersionLabel", "Version", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescVersionLabel3", "descVersionLabel", Loc ["STRING_OPTIONS_PLUGINS_VERSION"], "GameFontNormal", 12)
frame4.descVersionLabel:SetPoint ("topleft", frame4, "topleft", 290, y)
- g:NewLabel (frame4, _, "$parentDescEnabledLabel3", "descEnabledLabel", "Enabled", "GameFontNormal", 12)
+ g:NewLabel (frame4, _, "$parentDescEnabledLabel3", "descEnabledLabel", Loc ["STRING_OPTIONS_PLUGINS_ENABLED"], "GameFontNormal", 12)
frame4.descEnabledLabel:SetPoint ("topleft", frame4, "topleft", 400, y)
end
@@ -5057,7 +5427,7 @@ function window:CreateFrame12()
for absName, pluginObject in pairs (allplugins_solo) do
local bframe = CreateFrame ("frame", "OptionsPluginSoloBG", frame4)
- bframe:SetSize (480, 20)
+ bframe:SetSize (640, 20)
bframe:SetPoint ("topleft", frame4, "topleft", 10, y)
bframe:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1}})
bframe:SetBackdropColor (.3, .3, .3, .3)
@@ -5111,7 +5481,7 @@ end
window ["CreateFrame" .. panel_index]()
- if (panel_index == 18) then
+ if (panel_index == 20) then
_detalhes:CancelTimer (window.create_thread)
window:create_left_menu()
@@ -5134,7 +5504,7 @@ end
else
- for i = 1, 18 do
+ for i = 1, 20 do
window ["CreateFrame" .. i]()
end
window:create_left_menu()
@@ -5174,7 +5544,6 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow1UseScrollSlider.MyObject:SetValue (_detalhes.use_scroll)
_G.DetailsOptionsWindow1SliderMaxInstances.MyObject:SetValue (_detalhes.instances_amount)
- _G.DetailsOptionsWindow1MinimapSlider.MyObject:SetValue (not _detalhes.minimap.hide)
_G.DetailsOptionsWindow1AbbreviateDropdown.MyObject:Select (_detalhes.ps_abbreviation)
_G.DetailsOptionsWindow1SliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed)
_G.DetailsOptionsWindow1AnimateSlider.MyObject:SetValue (_detalhes.use_row_animations)
@@ -5183,6 +5552,9 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow2FragsPvpSlider.MyObject:SetValue (_detalhes.only_pvp_frags)
_G.DetailsOptionsWindow2TTDropdown.MyObject:Select (_detalhes.time_type)
+ --> window 3
+ _G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (editing_instance.skin)
--> window 4
_G.DetailsOptionsWindow4BarStartSlider.MyObject:SetFixedParameter (editing_instance)
@@ -5214,9 +5586,7 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow6InstanceMicroDisplaysSideSlider.MyObject:SetValue (editing_instance.micro_displays_side)
--> window 7
- _G.DetailsOptionsWindow7AutoHideRightMenuSwitch.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7AutoHideRightMenuSwitch.MyObject:SetValue (editing_instance.auto_hide_menu.right)
-
+
_G.DetailsOptionsWindow7AutoHideLeftMenuSwitch.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow7AutoHideLeftMenuSwitch.MyObject:SetValue (editing_instance.auto_hide_menu.left)
@@ -5225,12 +5595,50 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow7:update_icon_buttons (editing_instance)
- --> window 8
- _G.DetailsOptionsWindow8InstanceButtonAnchorXSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow8InstanceButtonAnchorXSlider.MyObject:SetValue (editing_instance.instance_button_anchor[1])
+ _G.DetailsOptionsWindow7PluginIconsDirectionSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow7PluginIconsDirectionSlider.MyObject:SetValue (editing_instance.plugins_grow_direction)
- _G.DetailsOptionsWindow8InstanceButtonAnchorYSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow8InstanceButtonAnchorYSlider.MyObject:SetValue (editing_instance.instance_button_anchor[2])
+ _G.DetailsOptionsWindow7DesaturateMenuSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow7DesaturateMenuSlider.MyObject:SetValue (editing_instance.desaturated_menu)
+
+ _G.DetailsOptionsWindow7HideIconSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow7HideIconSlider.MyObject:SetValue (editing_instance.hide_icon)
+
+ _G.DetailsOptionsWindow7MenuIconSizeSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow7MenuIconSizeSlider.MyObject:SetValue (editing_instance.menu_icons_size)
+
+ _G.DetailsOptionsWindow7MenuAnchorXSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow7MenuAnchorYSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow7:update_menuanchor_xy (instance)
+
+ --> window 8
+
+ _G.DetailsOptionsWindow8MenuAnchorXSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8MenuAnchorYSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8:update_menuanchor_xy (instance)
+
+ _G.DetailsOptionsWindow8DesaturateMenuSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8DesaturateMenuSlider.MyObject:SetValue (editing_instance.desaturated_menu2)
+
+ _G.DetailsOptionsWindow8MenuIconSizeSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8MenuIconSizeSlider.MyObject:SetValue (editing_instance.menu2_icons_size)
+
+ _G.DetailsOptionsWindow8:update_icon_buttons (editing_instance)
+
+ _G.DetailsOptionsWindow8AutoHideRightMenuSwitch.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8AutoHideRightMenuSwitch.MyObject:SetValue (editing_instance.auto_hide_menu.right)
+
+ _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetFixedParameter (editing_instance)
+ _G.DetailsOptionsWindow8InstanceTexShadowtSwitch.MyObject:SetFixedParameter (editing_instance)
+
+ _G.DetailsOptionsWindow8InstanceTextColorPick.MyObject:SetColor (unpack (editing_instance.instancebutton_config.textcolor))
+ _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetValue (editing_instance.instancebutton_config.textsize)
+ _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:Select (editing_instance.instancebutton_config.textfont)
+ _G.DetailsOptionsWindow8InstanceTexShadowtSwitch.MyObject:SetValue (editing_instance.instancebutton_config.textshadow)
+
+ --instanceTextColorLabel
+
--> window 10
_G.DetailsOptionsWindow10SliderMemory.MyObject:SetValue (_detalhes.memory_threshold)
@@ -5262,7 +5670,7 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow14AttributeEnabledSwitch.MyObject:SetValue (editing_instance.attribute_text.enabled)
_G.DetailsOptionsWindow14AttributeAnchorXSlider.MyObject:SetValue (editing_instance.attribute_text.anchor [1])
_G.DetailsOptionsWindow14AttributeAnchorYSlider.MyObject:SetValue (editing_instance.attribute_text.anchor [2])
- _G.DetailsOptionsWindow14AttributeFontDropdown.MyObject:Select (instance.attribute_text.text_face)
+ _G.DetailsOptionsWindow14AttributeFontDropdown.MyObject:Select (editing_instance.attribute_text.text_face)
_G.DetailsOptionsWindow14AttributeTextSizeSlider.MyObject:SetValue (tonumber (editing_instance.attribute_text.text_size))
_G.DetailsOptionsWindow14AttributeTextColorPick.MyObject:SetColor (unpack (editing_instance.attribute_text.text_color))
_G.DetailsOptionsWindow14AttributeShadowSwitch.MyObject:SetValue (editing_instance.attribute_text.shadow)
@@ -5310,18 +5718,27 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow18TotalBarOnlyInGroupSlider.MyObject:SetValue (editing_instance.total_bar.only_in_group)
_G.DetailsOptionsWindow18TotalBarIconTexture.MyObject:SetTexture (editing_instance.total_bar.icon)
+ --> window 19
+ _G.DetailsOptionsWindow19MinimapSlider.MyObject:SetValue (not _detalhes.minimap.hide)
+ _G.DetailsOptionsWindow19MinimapActionDropdown.MyObject:Select (_detalhes.minimap.onclick_what_todo)
+ _G.DetailsOptionsWindow19HotcornerSlider.MyObject:SetValue (not _detalhes.hotcorner_topleft.hide)
+ _G.DetailsOptionsWindow19HotcornerActionDropdown.MyObject:Select (_detalhes.hotcorner_topleft.onclick_what_todo)
+ _G.DetailsOptionsWindow19HotcornerQuickClickSlider.MyObject:SetValue (_detalhes.hotcorner_topleft.topleft_quick_click)
+ _G.DetailsOptionsWindow19QuickClickDropdown.MyObject:Select (_detalhes.hotcorner_topleft.quickclick_what_todo)
+ _G.DetailsOptionsWindow19BrokerTextDropdown.MyObject:Select (_detalhes.minimap.text_type)
+
+
+ --> window 20
+ _G.DetailsOptionsWindow20TooltipTextColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.fontcolor))
+ _G.DetailsOptionsWindow20TooltipTextSizeSlider.MyObject:SetValue (_detalhes.tooltip.fontsize)
+ _G.DetailsOptionsWindow20TooltipFontDropdown.MyObject:Select (_detalhes.tooltip.fontface)
+ _G.DetailsOptionsWindow20TooltipShadowSwitch.MyObject:SetValue (_detalhes.tooltip.fontshadow)
+ _G.DetailsOptionsWindow20TooltipBackgroundColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.background))
+ _G.DetailsOptionsWindow20TooltipAbbreviateDropdown.MyObject:Select (_detalhes.tooltip.abbreviation, true)
+ _G.DetailsOptionsWindow20TooltipMaximizeDropdown.MyObject:Select (_detalhes.tooltip.maximize_method, true)
+
----------
- _G.DetailsOptionsWindow8ResetTextColorPick.MyObject:SetColor (unpack (editing_instance.resetbutton_info.text_color))
- _G.DetailsOptionsWindow8ResetTextSizeSlider.MyObject:SetValue (editing_instance.resetbutton_info.text_size)
- _G.DetailsOptionsWindow8ResetTextFontDropdown.MyObject:Select (editing_instance.resetbutton_info.text_face)
- _G.DetailsOptionsWindow8ResetOverlayColorPick.MyObject:SetColor (unpack (editing_instance.resetbutton_info.color_overlay))
- _G.DetailsOptionsWindow8InstanceTextColorPick.MyObject:SetColor (unpack (editing_instance.instancebutton_info.text_color))
- _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetValue (editing_instance.instancebutton_info.text_size)
- _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:Select (editing_instance.instancebutton_info.text_face)
- _G.DetailsOptionsWindow8InstanceOverlayColorPick.MyObject:SetColor (unpack (editing_instance.instancebutton_info.color_overlay))
-
- _G.DetailsOptionsWindow8CloseButtonColorPick.MyObject:SetColor (unpack (editing_instance.closebutton_info.color_overlay))
@@ -5336,8 +5753,7 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow6StretchAnchorSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow6StretchAnchorSlider.MyObject:SetValue (editing_instance.stretch_button_side)
- _G.DetailsOptionsWindow7PluginIconsDirectionSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7PluginIconsDirectionSlider.MyObject:SetValue (editing_instance.plugins_grow_direction)
+
_G.DetailsOptionsWindow6InstanceToolbarSideSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow6InstanceToolbarSideSlider.MyObject:SetValue (editing_instance.toolbar_side)
@@ -5348,40 +5764,17 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow4BarGrowDirectionSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4BarGrowDirectionSlider.MyObject:SetValue (editing_instance.bars_grow_direction)
- _G.DetailsOptionsWindow7DesaturateMenuSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7DesaturateMenuSlider.MyObject:SetValue (editing_instance.desaturated_menu)
-
- _G.DetailsOptionsWindow7HideIconSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7HideIconSlider.MyObject:SetValue (editing_instance.hide_icon)
-
- _G.DetailsOptionsWindow7MenuAnchorXSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7MenuAnchorXSlider.MyObject:SetValue (editing_instance.menu_anchor[1])
-
- _G.DetailsOptionsWindow7MenuAnchorYSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7MenuAnchorYSlider.MyObject:SetValue (editing_instance.menu_anchor[2])
-
- _G.DetailsOptionsWindow7MenuIconSizeSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow7MenuIconSizeSlider.MyObject:SetValue (editing_instance.menu_icons_size)
+
----------------------------------------------------------------
-
- --resetTextColor
- _G.DetailsOptionsWindow8ResetTextFontDropdown.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow8ResetTextSizeSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow8ResetAlwaysSmallSlider.MyObject:SetFixedParameter (editing_instance)
- --resetOverlayColorLabel
- --instanceTextColorLabel
- _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetFixedParameter (editing_instance)
--instanceOverlayColorLabel
--closeOverlayColorLabel
- _G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (editing_instance.skin)
+
_G.DetailsOptionsWindow4TextureDropdown.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow4RowBackgroundTextureDropdown.MyObject:SetFixedParameter (editing_instance)
@@ -5416,9 +5809,6 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow5TextRightOutlineSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow5TextRightOutlineSlider.MyObject:SetValue (editing_instance.row_info.textR_outline)
--
- _G.DetailsOptionsWindow4RowAlphaSlider.MyObject:SetFixedParameter (editing_instance)
- _G.DetailsOptionsWindow4RowAlphaSlider.MyObject:SetValue (editing_instance.row_info.alpha)
-
_G.DetailsOptionsWindow6AlphaSlider.MyObject:SetFixedParameter (editing_instance)
_G.DetailsOptionsWindow6AlphaSlider.MyObject:SetValue (editing_instance.bg_alpha)
--
diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua
index 325e05f7..aaa6f852 100644
--- a/gumps/janela_principal.lua
+++ b/gumps/janela_principal.lua
@@ -644,7 +644,11 @@ local function BGFrame_scripts (BG, baseframe, instancia)
if (not baseframe.isLocked and button == "LeftButton") then
move_janela (baseframe, true, instancia) --> novo movedor da janela
elseif (button == "RightButton") then
- _detalhes.switch:ShowMe (instancia)
+ if (_detalhes.switch.current_instancia and _detalhes.switch.current_instancia == instancia) then
+ _detalhes.switch:CloseMe()
+ else
+ _detalhes.switch:ShowMe (instancia)
+ end
end
end)
@@ -2010,8 +2014,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
rowframe:SetFrameLevel (2)
instancia.rowframe = rowframe
- local switchbutton = gump:NewDetailsButton (backgrounddisplay, baseframe, _, function() end, nil, nil, 1, 1, "", "", "", "",
- {rightFunc = {func = function() _detalhes.switch:ShowMe (instancia) end, param1 = nil, param2 = nil}})
+ local switchbutton = gump:NewDetailsButton (backgrounddisplay, baseframe, nil, function() end, nil, nil, 1, 1, "", "", "", "",
+ {rightFunc = {func = function() _detalhes.switch:ShowMe (instancia) end, param1 = nil, param2 = nil}}, "Details_SwitchButtonFrame" .. ID)
switchbutton:SetPoint ("topleft", backgrounddisplay, "topleft")
switchbutton:SetPoint ("bottomright", backgrounddisplay, "bottomright")
@@ -3068,12 +3072,7 @@ function _detalhes:InstanceButtonsColors (red, green, blue, alpha, no_save, only
elseif (only_right) then
- local icons = {baseToolbar.novo, baseToolbar.fechar}
-
- if (self.meu_id == _detalhes.ResetButtonInstance) then
- tinsert (icons, _detalhes.ResetButton)
- tinsert (icons, _detalhes.ResetButton2)
- end
+ local icons = {baseToolbar.novo, baseToolbar.fechar, baseToolbar.reset}
for _, button in _ipairs (icons) do
button:SetAlpha (alpha)
@@ -3081,12 +3080,7 @@ function _detalhes:InstanceButtonsColors (red, green, blue, alpha, no_save, only
else
- local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report, baseToolbar.novo, baseToolbar.fechar}
-
- if (self.meu_id == _detalhes.ResetButtonInstance) then
- tinsert (icons, _detalhes.ResetButton)
- tinsert (icons, _detalhes.ResetButton2)
- end
+ local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report, baseToolbar.novo, baseToolbar.fechar, baseToolbar.reset}
for _, button in _ipairs (icons) do
button:SetAlpha (alpha)
@@ -3229,160 +3223,6 @@ function _detalhes:StatusBarAlert (text, icon, color, time)
end
end
-function _detalhes:SetCloseButtonSettings (overlaycolor)
- if (overlaycolor == "reset") then
- overlaycolor = {1, 1, 1, 1}
- end
-
- if (overlaycolor) then
- local r, g, b, a = gump:ParseColors (overlaycolor)
- self.closebutton_info.color_overlay [1] = r
- self.closebutton_info.color_overlay [2] = g
- self.closebutton_info.color_overlay [3] = b
- self.closebutton_info.color_overlay [4] = a
- end
-
- local r, g, b, a = unpack (self.closebutton_info.color_overlay)
- self.baseframe.cabecalho.fechar:GetNormalTexture():SetVertexColor (r, g, b, a)
- self.baseframe.cabecalho.fechar:GetPushedTexture():SetVertexColor (r, g, b, a)
- self.baseframe.cabecalho.fechar:GetHighlightTexture():SetVertexColor (r, g, b, a)
-end
-
-function _detalhes:SetInstanceButtonSettings (textfont, textsize, textcolor, overlaycolor)
-
- if (textfont == "reset") then
- textfont = "Friz Quadrata TT"
- textsize = 12
- textcolor = {1, 0.81, 0, 1}
- overlaycolor = {1, 1, 1, 1}
- end
-
- --> text color
- if (textcolor) then
- local r, g, b, a = gump:ParseColors (textcolor)
- self.instancebutton_info.text_color [1] = r
- self.instancebutton_info.text_color [2] = g
- self.instancebutton_info.text_color [3] = b
- self.instancebutton_info.text_color [4] = a
- end
-
- _G [self.baseframe.cabecalho.novo:GetName().."Text"]:SetTextColor (unpack (self.instancebutton_info.text_color))
-
- --> text font
- if (textfont) then
- self.instancebutton_info.text_face = textfont
- end
-
- local font = SharedMedia:Fetch ("font", self.instancebutton_info.text_face)
- _detalhes:SetFontFace (_G [self.baseframe.cabecalho.novo:GetName().."Text"], font)
-
- --> text size
- if (textsize) then
- self.instancebutton_info.text_size = textsize
- end
-
- _detalhes:SetFontSize (_G [self.baseframe.cabecalho.novo:GetName().."Text"], self.instancebutton_info.text_size)
-
- --> overlay color
- if (overlaycolor) then
- local r, g, b, a = gump:ParseColors (overlaycolor)
- self.instancebutton_info.color_overlay [1] = r
- self.instancebutton_info.color_overlay [2] = g
- self.instancebutton_info.color_overlay [3] = b
- self.instancebutton_info.color_overlay [4] = a
- end
-
- local r, g, b, a = unpack (self.instancebutton_info.color_overlay)
- self.baseframe.cabecalho.novo.Left:SetVertexColor (r, g, b, a)
- self.baseframe.cabecalho.novo.Middle:SetVertexColor (r, g, b, a)
- self.baseframe.cabecalho.novo.Right:SetVertexColor (r, g, b, a)
-end
-
-function _detalhes:SetDeleteButtonSettings (textfont, textsize, textcolor, overlaycolor, alwaysminimized, smalltextcolor)
-
- if (textfont == "reset") then
- --print ("text color:", _G.DetailsResetButton1Text:GetTextColor())
- --print ("text font:", _detalhes:GetFontFace (_G.DetailsResetButton1Text))
- --print ("text size:", _detalhes:GetFontSize (_G.DetailsResetButton1Text))
- --print ("vertex color", _detalhes.ResetButton.Left:GetVertexColor())
- textfont = "Friz Quadrata TT"
- textsize = 12
- textcolor = {1, 0.81, 0, 1}
- smalltextcolor = {1, 0.81, 0, 1}
- overlaycolor = {1, 1, 1, 1}
- alwaysminimized = false
- end
-
- --> text color
- if (textcolor) then
- local r, g, b, a = gump:ParseColors (textcolor)
- self.resetbutton_info.text_color [1] = r
- self.resetbutton_info.text_color [2] = g
- self.resetbutton_info.text_color [3] = b
- self.resetbutton_info.text_color [4] = a
- end
-
- if (smalltextcolor) then
- local r, g, b, a = gump:ParseColors (smalltextcolor)
- self.resetbutton_info.text_color_small [1] = r
- self.resetbutton_info.text_color_small [2] = g
- self.resetbutton_info.text_color_small [3] = b
- self.resetbutton_info.text_color_small [4] = a
- end
-
- if (not self.resetbutton_info.text_color_small) then
- self.resetbutton_info.text_color_small = {1, 0.81, 0, 1}
- end
-
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- _G.DetailsResetButton1Text:SetTextColor (unpack (self.resetbutton_info.text_color))
- _G.DetailsResetButton2Text2:SetTextColor (unpack (self.resetbutton_info.text_color_small))
- end
-
- --> text font
- if (textfont) then
- self.resetbutton_info.text_face = textfont
- end
-
- local font = SharedMedia:Fetch ("font", self.resetbutton_info.text_face)
- _detalhes:SetFontFace (_G.DetailsResetButton1Text, font)
- _detalhes:SetFontFace (_G.DetailsResetButton2Text2, font)
-
- --> text size
- if (textsize) then
- self.resetbutton_info.text_size = textsize
- end
-
- _detalhes:SetFontSize (_G.DetailsResetButton1Text, self.resetbutton_info.text_size)
- _detalhes:SetFontSize (_G.DetailsResetButton2Text2, self.resetbutton_info.text_size)
-
- --> overlay color
- if (overlaycolor) then
- local r, g, b, a = gump:ParseColors (overlaycolor)
- self.resetbutton_info.color_overlay [1] = r
- self.resetbutton_info.color_overlay [2] = g
- self.resetbutton_info.color_overlay [3] = b
- self.resetbutton_info.color_overlay [4] = a
- end
-
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- local r, g, b, a = unpack (self.resetbutton_info.color_overlay)
- _detalhes.ResetButton.Left:SetVertexColor (r, g, b, a)
- _detalhes.ResetButton.Middle:SetVertexColor (r, g, b, a)
- _detalhes.ResetButton.Right:SetVertexColor (r, g, b, a)
- _detalhes.ResetButton2.Left:SetVertexColor (r, g, b, a)
- _detalhes.ResetButton2.Middle:SetVertexColor (r, g, b, a)
- _detalhes.ResetButton2.Right:SetVertexColor (r, g, b, a)
- end
-
- --> always minimized
- if (type (alwaysminimized) == "boolean") then
- self.resetbutton_info.always_small = alwaysminimized
- end
-
- self:ReajustaGump()
-end
-
function gump:CriaRodape (baseframe, instancia)
@@ -3517,6 +3357,14 @@ function _detalhes:GetMenuAnchorPoint()
end
end
end
+function _detalhes:GetMenu2AnchorPoint()
+ local toolbar_side = self.toolbar_side
+ if (toolbar_side == 1) then --top
+ return self.menu2_points [1], "topright", "bottomleft"
+ elseif (toolbar_side == 2) then --bottom
+ return self.menu2_points [1], "topleft", "topleft"
+ end
+end
--> search key: ~icon
function _detalhes:ToolbarMenuButtonsSize (size)
@@ -3524,6 +3372,11 @@ function _detalhes:ToolbarMenuButtonsSize (size)
self.menu_icons_size = size
return self:ToolbarMenuButtons()
end
+function _detalhes:ToolbarMenu2ButtonsSize (size)
+ size = size or self.menu2_icons_size
+ self.menu2_icons_size = size
+ return self:ToolbarMenu2Buttons()
+end
function _detalhes:ToolbarMenuButtons (_mode, _segment, _attributes, _report)
if (_mode == nil) then
@@ -3613,6 +3466,151 @@ function _detalhes:ToolbarMenuButtons (_mode, _segment, _attributes, _report)
return true
end
+function _detalhes:ToolbarMenu2Buttons (_close, _instance, _reset)
+ if (_close == nil) then
+ _close = self.menu2_icons[1]
+ end
+ if (_instance == nil) then
+ _instance = self.menu2_icons[2]
+ end
+ if (_reset == nil) then
+ _reset = self.menu2_icons[3]
+ end
+
+ self.menu2_icons[1] = _close
+ self.menu2_icons[2] = _instance
+ self.menu2_icons[3] = _reset
+
+ local buttons = {self.baseframe.cabecalho.fechar, self.baseframe.cabecalho.novo, self.baseframe.cabecalho.reset}
+ local config = {self.closebutton_config, self.instancebutton_config, self.resetbutton_config}
+
+ local anchor_frame, point1, point2 = self:GetMenu2AnchorPoint() -- self.menu2_points [1], "topleft", "bottomleft"
+ local got_anchor = false
+ local lastIcon = nil
+
+ local size = self.menu2_icons_size
+ local default_texcoord = {0, 1, 0, 1}
+ local default_vertexcolor = {1, 1, 1, 1}
+ --> normal buttons
+ for index, button in ipairs (buttons) do
+ if (self.menu2_icons [index]) then
+
+ local button_config = config [index]
+ button:ClearAllPoints()
+
+ if (got_anchor) then
+ button:SetPoint ("right", lastIcon, "left", button_config.anchor [1], button_config.anchor [2])
+ else
+ button:SetPoint (point1, anchor_frame, point2, button_config.anchor [1], button_config.anchor [2])
+ got_anchor = button
+ end
+
+ button:SetSize (button_config.size[1] * size, button_config.size[2] * size)
+
+ local normal_texture = button:GetNormalTexture()
+ local highlight_texture = button:GetHighlightTexture()
+ local pushed_texture = button:GetPushedTexture()
+
+ normal_texture:SetTexture (button_config.normal_texture)
+ highlight_texture:SetTexture (button_config.highlight_texture or button_config.normal_texture)
+ pushed_texture:SetTexture (button_config.pushed_texture or button_config.normal_texture)
+
+ if (button_config.normal_texcoord) then
+ normal_texture:SetTexCoord (unpack (button_config.normal_texcoord))
+ else
+ normal_texture:SetTexCoord (unpack (default_texcoord))
+ end
+
+ if (button_config.highlight_texcoord) then
+ highlight_texture:SetTexCoord (unpack (button_config.highlight_texcoord))
+ else
+ if (button_config.normal_texcoord and button_config.normal_texture == button_config.highlight_texture) then
+ highlight_texture:SetTexCoord (unpack (button_config.normal_texcoord))
+ else
+ highlight_texture:SetTexCoord (unpack (default_texcoord))
+ end
+ end
+
+ if (button_config.pushed_texcoord) then
+ pushed_texture:SetTexCoord (unpack (button_config.pushed_texcoord))
+ else
+ if (button_config.normal_texcoord and (not button_config.pushed_texture or button_config.normal_texture == button_config.pushed_texture)) then
+ pushed_texture:SetTexCoord (unpack (button_config.normal_texcoord))
+ else
+ pushed_texture:SetTexCoord (unpack (default_texcoord))
+ end
+ end
+
+ if (button_config.normal_vertexcolor) then
+ normal_texture:SetVertexColor (unpack (button_config.normal_vertexcolor))
+ else
+ normal_texture:SetVertexColor (unpack (default_vertexcolor))
+ end
+
+ if (button_config.highlight_vertexcolor) then
+ highlight_texture:SetVertexColor (unpack (button_config.highlight_vertexcolor))
+ else
+ if (button_config.normal_vertexcolor and button_config.normal_texture == button_config.highlight_texture) then
+ highlight_texture:SetVertexColor (unpack (button_config.normal_vertexcolor))
+ else
+ highlight_texture:SetVertexColor (unpack (default_vertexcolor))
+ end
+ end
+
+ if (button_config.pushed_vertexcolor) then
+ pushed_texture:SetVertexColor (unpack (button_config.pushed_vertexcolor))
+ else
+ if (button_config.normal_vertexcolor and button_config.normal_texture == button_config.pushed_texture) then
+ pushed_texture:SetVertexColor (unpack (button_config.normal_vertexcolor))
+ else
+ pushed_texture:SetVertexColor (unpack (default_vertexcolor))
+ end
+ end
+
+ lastIcon = button
+ button:SetParent (self.baseframe)
+ button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1)
+ button:Show()
+
+ else
+ button:Hide()
+ end
+ end
+
+ self:ToolbarMenu2InstanceButtonSettings()
+
+ return true
+end
+
+function _detalhes:ToolbarMenu2InstanceButtonSettings (color, font, size, shadow)
+
+ if (not color) then
+ color = self.instancebutton_config.textcolor
+ end
+ if (not font) then
+ font = self.instancebutton_config.textfont
+ end
+ if (not size) then
+ size = self.instancebutton_config.textsize
+ end
+ if (shadow == nil) then
+ shadow = self.instancebutton_config.textshadow
+ end
+
+ self.instancebutton_config.textcolor = color
+ self.instancebutton_config.textfont = font
+ self.instancebutton_config.textsize = size
+ self.instancebutton_config.textshadow = shadow
+
+ local fontstring = self.baseframe.cabecalho.novo:GetFontString()
+
+ _detalhes:SetFontSize (fontstring, size)
+ _detalhes:SetFontFace (fontstring, SharedMedia:Fetch ("font", font))
+ _detalhes:SetFontColor (fontstring, color)
+ _detalhes:SetFontOutline (fontstring, shadow)
+
+end
+
local parameters_table = {}
local on_leave_menu = function (self, elapsed)
@@ -3935,67 +3933,6 @@ local build_segment_list = function (self, elapsed)
end
-function _detalhes:DisableUIPanelButton (button)
- button.Right:Hide()
- button.Middle:Hide()
-
- button:SetScript ("OnMouseDown", function()
- button.Left:SetPoint ("topleft", button, "topleft", 1, -1)
- button.Left:SetPoint ("bottomleft", button, "bottomleft", 1, -1)
- end)
-
- button:SetScript ("OnMouseUp", function()
- button.Left:SetPoint ("topleft", button, "topleft")
- button.Left:SetPoint ("bottomleft", button, "bottomleft")
- end)
- button:SetScript ("OnShow", function()end)
- button:SetScript ("OnDisable", function()end)
- button:SetScript ("OnEnable", function()end)
-end
-
-function _detalhes:RestoreUIPanelButton (button)
- --> restaura o botão
- button.Left:SetTexture ([[Interface\Buttons\UI-Panel-Button-Up]])
- button.Left:SetTexCoord (0, 0.0937, 0, 0.6875)
- button.Left:SetSize (12, 22)
- button.Right:Show()
- button.Middle:Show()
-
- button:SetScript ("OnMouseDown", function (self)
- if ( self:IsEnabled() ) then
- self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]);
- self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]);
- self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]);
- end
- end)
-
- button:SetScript ("OnMouseUp", function (self)
- if ( self:IsEnabled() ) then
- self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- end
- end)
-
- button:SetScript ("OnShow", function (self)
- if ( self:IsEnabled() ) then
- self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- end
- end)
- button:SetScript ("OnDisable", function (self)
- self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]);
- self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]);
- self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]);
- end)
- button:SetScript ("OnEnable", function (self)
- self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]);
- end)
-end
-
local botao_fechar_on_enter = function (self)
OnEnterMainWindow (self.instancia, self, 3)
end
@@ -4003,60 +3940,6 @@ local botao_fechar_on_leave = function (self)
OnLeaveMainWindow (self.instancia, self, 3)
end
-function SetCloseButtonAnchors (self, this_skin)
- if (self.toolbar_side == 1) then --top
-
- self.baseframe.cabecalho.fechar:SetScript ("OnMouseDown", function()
- self.baseframe.cabecalho.fechar:ClearAllPoints()
- self.baseframe.cabecalho.fechar:SetPoint ("bottomright", self.baseframe, "topright", this_skin.close_button_anchor[1]+1, this_skin.close_button_anchor[2]-1)
- end)
-
- self.baseframe.cabecalho.fechar:SetScript ("OnMouseUp", function()
- self.baseframe.cabecalho.fechar:ClearAllPoints()
- self.baseframe.cabecalho.fechar:SetPoint ("bottomright", self.baseframe, "topright", this_skin.close_button_anchor[1], this_skin.close_button_anchor[2])
-
- self.baseframe.cabecalho.fechar:Disable()
- self:DesativarInstancia()
-
- if (_detalhes.opened_windows == 0) then
- print (Loc ["STRING_CLOSEALL"])
- end
- end)
-
- elseif (self.toolbar_side == 2) then --bottom
-
- self.baseframe.cabecalho.fechar:SetScript ("OnMouseDown", function()
- local y = 0
- if (self.show_statusbar) then
- y = -14
- end
-
- local _x, _y = unpack (this_skin.close_button_anchor_bottom)
- self.baseframe.cabecalho.fechar:ClearAllPoints()
- self.baseframe.cabecalho.fechar:SetPoint ("topright", self.baseframe, "bottomright", _x + 1, _y + y - 1)
- end)
-
- self.baseframe.cabecalho.fechar:SetScript ("OnMouseUp", function()
- local y = 0
- if (self.show_statusbar) then
- y = -14
- end
-
- local _x, _y = unpack (this_skin.close_button_anchor_bottom)
- self.baseframe.cabecalho.fechar:ClearAllPoints()
- self.baseframe.cabecalho.fechar:SetPoint ("topright", self.baseframe, "bottomright", _x, _y + y)
-
- self.baseframe.cabecalho.fechar:Disable()
- self:DesativarInstancia()
-
- if (_detalhes.opened_windows == 0) then
- print (Loc ["STRING_CLOSEALL"])
- end
- end)
-
- end
-end
-
-- ~skin
function _detalhes:ChangeSkin (skin_name)
@@ -4087,18 +3970,6 @@ function _detalhes:ChangeSkin (skin_name)
--> reset all config
self:ResetInstanceConfig()
- --> reset instance button
- self:SetInstanceButtonSettings ("reset")
-
- --> reset delete button
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- self:SetDeleteButtonSettings ("reset")
- end
- DetailsResetButton2Text2:SetText ("-")
-
- --> reset close button
- self:SetCloseButtonSettings ("reset")
-
--> overwrites
local overwrite_cprops = this_skin.instance_cprops
if (overwrite_cprops) then
@@ -4117,20 +3988,14 @@ function _detalhes:ChangeSkin (skin_name)
end
- --> reset instance button
- self:SetInstanceButtonSettings()
- --> reset delete button
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- self:SetDeleteButtonSettings()
- end
- --> reset close button
- self:SetCloseButtonSettings ()
-
--> reset micro frames
_detalhes.StatusBar:Reset (self)
--> customize micro frames
if (this_skin.micro_frames) then
+ if (this_skin.micro_frames.left) then
+ _detalhes.StatusBar:SetPlugin (self, this_skin.micro_frames.left, "left")
+ end
if (this_skin.micro_frames.color) then
_detalhes.StatusBar:ApplyOptions (self.StatusBar.left, "textcolor", this_skin.micro_frames.color)
_detalhes.StatusBar:ApplyOptions (self.StatusBar.center, "textcolor", this_skin.micro_frames.color)
@@ -4182,101 +4047,6 @@ function _detalhes:ChangeSkin (skin_name)
self.botao_separar:SetDisabledTexture (skin_file)
self.botao_separar:SetHighlightTexture (skin_file, "ADD")
self.botao_separar:SetPushedTexture (skin_file)
-
-
-----------> custom reset button
- if (this_skin.reset_button_coords) then
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- --> seta o botão
- _detalhes.ResetButton.Left:SetTexture (skin_file)
- _detalhes.ResetButton.Left:SetTexCoord (unpack (this_skin.reset_button_coords))
- _detalhes.ResetButton.Left:SetSize (_detalhes.ResetButton:GetSize())
-
- if (this_skin.reset_button_small_size) then
- _detalhes.ResetButton2:SetSize (unpack (this_skin.reset_button_small_size))
- else
- _detalhes.ResetButton2:SetSize (22, 15)
- end
-
- _detalhes.ResetButton2.Left:SetTexture (skin_file)
- _detalhes.ResetButton2.Left:SetTexCoord (unpack (this_skin.reset_button_small_coords or this_skin.reset_button_coords))
- _detalhes.ResetButton2.Left:SetSize (_detalhes.ResetButton2:GetSize())
-
- --> remove propriedades do botão da blizzard
- _detalhes:DisableUIPanelButton (_detalhes.ResetButton)
- _detalhes:DisableUIPanelButton (_detalhes.ResetButton2)
- end
- else
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- _detalhes:RestoreUIPanelButton (_detalhes.ResetButton)
- _detalhes:RestoreUIPanelButton (_detalhes.ResetButton2)
- _detalhes.ResetButton2:SetSize (22, 15)
- end
- end
-
-----------> custom instance button
-
- if (this_skin.instance_button_coords) then
-
- --> seta o botão
- self.baseframe.cabecalho.novo:SetHeight (this_skin.instance_button_size or 12)
- self.baseframe.cabecalho.novo.Left:SetTexture (skin_file)
- self.baseframe.cabecalho.novo.Left:SetTexCoord (unpack (this_skin.instance_button_coords))
- self.baseframe.cabecalho.novo.Left:SetSize (self.baseframe.cabecalho.novo:GetSize())
-
- --> remove propriedades do botão da blizzard
- _detalhes:DisableUIPanelButton (self.baseframe.cabecalho.novo)
-
- else
- self.baseframe.cabecalho.novo:SetHeight (15)
- _detalhes:RestoreUIPanelButton (self.baseframe.cabecalho.novo)
- end
-
-----------> custom close button
-
- if (this_skin.close_button_coords) then
-
- --> textures
- self.baseframe.cabecalho.fechar:SetDisabledTexture (skin_file)
- self.baseframe.cabecalho.fechar:SetNormalTexture (skin_file)
- self.baseframe.cabecalho.fechar:SetPushedTexture (skin_file)
- self.baseframe.cabecalho.fechar:SetHighlightTexture (skin_file)
-
- --> texcoords
- self.baseframe.cabecalho.fechar:GetDisabledTexture():SetTexCoord (unpack (this_skin.close_button_coords))
- self.baseframe.cabecalho.fechar:GetNormalTexture():SetTexCoord (unpack (this_skin.close_button_coords))
- self.baseframe.cabecalho.fechar:GetPushedTexture():SetTexCoord (unpack (this_skin.close_button_coords))
- self.baseframe.cabecalho.fechar:GetHighlightTexture():SetTexCoord (unpack (this_skin.close_button_coords))
-
- --> if the custom close button have a specified size
- if (this_skin.close_button_size) then
- self.baseframe.cabecalho.fechar:SetSize (unpack (this_skin.close_button_size))
- else
- self.baseframe.cabecalho.fechar:SetSize (18, 18)
- end
-
- SetCloseButtonAnchors (self, this_skin)
-
- else
- self.baseframe.cabecalho.fechar:SetDisabledTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Disabled]])
- self.baseframe.cabecalho.fechar:SetNormalTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]])
- self.baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Down]])
- self.baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]])
-
- self.baseframe.cabecalho.fechar:GetDisabledTexture():SetTexCoord (0, 1, 0, 1)
- self.baseframe.cabecalho.fechar:GetNormalTexture():SetTexCoord (0, 1, 0, 1)
- self.baseframe.cabecalho.fechar:GetPushedTexture():SetTexCoord (0, 1, 0, 1)
- self.baseframe.cabecalho.fechar:GetHighlightTexture():SetTexCoord (0, 1, 0, 1)
-
- self.baseframe.cabecalho.fechar:SetScript ("OnMouseDown", nil)
- self.baseframe.cabecalho.fechar:SetScript ("OnMouseUp", nil)
-
- if (this_skin.close_button_size) then
- self.baseframe.cabecalho.fechar:SetSize (unpack (this_skin.close_button_size))
- else
- self.baseframe.cabecalho.fechar:SetSize (32, 32)
- end
- end
----------> icon anchor and size
@@ -4323,17 +4093,6 @@ function _detalhes:ChangeSkin (skin_name)
----------> call widgets handlers
self:SetBarSettings (self.row_info.height)
- --> refresh instance button
- self:SetInstanceButtonSettings()
-
- --> refresh delete button
- if (_detalhes.ResetButtonInstance == self.meu_id) then
- self:SetDeleteButtonSettings()
- end
-
- --> refresh close button
- self:SetCloseButtonSettings()
-
--> update toolbar
self:ToolbarSide()
@@ -4370,20 +4129,24 @@ function _detalhes:ChangeSkin (skin_name)
self:SetBackgroundAlpha()
self:SetAutoHideMenu()
self:SetBackdropTexture()
-
+
--> refresh all bars
self:InstanceRefreshRows()
--> update menu saturation
self:DesaturateMenu()
+ self:DesaturateMenu2()
--> update statusbar color
self:StatusBarColor()
--> update attribute string
self:AttributeMenu()
+
+ --> update top menus
self:LeftMenuAnchorSide()
+ self:Menu2Anchor()
--> update window strata level
self:SetFrameStrata()
@@ -4396,7 +4159,6 @@ function _detalhes:ChangeSkin (skin_name)
--> refresh options panel if opened
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
- --print (self.meu_id)
_detalhes:OpenOptionsWindow (self)
end
@@ -4818,28 +4580,16 @@ function _detalhes:ToolbarSide (side)
self.baseframe.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL))
self.baseframe.cabecalho.ball:ClearAllPoints()
self.baseframe.cabecalho.ball:SetPoint ("bottomleft", self.baseframe, "topleft", unpack (skin.left_corner_anchor))
- --> botão fechar
- self.baseframe.cabecalho.fechar:ClearAllPoints()
- self.baseframe.cabecalho.fechar:SetPoint ("bottomright", self.baseframe, "topright", unpack (skin.close_button_anchor))
- if (skin.close_button_coords) then
- SetCloseButtonAnchors (self, skin)
- end
+
--> ball r
self.baseframe.cabecalho.ball_r:SetTexCoord (unpack (COORDS_RIGHT_BALL))
self.baseframe.cabecalho.ball_r:ClearAllPoints()
self.baseframe.cabecalho.ball_r:SetPoint ("bottomright", self.baseframe, "topright", unpack (skin.right_corner_anchor))
-
- --> instance
- self:InstanceButtonAnchor()
--> tex coords
self.baseframe.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR))
self.baseframe.cabecalho.top_bg:SetTexCoord (unpack (COORDS_TOP_BACKGROUND))
- --> menu
- self:MenuAnchor()
-
-
else --> bottom
local y = 0
@@ -4857,13 +4607,7 @@ function _detalhes:ToolbarSide (side)
self.baseframe.cabecalho.ball:SetPoint ("topleft", self.baseframe, "bottomleft", _x, _y + y)
local l, r, t, b = unpack (COORDS_LEFT_BALL)
self.baseframe.cabecalho.ball:SetTexCoord (l, r, b, t)
- --> botão fechar
- self.baseframe.cabecalho.fechar:ClearAllPoints()
- local _x, _y = unpack (skin.close_button_anchor_bottom)
- self.baseframe.cabecalho.fechar:SetPoint ("topright", self.baseframe, "bottomright", _x, _y + y)
- if (skin.close_button_coords) then
- SetCloseButtonAnchors (self, skin)
- end
+
--> ball r
self.baseframe.cabecalho.ball_r:ClearAllPoints()
local _x, _y = unpack (skin.right_corner_anchor_bottom)
@@ -4876,14 +4620,13 @@ function _detalhes:ToolbarSide (side)
self.baseframe.cabecalho.emenda:SetTexCoord (l, r, b, t)
local l, r, t, b = unpack (COORDS_TOP_BACKGROUND)
self.baseframe.cabecalho.top_bg:SetTexCoord (l, r, b, t)
-
- --> instance button
- self:InstanceButtonAnchor()
-
- --> menu buttons
- self:MenuAnchor()
+
end
+ --> update top menus
+ self:LeftMenuAnchorSide()
+ self:Menu2Anchor()
+
self:StretchButtonAnchor()
self:HideMainIcon()
@@ -4956,43 +4699,28 @@ function _detalhes:StretchButtonAnchor (side)
end
-function _detalhes:InstanceButtonAnchor (x, y)
-
- if (not x) then
- x = self.instance_button_anchor [1]
- end
- if (not y) then
- y = self.instance_button_anchor [2]
- end
-
- self.instance_button_anchor [1] = x
- self.instance_button_anchor [2] = y
-
- self.baseframe.cabecalho.novo:ClearAllPoints()
-
- if (self.toolbar_side == 2) then --> bottom
- local y_mod = 0
- if (self.show_statusbar) then
- y_mod = 14
- end
- self.baseframe.cabecalho.novo:SetPoint ("topright", self.baseframe, "bottomright", x, (y + y_mod) * -1)
- else
- self.baseframe.cabecalho.novo:SetPoint ("bottomright", self.baseframe, "topright", x, y)
- end
-
-end
-
function _detalhes:MenuAnchor (x, y)
- if (not x) then
- x = self.menu_anchor [1]
+ if (self.toolbar_side == 1) then --top
+ if (not x) then
+ x = self.menu_anchor [1]
+ end
+ if (not y) then
+ y = self.menu_anchor [2]
+ end
+ self.menu_anchor [1] = x
+ self.menu_anchor [2] = y
+
+ elseif (self.toolbar_side == 2) then --bottom
+ if (not x) then
+ x = self.menu_anchor_down [1]
+ end
+ if (not y) then
+ y = self.menu_anchor_down [2]
+ end
+ self.menu_anchor_down [1] = x
+ self.menu_anchor_down [2] = y
end
- if (not y) then
- y = self.menu_anchor [2]
- end
-
- self.menu_anchor [1] = x
- self.menu_anchor [2] = y
local menu_points = self.menu_points -- = {MenuAnchorLeft, MenuAnchorRight}
@@ -5002,11 +4730,11 @@ function _detalhes:MenuAnchor (x, y)
menu_points [1]:ClearAllPoints()
if (self.toolbar_side == 1) then --> top
--self.baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y)
- menu_points [1]:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y)
+ menu_points [1]:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y+2)
else --> bottom
--self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
- menu_points [1]:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1)
+ menu_points [1]:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, (y*-1) - 4)
end
@@ -5019,7 +4747,7 @@ function _detalhes:MenuAnchor (x, y)
else --> bottom
--self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "topleft", x, y*-1)
- menu_points [2]:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "topleft", x, y*-1)
+ menu_points [2]:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "topleft", x, (y*-1) - 4)
end
end
@@ -5028,6 +4756,44 @@ function _detalhes:MenuAnchor (x, y)
end
+function _detalhes:Menu2Anchor (x, y)
+
+ if (self.toolbar_side == 1) then --top
+ if (not x) then
+ x = self.menu2_anchor [1]
+ end
+ if (not y) then
+ y = self.menu2_anchor [2]
+ end
+ self.menu2_anchor [1] = x
+ self.menu2_anchor [2] = y
+
+ elseif (self.toolbar_side== 2) then --bottom
+ if (not x) then
+ x = self.menu2_anchor_down [1]
+ end
+ if (not y) then
+ y = self.menu2_anchor_down [2]
+ end
+ self.menu2_anchor_down [1] = x
+ self.menu2_anchor_down [2] = y
+ end
+
+ local anchor = self.menu2_points [1]
+ anchor:ClearAllPoints()
+
+ if (self.toolbar_side == 1) then --> top
+ anchor:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "bottomleft", x, y+16)
+
+ else --> bottom
+ anchor:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "topleft", x-17, (y*-1) + 1)
+
+ end
+
+ self:ToolbarMenu2Buttons()
+
+end
+
function _detalhes:HideMainIcon (value)
if (type (value) ~= "boolean") then
@@ -5111,6 +4877,25 @@ function _detalhes:DesaturateMenu (value)
end
end
+function _detalhes:DesaturateMenu2 (value)
+
+ if (value == nil) then
+ value = self.desaturated_menu2
+ end
+
+ if (value) then
+ self.desaturated_menu2 = true
+ self.baseframe.cabecalho.fechar:GetNormalTexture():SetDesaturated (true)
+ self.baseframe.cabecalho.novo:GetNormalTexture():SetDesaturated (true)
+ self.baseframe.cabecalho.reset:GetNormalTexture():SetDesaturated (true)
+ else
+ self.desaturated_menu2 = false
+ self.baseframe.cabecalho.fechar:GetNormalTexture():SetDesaturated (false)
+ self.baseframe.cabecalho.novo:GetNormalTexture():SetDesaturated (false)
+ self.baseframe.cabecalho.reset:GetNormalTexture():SetDesaturated (false)
+ end
+end
+
function _detalhes:ShowSideBars (instancia)
if (instancia) then
self = instancia
@@ -5260,20 +5045,32 @@ function _detalhes:ShowStatusBar (instancia)
end
end
+--> reset button functions
+ local reset_button_onenter = function (self)
+ OnEnterMainWindow (self.instance, self)
+ end
+ local reset_button_onleave = function (self)
+ OnLeaveMainWindow (self.instance, self)
+ end
+
+------------------------------------------------------------------------------------------------------------------------------------------------------------------
+--> build upper menu bar
+
function gump:CriaCabecalho (baseframe, instancia)
--- texturas da barra superior
--------------------------------------------------------------------------------------------------------------------------------------------------
-
baseframe.cabecalho = {}
--> FECHAR INSTANCIA ----------------------------------------------------------------------------------------------------------------------------------------------------
- baseframe.cabecalho.fechar = CreateFrame ("button", "DetailsCloseInstanceButton" .. instancia.meu_id, baseframe, "UIPanelCloseButton")
- baseframe.cabecalho.fechar:SetWidth (32)
- baseframe.cabecalho.fechar:SetHeight (32)
+ baseframe.cabecalho.fechar = CreateFrame ("button", "DetailsCloseInstanceButton" .. instancia.meu_id, baseframe) --, "UIPanelCloseButton"
+ baseframe.cabecalho.fechar:SetWidth (18)
+ baseframe.cabecalho.fechar:SetHeight (18)
baseframe.cabecalho.fechar:SetFrameLevel (5) --> altura mais alta que os demais frames
baseframe.cabecalho.fechar:SetPoint ("bottomright", baseframe, "topright", 5, -6) --> seta o ponto dele fixando no base frame
+ baseframe.cabecalho.fechar:SetNormalTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]])
+ baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]])
+ baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Down]])
+
baseframe.cabecalho.fechar:SetScript ("OnClick", function()
baseframe.cabecalho.fechar:Disable()
instancia:DesativarInstancia()
@@ -5284,7 +5081,6 @@ function gump:CriaCabecalho (baseframe, instancia)
end)
baseframe.cabecalho.fechar.instancia = instancia
- baseframe.cabecalho.fechar:SetText ("x")
baseframe.cabecalho.fechar:SetScript ("OnEnter", botao_fechar_on_enter)
baseframe.cabecalho.fechar:SetScript ("OnLeave", botao_fechar_on_leave)
@@ -5398,7 +5194,11 @@ function gump:CriaCabecalho (baseframe, instancia)
local MenuAnchorRight = CreateFrame ("frame", "DetailsMenuAnchorRight"..instancia.meu_id, baseframe)
MenuAnchorRight:SetSize (1, 1)
+ local Menu2AnchorRight = CreateFrame ("frame", "DetailsMenu2AnchorRight"..instancia.meu_id, baseframe)
+ Menu2AnchorRight:SetSize (1, 1)
+
instancia.menu_points = {MenuAnchorLeft, MenuAnchorRight}
+ instancia.menu2_points = {Menu2AnchorRight}
-- botões
-------------------------------------------------------------------------------------------------------------------------------------------------
@@ -5426,13 +5226,13 @@ function gump:CriaCabecalho (baseframe, instancia)
{text = Loc ["STRING_HELP_MODEALL"], type = 2},
{icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)},
- {text = Loc ["STRING_MODE_SELF"] .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)"},
+ {text = Loc ["STRING_MODE_SELF"]}, -- .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)"
{func = instancia.AlteraModo, param1 = 1},
{icon = [[Interface\AddOns\Details\images\modo_icones]], l = 0, r = 32/256, t = 0, b = 1, width = 20, height = 20},
{text = Loc ["STRING_HELP_MODESELF"], type = 2},
{icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)},
- {text = Loc ["STRING_MODE_RAID"] .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)"},
+ {text = Loc ["STRING_MODE_RAID"]}, -- .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)"
{func = instancia.AlteraModo, param1 = 4},
{icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*3, r = 32/256*4, t = 0, b = 1, width = 20, height = 20},
{text = Loc ["STRING_HELP_MODERAID"], type = 2},
@@ -5681,16 +5481,21 @@ function gump:CriaCabecalho (baseframe, instancia)
end)
--> NOVA INSTANCIA ----------------------------------------------------------------------------------------------------------------------------------------------------
- baseframe.cabecalho.novo = CreateFrame ("button", "DetailsInstanceButton"..instancia.meu_id, baseframe, "OptionsButtonTemplate")
+ baseframe.cabecalho.novo = CreateFrame ("button", "DetailsInstanceButton"..instancia.meu_id, baseframe) --, "OptionsButtonTemplate"
baseframe.cabecalho.novo:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
- baseframe.cabecalho.novo:SetWidth (30)
- baseframe.cabecalho.novo:SetHeight (15)
+ baseframe.cabecalho.novo:SetNormalTexture (1, 1, 1, 1)
+ baseframe.cabecalho.novo:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]])
+ baseframe.cabecalho.novo:SetPushedTexture (1, 1, 1, 1)
+
+ baseframe.cabecalho.novo:SetWidth (20)
+ baseframe.cabecalho.novo:SetHeight (16)
baseframe.cabecalho.novo:SetPoint ("bottomright", baseframe, "topright", instancia.instance_button_anchor [1], instancia.instance_button_anchor [2])
baseframe.cabecalho.novo:SetScript ("OnClick", function() _detalhes:CriarInstancia (_, true); _G.GameCooltip:ShowMe (false) end)
baseframe.cabecalho.novo:SetText ("#"..instancia.meu_id)
+ baseframe.cabecalho.novo:SetNormalFontObject ("GameFontHighlightSmall")
--> cooltip through inject
--> OnClick Function [1] caller [2] fixed param [3] param1 [4] param2
@@ -5793,126 +5598,39 @@ function gump:CriaCabecalho (baseframe, instancia)
--> Inject
_G.GameCooltip:CoolTipInject (baseframe.cabecalho.novo)
+ -- ~delete ~erase
--> RESETAR HISTORICO ----------------------------------------------------------------------------------------------------------------------------------------------------
- if (not _detalhes.ResetButton) then
-
- _detalhes.ResetButtonInstance = instancia.meu_id
- _detalhes.ResetButtonMode = 1
-
- function _detalhes:ResetButtonSnapTo (instancia)
- if (type (instancia) == "number") then
- instancia = _detalhes:GetInstance (instancia)
- end
-
- if (instancia.baseframe:GetWidth() < 215 or instancia.resetbutton_info.always_small) then
- _detalhes.ResetButtonMode = 2
- else
- _detalhes.ResetButtonMode = 1
- end
-
- _detalhes.ResetButton:SetParent (instancia.baseframe)
- _detalhes.ResetButton2:SetParent (instancia.baseframe)
- _detalhes.ResetButton:SetPoint ("right", instancia.baseframe.cabecalho.novo, "left")
- _detalhes.ResetButton2:SetPoint ("right", instancia.baseframe.cabecalho.novo, "left", 3, 0)
- _detalhes.ResetButton:SetFrameLevel (instancia.baseframe.UPFrame:GetFrameLevel()+1)
- _detalhes.ResetButton2:SetFrameLevel (instancia.baseframe.UPFrame:GetFrameLevel()+1)
-
- if (_detalhes.ResetButtonMode == 1) then
- gump:Fade (_detalhes.ResetButton, 0)
- gump:Fade (_detalhes.ResetButton2, 1)
- else
- gump:Fade (_detalhes.ResetButton, 1)
- gump:Fade (_detalhes.ResetButton2, 0)
- end
-
- end
-
------------------> big button
- _detalhes.ResetButton = CreateFrame ("button", "DetailsResetButton1", baseframe, "UIPanelButtonTemplate")
- _detalhes.ResetButton:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
- _detalhes.ResetButton:SetWidth (50)
- _detalhes.ResetButton:SetHeight (12)
- _detalhes.ResetButton:SetPoint ("right", baseframe.cabecalho.novo, "left")
-
- _detalhes.ResetButton:SetText (Loc ["STRING_ERASE"])
-
- _detalhes.ResetButton:SetScript ("OnClick", function() _detalhes.tabela_historico:resetar() end)
-
- _detalhes.ResetButton:SetScript ("OnEnter", function (self)
- local lower_instance = _detalhes:GetLowerInstanceNumber()
- if (lower_instance) then
- OnEnterMainWindow (_detalhes:GetInstance (lower_instance), self, 3)
- end
- end)
-
- _detalhes.ResetButton:SetScript ("OnLeave", function (self)
-
- local lower_instance = _detalhes:GetLowerInstanceNumber()
- if (lower_instance) then
- OnLeaveMainWindow (_detalhes:GetInstance (lower_instance), self, 3)
- end
- if (_G.GameCooltip.active) then
- local passou = 0
- self:SetScript ("OnUpdate", function (self, elapsed)
- passou = passou+elapsed
- if (passou > 0.3) then
- if (not _G.GameCooltip.mouse_over and not _G.GameCooltip.button_over) then
- _G.GameCooltip:ShowMe (false)
- end
- self:SetScript ("OnUpdate", nil)
- end
- end)
- else
- self:SetScript ("OnUpdate", nil)
- end
- end)
-
-----------------> small button
- _detalhes.ResetButton2 = CreateFrame ("button", "DetailsResetButton2", baseframe, "OptionsButtonTemplate")
- _detalhes.ResetButton2:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
- _detalhes.ResetButton2:SetWidth (22)
- _detalhes.ResetButton2:SetHeight (15)
- _detalhes.ResetButton2:SetPoint ("right", baseframe.cabecalho.novo, "left", 2, 0)
-
- local text = _detalhes.ResetButton2:CreateFontString ("DetailsResetButton2Text2", "overlay", "GameFont_Gigantic")
- text:SetText ("-")
- _detalhes.ResetButton2:SetFontString (text)
- _detalhes.ResetButton2:SetNormalFontObject ("GameFont_Gigantic")
- _detalhes.ResetButton2:SetHighlightFontObject ("GameFont_Gigantic")
-
- _detalhes.ResetButton2:SetScript ("OnClick", function() _detalhes.tabela_historico:resetar() end)
- _detalhes.ResetButton2:SetScript ("OnEnter", function (self)
- local lower_instance = _detalhes:GetLowerInstanceNumber()
- if (lower_instance) then
- OnEnterMainWindow (_detalhes:GetInstance (lower_instance), self, 3)
- end
- end)
-
- _detalhes.ResetButton2:SetScript ("OnLeave", function (self)
-
- local lower_instance = _detalhes:GetLowerInstanceNumber()
- if (lower_instance) then
- OnLeaveMainWindow (_detalhes:GetInstance (lower_instance), self, 3)
- end
-
- if (_G.GameCooltip.active) then
- local passou = 0
- self:SetScript ("OnUpdate", function (self, elapsed)
- passou = passou+elapsed
- if (passou > 0.3) then
- if (not _G.GameCooltip.mouse_over and not _G.GameCooltip.button_over) then
- _G.GameCooltip:ShowMe (false)
- end
- self:SetScript ("OnUpdate", nil)
- end
- end)
- else
- self:SetScript ("OnUpdate", nil)
- end
- end)
+ baseframe.cabecalho.reset = CreateFrame ("button", "DetailsClearSegmentsButton" .. instancia.meu_id, baseframe)
+ baseframe.cabecalho.reset:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
+ baseframe.cabecalho.reset:SetSize (10, 16)
+ baseframe.cabecalho.reset:SetPoint ("right", baseframe.cabecalho.novo, "left")
+ baseframe.cabecalho.reset.instance = instancia
+ baseframe.cabecalho.reset:SetScript ("OnClick", function() _detalhes.tabela_historico:resetar() end)
+ baseframe.cabecalho.reset:SetScript ("OnEnter", reset_button_onenter)
+ baseframe.cabecalho.reset:SetScript ("OnLeave", reset_button_onleave)
- end
+ baseframe.cabecalho.reset:SetNormalTexture ([[Interface\Addons\Details\Images\reset_button]])
+ baseframe.cabecalho.reset:SetHighlightTexture ([[Interface\Addons\Details\Images\reset_button]])
+ baseframe.cabecalho.reset:SetPushedTexture ([[Interface\Addons\Details\Images\reset_button]])
+
+--[[
+ if (_G.GameCooltip.active) then
+ local passou = 0
+ self:SetScript ("OnUpdate", function (self, elapsed)
+ passou = passou+elapsed
+ if (passou > 0.3) then
+ if (not _G.GameCooltip.mouse_over and not _G.GameCooltip.button_over) then
+ _G.GameCooltip:ShowMe (false)
+ end
+ self:SetScript ("OnUpdate", nil)
+ end
+ end)
+ else
+ self:SetScript ("OnUpdate", nil)
+ end
+ end)
+--]]
--> fim botão reset
@@ -5999,7 +5717,7 @@ function gump:CriaCabecalho (baseframe, instancia)
---------> consolidate frame ----------------------------------------------------------------------------------------------------------------------------------------------------
- local consolidateFrame = CreateFrame ("frame", nil, _detalhes.listener)
+ local consolidateFrame = CreateFrame ("frame", "DetailsConsolidateFrame" .. instancia.meu_id, _detalhes.listener)
consolidateFrame:SetWidth (21)
consolidateFrame:SetHeight (83)
consolidateFrame:SetFrameLevel (baseframe:GetFrameLevel()-1)
@@ -6019,7 +5737,7 @@ function gump:CriaCabecalho (baseframe, instancia)
---------> consolidate button
- local consolidateButton = CreateFrame ("button", nil, baseframe)
+ local consolidateButton = CreateFrame ("button", "DetailsConsolidateButton" .. instancia.meu_id, baseframe)
consolidateButton:SetWidth (16)
consolidateButton:SetHeight (16)
consolidateButton:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
diff --git a/gumps/switch.lua b/gumps/switch.lua
index c18d9b42..77d3baf3 100644
--- a/gumps/switch.lua
+++ b/gumps/switch.lua
@@ -27,13 +27,14 @@ do
frame:SetBackdropBorderColor (170/255, 170/255, 170/255)
frame:SetBackdropColor (24/255, 24/255, 24/255, .8)
- frame:SetFrameStrata ("HIGH")
- frame:SetFrameLevel (8)
+ frame:SetFrameStrata ("DIALOG")
+ frame:SetFrameLevel (16)
function _detalhes.switch:CloseMe()
_detalhes.switch.frame:Hide()
_detalhes.switch.frame:SetBackdropColor (24/255, 24/255, 24/255, .8)
_detalhes.switch.current_instancia:StatusBarAlert (nil)
+ _detalhes.switch.current_instancia = nil
end
--> limitação: não tenho como pegar o base frame da instância por aqui
@@ -59,6 +60,10 @@ local right_click_texture = {[[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 14,
function _detalhes.switch:ShowMe (instancia)
+ if (_detalhes.switch.current_instancia) then
+ _detalhes.switch.current_instancia:StatusBarAlert (nil)
+ end
+
_detalhes.switch.current_instancia = instancia
--_detalhes.switch.frame:SetFrameLevel (instancia.baseframe:GetFrameLevel() + 5)
@@ -282,7 +287,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
}
local button = gump:NewDetailsButton (frame, frame, _, _detalhes.FastSwitch, nil, paramTable, 15, 15, "", "", "", "",
- {rightFunc = {func = _detalhes.FastSwitch, param1 = nil, param2 = {atributo = nil, button = index}}, OnGrab = "PassClick"})
+ {rightFunc = {func = _detalhes.FastSwitch, param1 = nil, param2 = {atributo = nil, button = index}}, OnGrab = "PassClick"}, "DetailsSwitchPanelButton_1_"..index)
button:SetPoint ("topleft", frame, "topleft", x, -y)
button.rightButton = rightButton
@@ -308,7 +313,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
button.line2:SetPoint ("left", button, "right", 0, -3)
local button2 = gump:NewDetailsButton (button, button, _, _detalhes.FastSwitch, nil, paramTable, 1, 1, button.line, "", "", button.line2,
- {rightFunc = {func = _detalhes.switch.CloseMe, param1 = nil, param2 = nil}, OnGrab = "PassClick"})
+ {rightFunc = {func = _detalhes.switch.CloseMe, param1 = nil, param2 = nil}, OnGrab = "PassClick"}, "DetailsSwitchPanelButton_2_"..index)
button2:SetPoint ("topleft", button, "topright", 1, 0)
button2:SetPoint ("bottomright", button, "bottomright", 90, 0)
button.button2 = button2
diff --git a/images/icons.tga b/images/icons.tga
index ae770c2a..6e5fbd72 100644
Binary files a/images/icons.tga and b/images/icons.tga differ
diff --git a/images/icons2.tga b/images/icons2.tga
index b274fbc6..9b9b1e59 100644
Binary files a/images/icons2.tga and b/images/icons2.tga differ
diff --git a/images/reset_button.tga b/images/reset_button.tga
new file mode 100644
index 00000000..597ecc22
Binary files /dev/null and b/images/reset_button.tga differ
diff --git a/images/skins/default_skin.tga b/images/skins/default_skin.tga
index b3f8bb34..3f2f561a 100644
Binary files a/images/skins/default_skin.tga and b/images/skins/default_skin.tga differ
diff --git a/images/skins/elvui.tga b/images/skins/elvui.tga
index 37a76a71..02811775 100644
Binary files a/images/skins/elvui.tga and b/images/skins/elvui.tga differ
diff --git a/images/skins/flat_skin.tga b/images/skins/flat_skin.tga
index 2e4b5a97..d32d7b78 100644
Binary files a/images/skins/flat_skin.tga and b/images/skins/flat_skin.tga differ
diff --git a/images/whatsnew.tga b/images/whatsnew.tga
deleted file mode 100644
index 93310c7d..00000000
Binary files a/images/whatsnew.tga and /dev/null differ
diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
index eb43a12c..f9679f09 100644
--- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
+++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua
@@ -954,7 +954,7 @@ function EncounterDetails:OpenAndRefresh (_, segment)
for index, jogador in _ipairs (DamageContainer._ActorTable) do
--> só estou interessado nos adds, conferir pelo nome
- if (adds_pool [tonumber (jogador.serial:sub(6, 10), 16)]) then
+ if (adds_pool [tonumber (jogador.serial:sub(6, 10), 16)] or (jogador.flag_original and bit.band (jogador.flag_original, 0x00000040) ~= 0)) then --> é um inimigo) then
local nome = jogador.nome
local tabela = {total = 0, dano_em = {}, dano_em_total = 0, damage_from = {}, damage_from_total = 0}
diff --git a/startup.lua b/startup.lua
index 12374e42..76f5353f 100644
--- a/startup.lua
+++ b/startup.lua
@@ -420,6 +420,9 @@ function _G._detalhes:Start()
end
if (self.is_version_first_run) then
+
+ local enable_reset_warning = true
+
local lower_instance = _detalhes:GetLowerInstanceNumber()
if (lower_instance) then
lower_instance = _detalhes:GetInstance (lower_instance)
@@ -429,103 +432,89 @@ function _G._detalhes:Start()
end
_detalhes:FillUserCustomSpells()
- end
-
- --> minimap
- local LDB = LibStub ("LibDataBroker-1.1", true)
- local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
-
- if LDB then
+
+ if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 18 and enable_reset_warning) then
+
+ --print ("Last Version:", _detalhes_database.last_version, "Last Interval Version:", _detalhes_database.last_realversion)
- local minimapIcon = LDB:NewDataObject ("Details!", {
- type = "launcher",
- icon = [[Interface\AddOns\Details\images\minimap]],
+ local resetwarning_frame = CreateFrame ("FRAME", "DetailsResetConfigWarningDialog", UIParent, "ButtonFrameTemplate")
+ resetwarning_frame:SetFrameStrata ("LOW")
+ tinsert (UISpecialFrames, "DetailsResetConfigWarningDialog")
+ resetwarning_frame:SetPoint ("center", UIParent, "center")
+ resetwarning_frame:SetSize (512, 200)
+ resetwarning_frame.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-GNOME]])
+ resetwarning_frame:SetScript ("OnHide", function()
+ DetailsBubble:HideBubble()
+ end)
- HotCornerIgnore = true,
+ resetwarning_frame.TitleText:SetText ("Noooooooooooo!!!")
+
+ resetwarning_frame.midtext = resetwarning_frame:CreateFontString (nil, "artwork", "GameFontNormal")
+ resetwarning_frame.midtext:SetText ("A pack of murlocs has attacked Details! tech center, our gnomes engineers are working on fixing the damage.\n\n If something is messed in your Details!, you can click on the 'Reset Skin' button.")
+ resetwarning_frame.midtext:SetPoint ("topleft", resetwarning_frame, "topleft", 10, -90)
+ resetwarning_frame.midtext:SetJustifyH ("center")
+ resetwarning_frame.midtext:SetWidth (370)
- OnClick = function (self, button)
+ resetwarning_frame.gnoma = resetwarning_frame:CreateTexture (nil, "artwork")
+ resetwarning_frame.gnoma:SetPoint ("topright", resetwarning_frame, "topright", -3, -80)
+ resetwarning_frame.gnoma:SetTexture ("Interface\\AddOns\\Details\\images\\icons2")
+ resetwarning_frame.gnoma:SetSize (89*1.00, 97*1.00)
+ --resetwarning_frame.gnoma:SetTexCoord (0.212890625, 0.494140625, 0.798828125, 0.99609375) -- 109 409 253 510
+ resetwarning_frame.gnoma:SetTexCoord (0.17578125, 0.001953125, 0.59765625, 0.787109375) -- 1 306 90 403
- if (button == "LeftButton") then
-
- local lower_instance = _detalhes:GetLowerInstanceNumber()
- if (not lower_instance) then
- local instance = _detalhes:GetInstance (1)
- _detalhes.CriarInstancia (_, _, 1)
- _detalhes:OpenOptionsWindow (instance)
+ resetwarning_frame.close = CreateFrame ("Button", "DetailsFeedbackWindowCloseButton", resetwarning_frame, "OptionsButtonTemplate")
+ resetwarning_frame.close:SetPoint ("bottomleft", resetwarning_frame, "bottomleft", 8, 4)
+ resetwarning_frame.close:SetText ("Close")
+ resetwarning_frame.close:SetScript ("OnClick", function (self)
+ resetwarning_frame:Hide()
+ end)
+
+ resetwarning_frame.see_updates = CreateFrame ("Button", "DetailsResetWindowSeeUpdatesButton", resetwarning_frame, "OptionsButtonTemplate")
+ resetwarning_frame.see_updates:SetPoint ("bottomright", resetwarning_frame, "bottomright", -10, 4)
+ resetwarning_frame.see_updates:SetText ("Update Info")
+ resetwarning_frame.see_updates:SetScript ("OnClick", function (self)
+ _detalhes.OpenNewsWindow()
+ DetailsBubble:HideBubble()
+ --resetwarning_frame:Hide()
+ end)
+ resetwarning_frame.see_updates:SetWidth (130)
+
+ resetwarning_frame.reset_skin = CreateFrame ("Button", "DetailsResetWindowResetSkinButton", resetwarning_frame, "OptionsButtonTemplate")
+ resetwarning_frame.reset_skin:SetPoint ("right", resetwarning_frame.see_updates, "left", -10, 0)
+ resetwarning_frame.reset_skin:SetText ("Reset Skin")
+ resetwarning_frame.reset_skin:SetScript ("OnClick", function (self)
+ --do the reset
+ for index, instance in ipairs (_detalhes.tabela_instancias) do
+ if (not instance.iniciada) then
+ instance:RestauraJanela()
+ local skin = instance.skin
+ instance:ChangeSkin ("Default Skin")
+ instance:ChangeSkin ("Minimalistic")
+ instance:ChangeSkin (skin)
+ instance:DesativarInstancia()
else
- _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
+ local skin = instance.skin
+ instance:ChangeSkin ("Default Skin")
+ instance:ChangeSkin ("Minimalistic")
+ instance:ChangeSkin (skin)
end
-
- elseif (button == "RightButton") then
-
- GameTooltip:Hide()
- local GameCooltip = GameCooltip
-
- GameCooltip:Reset()
- GameCooltip:SetType ("menu")
- GameCooltip:SetOption ("ButtonsYMod", -5)
- GameCooltip:SetOption ("HeighMod", 5)
- GameCooltip:SetOption ("TextSize", 10)
-
- --344 427 200 268 0.0009765625
- --0.672851, 0.833007, 0.391601, 0.522460
-
- GameCooltip:SetBannerImage (1, [[Interface\AddOns\Details\images\icons]], 83*.5, 68*.5, {"bottomleft", "topleft", 1, -4}, {0.672851, 0.833007, 0.391601, 0.522460}, nil)
- GameCooltip:SetBannerImage (2, "Interface\\PetBattles\\Weather-Windy", 512*.35, 128*.3, {"bottomleft", "topleft", -25, -4}, {0, 1, 1, 0})
- GameCooltip:SetBannerText (1, "Mini Map Menu", {"left", "right", 2, -5}, "white", 10)
-
- --> reset
- GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar, true, nil, nil, Loc ["STRING_MINIMAPMENU_RESET"], nil, true)
- GameCooltip:AddIcon ([[Interface\COMMON\VOICECHAT-MUTED]], 1, 1, 14, 14)
-
- GameCooltip:AddLine ("$div")
-
- --> nova instancai
- GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_NEWWINDOW"], nil, true)
- GameCooltip:AddIcon ([[Interface\ICONS\Spell_ChargePositive]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
-
- --> reopen window 64: 0.0078125
- local reopen = function()
- for _, instance in ipairs (_detalhes.tabela_instancias) do
- if (not instance:IsAtiva()) then
- _detalhes:CriarInstancia (instance.meu_id)
- return
- end
- end
- end
- GameCooltip:AddMenu (1, reopen, nil, nil, nil, Loc ["STRING_MINIMAPMENU_REOPEN"], nil, true)
- GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_VoidShift]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
-
- GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true)
- GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_VoidShift]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125, "#ffb400")
-
- GameCooltip:AddLine ("$div")
-
- --> lock
- GameCooltip:AddMenu (1, _detalhes.TravasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_LOCK"], nil, true)
- GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
-
- GameCooltip:AddMenu (1, _detalhes.DestravarInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_UNLOCK"], nil, true)
- GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125, "gray")
-
- GameCooltip:SetOwner (self, "topright", "bottomleft")
- GameCooltip:ShowCooltip()
-
-
end
- end,
- OnTooltipShow = function (tooltip)
- tooltip:AddLine ("Details!", 1, 1, 1)
- tooltip:AddLine (Loc ["STRING_MINIMAP_TOOLTIP1"])
- tooltip:AddLine (Loc ["STRING_MINIMAP_TOOLTIP2"])
- end,
- })
+ end)
+ resetwarning_frame.reset_skin:SetWidth (130)
- if (minimapIcon and not LDBIcon:IsRegistered ("Details!")) then
- LDBIcon:Register ("Details!", minimapIcon, self.minimap)
+ function _detalhes:ResetWarningDialog()
+ DetailsResetConfigWarningDialog:Show()
+ DetailsBubble:SetOwner (resetwarning_frame.gnoma, "bottomright", "topleft", 30, -37, 1)
+ DetailsBubble:FlipHorizontal()
+ DetailsBubble:SetBubbleText ("", "", "WWHYYYYYYYYY!!!!", "", "")
+ DetailsBubble:TextConfig (14, nil, "deeppink")
+ DetailsBubble:ShowBubble()
+
+ end
+ _detalhes:ScheduleTimer ("ResetWarningDialog", 7)
+
end
-
end
--> interface menu
@@ -599,10 +588,166 @@ function _G._detalhes:Start()
_detalhes:ScheduleTimer ("FadeStartVersion", 7)
end
+ end
+
+ --> minimap
+ local LDB = LibStub ("LibDataBroker-1.1", true)
+ local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true)
+
+ if LDB then
+
+ local databroker = LDB:NewDataObject ("Details!", {
+ type = "launcher",
+ icon = [[Interface\AddOns\Details\images\minimap]],
+ text = "0",
+
+ HotCornerIgnore = true,
+
+ OnClick = function (self, button)
+
+ if (button == "LeftButton") then
+
+ --> 1 = open options panel
+ if (_detalhes.minimap.onclick_what_todo == 1) then
+ local lower_instance = _detalhes:GetLowerInstanceNumber()
+ if (not lower_instance) then
+ local instance = _detalhes:GetInstance (1)
+ _detalhes.CriarInstancia (_, _, 1)
+ _detalhes:OpenOptionsWindow (instance)
+ else
+ _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
+ end
+
+ --> 2 = reset data
+ elseif (_detalhes.minimap.onclick_what_todo == 2) then
+ _detalhes.tabela_historico:resetar()
+
+ --> 3 = unknown
+ elseif (_detalhes.minimap.onclick_what_todo == 3) then
+
+ end
+
+ elseif (button == "RightButton") then
+
+ GameTooltip:Hide()
+ local GameCooltip = GameCooltip
+
+ GameCooltip:Reset()
+ GameCooltip:SetType ("menu")
+ GameCooltip:SetOption ("ButtonsYMod", -5)
+ GameCooltip:SetOption ("HeighMod", 5)
+ GameCooltip:SetOption ("TextSize", 10)
+
+ --344 427 200 268 0.0009765625
+ --0.672851, 0.833007, 0.391601, 0.522460
+
+ GameCooltip:SetBannerImage (1, [[Interface\AddOns\Details\images\icons]], 83*.5, 68*.5, {"bottomleft", "topleft", 1, -4}, {0.672851, 0.833007, 0.391601, 0.522460}, nil)
+ GameCooltip:SetBannerImage (2, "Interface\\PetBattles\\Weather-Windy", 512*.35, 128*.3, {"bottomleft", "topleft", -25, -4}, {0, 1, 1, 0})
+ GameCooltip:SetBannerText (1, "Mini Map Menu", {"left", "right", 2, -5}, "white", 10)
+
+ --> reset
+ GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar, true, nil, nil, Loc ["STRING_MINIMAPMENU_RESET"], nil, true)
+ GameCooltip:AddIcon ([[Interface\COMMON\VOICECHAT-MUTED]], 1, 1, 14, 14)
+
+ GameCooltip:AddLine ("$div")
+
+ --> nova instancai
+ GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_NEWWINDOW"], nil, true)
+ GameCooltip:AddIcon ([[Interface\ICONS\Spell_ChargePositive]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
+
+ --> reopen window 64: 0.0078125
+ local reopen = function()
+ for _, instance in ipairs (_detalhes.tabela_instancias) do
+ if (not instance:IsAtiva()) then
+ _detalhes:CriarInstancia (instance.meu_id)
+ return
+ end
+ end
+ end
+ GameCooltip:AddMenu (1, reopen, nil, nil, nil, Loc ["STRING_MINIMAPMENU_REOPEN"], nil, true)
+ GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_VoidShift]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
+
+ GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true)
+ GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_VoidShift]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125, "#ffb400")
+
+ GameCooltip:AddLine ("$div")
+
+ --> lock
+ GameCooltip:AddMenu (1, _detalhes.TravasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_LOCK"], nil, true)
+ GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125)
+
+ GameCooltip:AddMenu (1, _detalhes.DestravarInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_UNLOCK"], nil, true)
+ GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125, "gray")
+
+ GameCooltip:SetOwner (self, "topright", "bottomleft")
+ GameCooltip:ShowCooltip()
+
+
+ end
+ end,
+ OnTooltipShow = function (tooltip)
+ tooltip:AddLine ("Details!", 1, 1, 1)
+ if (_detalhes.minimap.onclick_what_todo == 1) then
+ tooltip:AddLine (Loc ["STRING_MINIMAP_TOOLTIP1"])
+ elseif (_detalhes.minimap.onclick_what_todo == 2) then
+ tooltip:AddLine (Loc ["STRING_MINIMAP_TOOLTIP11"])
+ end
+ tooltip:AddLine (Loc ["STRING_MINIMAP_TOOLTIP2"])
+ end,
+ })
+
+ if (databroker and not LDBIcon:IsRegistered ("Details!")) then
+ LDBIcon:Register ("Details!", databroker, self.minimap)
+ end
+
+ _detalhes.databroker = databroker
+
end
--register lib-hotcorners
- local reset_func = function (frame, button) _detalhes.tabela_historico:resetar() end
+ local on_click_on_hotcorner_button = function (frame, button)
+ if (_detalhes.hotcorner_topleft.onclick_what_todo == 1) then
+ local lower_instance = _detalhes:GetLowerInstanceNumber()
+ if (not lower_instance) then
+ local instance = _detalhes:GetInstance (1)
+ _detalhes.CriarInstancia (_, _, 1)
+ _detalhes:OpenOptionsWindow (instance)
+ else
+ _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
+ end
+
+ elseif (_detalhes.hotcorner_topleft.onclick_what_todo == 2) then
+ _detalhes.tabela_historico:resetar()
+ end
+ end
+
+ local on_click_on_quickclick_button = function (frame, button)
+
+ if (_detalhes.hotcorner_topleft.quickclick_what_todo == 1) then
+ local lower_instance = _detalhes:GetLowerInstanceNumber()
+ if (not lower_instance) then
+ local instance = _detalhes:GetInstance (1)
+ _detalhes.CriarInstancia (_, _, 1)
+ _detalhes:OpenOptionsWindow (instance)
+ else
+ _detalhes:OpenOptionsWindow (_detalhes:GetInstance (lower_instance))
+ end
+
+ elseif (_detalhes.hotcorner_topleft.quickclick_what_todo == 2) then
+ _detalhes.tabela_historico:resetar()
+ end
+ end
+
+ local tooltip_hotcorner = function()
+ GameTooltip:AddLine ("Details!", 1, 1, 1, 1)
+ if (_detalhes.hotcorner_topleft.onclick_what_todo == 1) then
+ GameTooltip:AddLine ("|cFF00FF00Left Click:|r open options panel.", 1, 1, 1, 1)
+
+ elseif (_detalhes.hotcorner_topleft.onclick_what_todo == 2) then
+ GameTooltip:AddLine ("|cFF00FF00Left Click:|r clear all segments.", 1, 1, 1, 1)
+
+ end
+ end
_detalhes:RegisterHotCornerButton (
--> absolute name
@@ -616,13 +761,13 @@ function _G._detalhes:Start()
--> icon
[[Interface\AddOns\Details\images\minimap]],
--> tooltip
- "|cFFFFFFFFDetails!\n|cFF00FF00Left Click:|r clear all segments.",
+ tooltip_hotcorner,
--> click function
- reset_func,
+ on_click_on_hotcorner_button,
--> menus
nil,
--> quick click
- reset_func)
+ on_click_on_quickclick_button)
--> register time captures
--_detalhes:LoadUserTimeCaptures()
@@ -646,10 +791,11 @@ function _G._detalhes:Start()
b:SetAlpha (1)
--]]
- --function _detalhes:OpenOptionsWindowAtStart()
+ function _detalhes:OpenOptionsWindowAtStart()
--_detalhes:OpenOptionsWindow (_detalhes.tabela_instancias[1])
- --end
- --_detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2)
+ --print (_G ["DetailsClearSegmentsButton1"]:GetSize())
+ end
+ _detalhes:ScheduleTimer ("OpenOptionsWindowAtStart", 2)
end