- Added Devotion Aura cooldown for paladins.
- Added options for lock, unlock, break snap, close, reopen and create new window. - Added a options panel for HotCorners. - Shortcut panel is now known as Bookmarks panel, also a revamp has been done in its frames. - Fixed percent issue with Healing Done and HPS while in combat. - New API: instance:IsStarted() return if the instance have its frames built.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local major, minor = "LibHotCorners", 5
|
||||
local major, minor = "LibHotCorners", 6
|
||||
local LibHotCorners, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
if (not LibHotCorners) then
|
||||
@@ -47,15 +47,25 @@ local tinsert = tinsert
|
||||
|
||||
if (savedtable and not LibHotCorners.options) then
|
||||
if (not savedtable.__cachedoptions) then
|
||||
savedtable.__cachedoptions = {age = 0, clicks = {}, disabled = {}}
|
||||
savedtable.__cachedoptions = {age = 0, clicks = {}, disabled = {}, is_enabled = true}
|
||||
end
|
||||
LibHotCorners.options = savedtable.__cachedoptions
|
||||
LibHotCorners.options.age = LibHotCorners.options.age + 1
|
||||
|
||||
--> version 6
|
||||
if (type (LibHotCorners.options.is_enabled) ~= "boolean") then
|
||||
LibHotCorners.options.is_enabled = true
|
||||
end
|
||||
elseif (savedtable) then
|
||||
if (LibHotCorners.options.age < savedtable.__cachedoptions.age) then
|
||||
LibHotCorners.options = savedtable.__cachedoptions
|
||||
LibHotCorners.options.age = LibHotCorners.options.age + 1
|
||||
end
|
||||
|
||||
--> version 6
|
||||
if (type (LibHotCorners.options.is_enabled) ~= "boolean") then
|
||||
LibHotCorners.options.is_enabled = true
|
||||
end
|
||||
end
|
||||
|
||||
savedtable = savedtable or {}
|
||||
@@ -140,6 +150,12 @@ local tinsert = tinsert
|
||||
local f = CreateFrame ("frame")
|
||||
f:RegisterEvent ("PLAYER_LOGIN")
|
||||
f:SetScript ("OnEvent", function()
|
||||
|
||||
SLASH_HOTCORNER1, SLASH_HOTCORNER2 = "/hotcorners", "/hotcorner"
|
||||
function SlashCmdList.HOTCORNER (msg, editbox)
|
||||
HotCornersOpenOptions (self);
|
||||
end
|
||||
|
||||
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", nil, name .. "HotCornerLauncher", dataobj.icon, dataobj.OnTooltipShow, dataobj.OnClick, nil, nil, dataobj.OnEnter, dataobj.OnLeave)
|
||||
@@ -197,12 +213,17 @@ local tinsert = tinsert
|
||||
local more_clicked = function (t1, t2)
|
||||
return t1[1] > t2[1]
|
||||
end
|
||||
|
||||
|
||||
function HotCornersOnEnter (self)
|
||||
|
||||
if (not LibHotCorners.options.is_enabled) then
|
||||
return
|
||||
end
|
||||
|
||||
if (not LibHotCorners [self.position].is_enabled) then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
set_size (self)
|
||||
|
||||
HotCornersBackgroundFrame:EnableMouse (true)
|
||||
@@ -215,6 +236,8 @@ local tinsert = tinsert
|
||||
end
|
||||
table.sort (sort, more_clicked)
|
||||
|
||||
local last_button
|
||||
|
||||
for index, button_table in ipairs (sort) do
|
||||
button_table = button_table [2]
|
||||
if (not button_table.widget) then
|
||||
@@ -235,11 +258,19 @@ local tinsert = tinsert
|
||||
end
|
||||
|
||||
button_table.widget:Show()
|
||||
last_button = button_table.widget
|
||||
|
||||
i = i + 1
|
||||
else
|
||||
button_table.widget:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local OptionsButton = LibHotCorners [self.position].optionsbutton
|
||||
local y = i * 35 * -1
|
||||
OptionsButton:SetPoint ("top", self, "top", 0, y)
|
||||
OptionsButton:Show()
|
||||
|
||||
end
|
||||
|
||||
--> corner frame on leave
|
||||
@@ -248,6 +279,8 @@ local tinsert = tinsert
|
||||
for index, button_table in ipairs (LibHotCorners [self.position]) do
|
||||
button_table.widget:Hide()
|
||||
end
|
||||
local OptionsButton = LibHotCorners [self.position].optionsbutton
|
||||
OptionsButton:Hide()
|
||||
end
|
||||
|
||||
--> quick corner on click
|
||||
@@ -258,6 +291,31 @@ local tinsert = tinsert
|
||||
end
|
||||
end
|
||||
|
||||
--> options button onenter
|
||||
function HotCornersOptionsButtonOnEnter (self)
|
||||
set_size (self:GetParent())
|
||||
for index, button_table in ipairs (LibHotCorners [self:GetParent().position]) do
|
||||
if (not button_table.savedtable.hide) then
|
||||
button_table.widget:Show()
|
||||
end
|
||||
end
|
||||
self:Show()
|
||||
end
|
||||
|
||||
function HotCornersOpenOptions (self)
|
||||
HotCornersOptionsFrame:Show()
|
||||
HotCornersOptionsFrameEnableCheckBox:SetChecked (LibHotCorners.options.is_enabled)
|
||||
end
|
||||
|
||||
function HotCornersSetEnabled (state)
|
||||
LibHotCorners.options.is_enabled = state
|
||||
end
|
||||
|
||||
--> options button onleave
|
||||
function HotCornersOptionsButtonOnLeave (self)
|
||||
self:GetParent():GetScript("OnLeave")(self:GetParent())
|
||||
end
|
||||
|
||||
--> button onenter
|
||||
function HotCornersButtonOnEnter (self)
|
||||
set_size (self:GetParent())
|
||||
@@ -267,6 +325,8 @@ local tinsert = tinsert
|
||||
end
|
||||
end
|
||||
show_tooltip (self)
|
||||
local OptionsButton = LibHotCorners [self:GetParent().position].optionsbutton
|
||||
OptionsButton:Show()
|
||||
end
|
||||
|
||||
--> button onleave
|
||||
@@ -276,6 +336,8 @@ local tinsert = tinsert
|
||||
self.table.onleave (self)
|
||||
end
|
||||
self:GetParent():GetScript("OnLeave")(self:GetParent())
|
||||
local OptionsButton = LibHotCorners [self:GetParent().position].optionsbutton
|
||||
OptionsButton:Hide()
|
||||
end
|
||||
|
||||
--> button onmousedown
|
||||
@@ -311,6 +373,9 @@ local tinsert = tinsert
|
||||
--fast corner button
|
||||
local QuickClickButton = CreateFrame ("button", "LibHotCornersTopLeftFastButton", TopLeftCorner, "HotCornersQuickCornerButtonTemplate")
|
||||
|
||||
--options button
|
||||
local OptionsButton = CreateFrame ("button", "LibHotCornersTopLeftOptionsButton", TopLeftCorner, "HotCornersOptionsButtonTemplate")
|
||||
|
||||
if (debug) then
|
||||
QuickClickButton:SetSize (20, 20)
|
||||
QuickClickButton:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]], tile = true, tileSize = 40})
|
||||
@@ -318,6 +383,7 @@ local tinsert = tinsert
|
||||
end
|
||||
|
||||
LibHotCorners.topleft.quickbutton = QuickClickButton
|
||||
LibHotCorners.topleft.optionsbutton = OptionsButton
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> buttons
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:EnableMouse (false)
|
||||
self:EnableMouse (false);
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
HotCornersBackgroundOnEnter (self)
|
||||
HotCornersBackgroundOnEnter (self);
|
||||
</OnEnter>
|
||||
</Scripts>
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
HotCornersOnEnter (self)
|
||||
HotCornersOnEnter (self);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
HotCornersOnLeave (self)
|
||||
HotCornersOnLeave (self);
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
@@ -45,14 +45,14 @@
|
||||
</Anchors>
|
||||
|
||||
<Scripts>
|
||||
<OnCreate>
|
||||
self:SetFrameLevel (self:GetParent():GetFrameLevel()+2)
|
||||
</OnCreate>
|
||||
<OnLoad>
|
||||
self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
HotCornersOnQuickClick (self, button)
|
||||
HotCornersOnQuickClick (self, button);
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
HotCornersOnEnter (self:GetParent())
|
||||
HotCornersOnEnter (self:GetParent());
|
||||
</OnEnter>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
@@ -60,20 +60,101 @@
|
||||
<Frame name="HotCornersButtonTemplate" frameStrata="FULLSCREEN" hidden="true" virtual="true">
|
||||
<Size x="32" y="32"/>
|
||||
<Scripts>
|
||||
<OnCreate>
|
||||
self:SetFrameLevel (self:GetParent():GetFrameLevel()+2)
|
||||
</OnCreate>
|
||||
<OnLoad>
|
||||
self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
HotCornersButtonOnEnter (self)
|
||||
HotCornersButtonOnEnter (self);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
HotCornersButtonOnLeave (self)
|
||||
HotCornersButtonOnLeave (self);
|
||||
</OnLeave>
|
||||
<OnMouseDown>
|
||||
HotCornersButtonOnMouseDown (self, button)
|
||||
HotCornersButtonOnMouseDown (self, button);
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
HotCornersButtonOnMouseUp (self, button)
|
||||
HotCornersButtonOnMouseUp (self, button);
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Button name="HotCornersOptionsButtonTemplate" frameStrata="FULLSCREEN" hidden="false" virtual="true">
|
||||
<Size x="32" y="32"/>
|
||||
|
||||
<Layers>
|
||||
<Layer level="OVERLAY">
|
||||
<FontString text="options" name="$parentText" inherits="GameFontHighlightSmall" justifyH="LEFT" nonspacewrap="true" parentKey="text">
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER"/>
|
||||
</Anchors>
|
||||
<Color r="0.8" g="0.8" b="0.8" a="0.8"/>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetFrameLevel (self:GetParent():GetFrameLevel()+2);
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
HotCornersOptionsButtonOnEnter (self);
|
||||
self.text:SetTextColor (1, 1, 1, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
HotCornersOptionsButtonOnLeave (self);
|
||||
self.text:SetTextColor (0.8, 0.8, 0.8, 0.8);
|
||||
</OnLeave>
|
||||
<OnMouseDown>
|
||||
self.text:SetPoint ("center", self, "center", 1, -1);
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
self.text:SetPoint ("center", self, "center");
|
||||
HotCornersOpenOptions (self:GetParent());
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="HotCornersOptionsFrame" frameStrata="HIGH" movable="true" hidden="true" parent="UIParent" inherits="ButtonFrameTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="400" y="200"/>
|
||||
</Size>
|
||||
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="0"/>
|
||||
</Anchors>
|
||||
|
||||
<Frames>
|
||||
<CheckButton name="$parentEnableCheckBox" inherits="ChatConfigCheckButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT" x="30" y="-70"/>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G [self:GetName() .. "Text"]:SetText ("Enabled");
|
||||
self.tooltip = "Enable or Disable HorCorners";
|
||||
tinsert (UISpecialFrames, "HotCornersOptionsFrame");
|
||||
</OnLoad>
|
||||
<PostClick>
|
||||
if (self:GetChecked()) then
|
||||
HotCornersSetEnabled (true);
|
||||
else
|
||||
HotCornersSetEnabled (false);
|
||||
end
|
||||
</PostClick>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
</Frames>
|
||||
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self.TitleText:SetText ("HotCorners Options");
|
||||
self.portrait:SetTexture ([[Interface\FriendsFrame\FriendsFrameScrollIcon]]);
|
||||
</OnLoad>
|
||||
<OnMouseDown>
|
||||
self:StartMoving();
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
self:StopMovingOrSizing();
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
_ = nil
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0", "LibHotCorners")
|
||||
_detalhes.userversion = "v1.17.4"
|
||||
_detalhes.userversion = "v1.17.5"
|
||||
_detalhes.version = "Alpha 020"
|
||||
_detalhes.realversion = 20
|
||||
|
||||
|
||||
+24
-17
@@ -1069,6 +1069,10 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if (_detalhes.is_using_row_animations) then
|
||||
instancia:fazer_animacoes()
|
||||
end
|
||||
|
||||
if (instancia.atributo == 5) then --> custom
|
||||
--> zerar o .custom dos Actors
|
||||
@@ -1301,7 +1305,15 @@ end
|
||||
|
||||
if (esta_barra.hidden or esta_barra.fading_in or esta_barra.faded) then
|
||||
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
--esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
|
||||
if (_detalhes.is_using_row_animations and not forcar) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
gump:Fade (esta_barra, "out")
|
||||
|
||||
if (instancia.row_info.texture_class_colors) then
|
||||
@@ -1317,31 +1329,26 @@ end
|
||||
--> agora esta comparando se a tabela da barra é diferente da tabela na atualização anterior
|
||||
if (not tabela_anterior or tabela_anterior ~= esta_barra.minha_tabela or forcar) then --> aqui diz se a barra do jogador mudou de posição ou se ela apenas será atualizada
|
||||
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
if (_detalhes.is_using_row_animations and not forcar) then
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
esta_barra.animacao_ignorar = true
|
||||
end
|
||||
|
||||
esta_barra.last_value = esta_porcentagem --> reseta o ultimo valor da barra
|
||||
|
||||
if (_detalhes.is_using_row_animations and forcar) then
|
||||
esta_barra.tem_animacao = 0
|
||||
esta_barra:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
--if (_detalhes.is_using_row_animations and forcar) then
|
||||
-- esta_barra.tem_animacao = false
|
||||
-- esta_barra:SetScript ("OnUpdate", nil)
|
||||
--end
|
||||
|
||||
return self:RefreshBarra (esta_barra, instancia)
|
||||
|
||||
elseif (esta_porcentagem ~= esta_barra.last_value) then --> continua mostrando a mesma tabela então compara a porcentagem
|
||||
--> apenas atualizar
|
||||
if (_detalhes.is_using_row_animations) then
|
||||
|
||||
local upRow = barras_container [qual_barra-1]
|
||||
if (upRow) then
|
||||
if (upRow.statusbar:GetValue() < esta_barra.statusbar:GetValue()) then
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
else
|
||||
instancia:AnimarBarra (esta_barra, esta_porcentagem)
|
||||
end
|
||||
else
|
||||
instancia:AnimarBarra (esta_barra, esta_porcentagem)
|
||||
end
|
||||
esta_barra.animacao_fim = esta_porcentagem
|
||||
else
|
||||
esta_barra.statusbar:SetValue (esta_porcentagem)
|
||||
end
|
||||
|
||||
+15
-28
@@ -317,40 +317,27 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo
|
||||
local combat_time = instancia.showing:GetCombatTime()
|
||||
atributo_heal:ContainerRefreshHps (conteudo, combat_time)
|
||||
end
|
||||
--_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
|
||||
_detalhes.SortGroupHeal (conteudo, keyName)
|
||||
end
|
||||
|
||||
--_table_sort (conteudo, _detalhes.SortKeyGroup)
|
||||
|
||||
|
||||
--[[_table_sort (conteudo, function (a, b)
|
||||
if (a.grupo and b.grupo) then
|
||||
return a[keyName] > b[keyName]
|
||||
elseif (a.grupo and not b.grupo) then
|
||||
return true
|
||||
elseif (not a.grupo and b.grupo) then
|
||||
return false
|
||||
--
|
||||
if (not using_cache) then
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then --> é um player e esta em grupo
|
||||
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
break
|
||||
elseif (index == 1) then --> esse IF aqui, precisa mesmo ser aqui? não daria pra pega-lo com uma chave [1] nad grupo == true?
|
||||
instancia.top = conteudo[1][keyName]
|
||||
end
|
||||
|
||||
total = total + player[keyName]
|
||||
else
|
||||
return a[keyName] > b[keyName]
|
||||
end
|
||||
end)--]]
|
||||
|
||||
for index, player in _ipairs (conteudo) do
|
||||
if (player.grupo) then --> é um player e esta em grupo
|
||||
if (player[keyName] < 1) then --> dano menor que 1, interromper o loop
|
||||
amount = index - 1
|
||||
amount = index-1
|
||||
break
|
||||
elseif (index == 1) then --> esse IF aqui, precisa mesmo ser aqui? não daria pra pega-lo com uma chave [1] nad grupo == true?
|
||||
instancia.top = conteudo[1][keyName]
|
||||
end
|
||||
|
||||
total = total + player[keyName]
|
||||
else
|
||||
amount = index-1
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -219,6 +219,10 @@ function _detalhes:IsEnabled()
|
||||
return self.ativa
|
||||
end
|
||||
|
||||
function _detalhes:IsStarted()
|
||||
return self.iniciada
|
||||
end
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -456,7 +460,7 @@ end
|
||||
end
|
||||
|
||||
function _detalhes:CriarInstancia (_, id)
|
||||
|
||||
|
||||
if (id and _type (id) == "boolean") then
|
||||
|
||||
if (#_detalhes.tabela_instancias >= _detalhes.instances_amount) then
|
||||
@@ -472,6 +476,7 @@ end
|
||||
local instancia = _detalhes.tabela_instancias [id]
|
||||
if (instancia and not instancia:IsAtiva()) then
|
||||
instancia:AtivarInstancia()
|
||||
_detalhes:DelayOptionsRefresh (instancia)
|
||||
return
|
||||
end
|
||||
end
|
||||
@@ -758,6 +763,8 @@ function _detalhes:agrupar_janelas (lados)
|
||||
_detalhes.tutorial.unlock_button = _detalhes.tutorial.unlock_button + 1
|
||||
end
|
||||
|
||||
_detalhes:DelayOptionsRefresh()
|
||||
|
||||
end
|
||||
|
||||
local function FixSnaps (instancia)
|
||||
@@ -788,6 +795,8 @@ function _detalhes:Desagrupar (instancia, lado)
|
||||
instancia = _detalhes.tabela_instancias [instancia]
|
||||
end
|
||||
|
||||
_detalhes:DelayOptionsRefresh (nil, true)
|
||||
|
||||
if (not lado) then
|
||||
--print ("DEBUG: Desagrupar esta sem lado")
|
||||
return
|
||||
|
||||
+3
-7
@@ -41,13 +41,9 @@
|
||||
|
||||
--> get the fractional number representing the alphabetical letter
|
||||
function _detalhes:GetAlphabeticalOrderNumber (who_name)
|
||||
--local name = _upper (who_name)
|
||||
--local byte = _string_byte (name)
|
||||
--local abs = _math_abs (byte-91)
|
||||
--local n = math.floor (abs)/1000000
|
||||
--print (name, byte, abs, n)
|
||||
--return n
|
||||
return _math_abs (_string_byte (_upper (who_name))-91)/1000000
|
||||
local name = _upper (who_name)
|
||||
local byte1 = _math_abs (_string_byte (name, 2)-91)/1000000
|
||||
return byte1 + _math_abs (_string_byte (name, 1)-91)/10000
|
||||
end
|
||||
|
||||
--/script print (tonumber (4/1000000)) - 4e-006
|
||||
|
||||
+53
-9
@@ -29,7 +29,7 @@
|
||||
barra.inicio = barra.split.barra:GetValue()
|
||||
barra.fim = goal
|
||||
barra.proximo_update = 0
|
||||
barra.tem_animacao = 1
|
||||
barra.tem_animacao = true
|
||||
barra:SetScript ("OnUpdate", self.FazerAnimacaoSplit)
|
||||
end
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
self.split.div:SetPoint ("left", self.split.barra, "left", self.split.barra:GetValue()* (self.split.barra:GetWidth()/100) - 4, 0)
|
||||
|
||||
if (self.inicio+1 >= self.fim) then
|
||||
self.tem_animacao = 0
|
||||
self.tem_animacao = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
else
|
||||
@@ -53,17 +53,59 @@
|
||||
self.split.div:SetPoint ("left", self.split.barra, "left", self.split.barra:GetValue()* (self.split.barra:GetWidth()/100) - 4, 0)
|
||||
|
||||
if (self.inicio-1 <= self.fim) then
|
||||
self.tem_animacao = 0
|
||||
self.tem_animacao = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
self.proximo_update = 0
|
||||
end
|
||||
|
||||
function _detalhes:fazer_animacoes()
|
||||
|
||||
--[
|
||||
for i = 2, self.rows_fit_in_window do
|
||||
--local row_anterior = self.barras [i-1]
|
||||
local row = self.barras [i]
|
||||
local row_proxima = self.barras [i+1]
|
||||
|
||||
if (row_proxima) then
|
||||
local v = row.statusbar:GetValue()
|
||||
local v_proxima = row_proxima.statusbar:GetValue()
|
||||
|
||||
if (v_proxima > v) then
|
||||
if (row.animacao_fim >= v_proxima) then
|
||||
row.statusbar:SetValue (v_proxima)
|
||||
else
|
||||
row.statusbar:SetValue (row.animacao_fim)
|
||||
row_proxima.statusbar:SetValue (row.animacao_fim)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
for i = 2, self.rows_fit_in_window do
|
||||
local row = self.barras [i]
|
||||
if (row.animacao_ignorar) then
|
||||
row.animacao_ignorar = nil
|
||||
if (row.tem_animacao) then
|
||||
row.tem_animacao = false
|
||||
row:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
else
|
||||
if (row.animacao_fim ~= row.animacao_fim2) then
|
||||
_detalhes:AnimarBarra (row, row.animacao_fim)
|
||||
row.animacao_fim2 = row.animacao_fim
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:AnimarBarra (esta_barra, fim)
|
||||
esta_barra.inicio = esta_barra.statusbar:GetValue()
|
||||
esta_barra.fim = fim
|
||||
esta_barra.tem_animacao = 1
|
||||
esta_barra.tem_animacao = true
|
||||
|
||||
if (esta_barra.fim > esta_barra.inicio) then
|
||||
esta_barra:SetScript ("OnUpdate", self.FazerAnimacao_Direita)
|
||||
@@ -73,19 +115,19 @@
|
||||
end
|
||||
|
||||
function _detalhes:FazerAnimacao_Esquerda (elapsed)
|
||||
self.inicio = self.inicio - 0.8
|
||||
self.inicio = self.inicio - 1
|
||||
self.statusbar:SetValue (self.inicio)
|
||||
if (self.inicio-1 <= self.fim) then
|
||||
self.tem_animacao = 0
|
||||
self.tem_animacao = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:FazerAnimacao_Direita (elapsed)
|
||||
self.inicio = self.inicio + 0.8
|
||||
self.inicio = self.inicio + 1
|
||||
self.statusbar:SetValue (self.inicio)
|
||||
if (self.inicio+1 >= self.fim) then
|
||||
self.tem_animacao = 0
|
||||
self.tem_animacao = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
@@ -244,6 +286,8 @@
|
||||
for i = 1, instancia.rows_created, 1 do --> limpa a referência do que estava sendo mostrado na barra
|
||||
local esta_barra= instancia.barras[i]
|
||||
esta_barra.minha_tabela = nil
|
||||
esta_barra.animacao_fim = 0
|
||||
esta_barra.animacao_fim2 = 0
|
||||
end
|
||||
|
||||
if (instancia.rolagem) then
|
||||
@@ -316,7 +360,7 @@
|
||||
--> verifica se precisa criar mais barras
|
||||
if (self.rows_fit_in_window > #self.barras) then--> verifica se precisa criar mais barras
|
||||
for i = #self.barras+1, self.rows_fit_in_window, 1 do
|
||||
gump:CriaNovaBarra (self, i, 30) --> cria nova barra
|
||||
gump:CriaNovaBarra (self, i) --> cria nova barra
|
||||
end
|
||||
self.rows_created = #self.barras
|
||||
end
|
||||
|
||||
@@ -128,6 +128,17 @@ function _detalhes:LoadGlobalAndCharacterData()
|
||||
else
|
||||
_detalhes_global [key] = value
|
||||
end
|
||||
|
||||
elseif (type (_detalhes_global [key]) == "table") then
|
||||
for key2, value2 in pairs (_detalhes.default_global_data [key]) do
|
||||
if (_detalhes_global [key] [key2] == nil) then
|
||||
if (type (value2) == "table") then
|
||||
_detalhes_global [key] [key2] = table_deepcopy (_detalhes.default_global_data [key] [key2])
|
||||
else
|
||||
_detalhes_global [key] [key2] = value2
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> copy the key from saved table to details object
|
||||
|
||||
@@ -648,7 +648,14 @@ local default_global_data = {
|
||||
savedStyles = {},
|
||||
savedCustomSpells = {},
|
||||
savedTimeCaptures = {},
|
||||
tutorial = {logons = 0, unlock_button = 0, version_announce = 0, main_help_button = 0, alert_frames = {false, false, false, false, false, false}, },
|
||||
tutorial = {
|
||||
logons = 0,
|
||||
unlock_button = 0,
|
||||
version_announce = 0,
|
||||
main_help_button = 0,
|
||||
alert_frames = {false, false, false, false, false, false},
|
||||
bookmark_tutorial = false,
|
||||
},
|
||||
performance_profiles = {
|
||||
["RaidFinder"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
["Raid15"] = {enabled = false, update_speed = 1, use_row_animations = false, damage = true, heal = true, aura = true, energy = false, miscdata = true},
|
||||
|
||||
@@ -981,7 +981,8 @@ do
|
||||
[115203] = {180, 20}, -- Fortifying Brew
|
||||
|
||||
--["PALADIN"] = {},
|
||||
[633] = {600, 0, 0}, --Lay on Hands
|
||||
[633] = {600, 0, 0}, --Lay on Hands
|
||||
[31821] = {180, 6, 0},-- Devotion Aura
|
||||
|
||||
--["PRIEST"] = {},
|
||||
[62618] = {180, 10, 0}, --Power Word: Barrier
|
||||
|
||||
+109
-31
@@ -53,7 +53,11 @@ function _detalhes:SetOptionsWindowTexture (texture)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:OpenOptionsWindow (instance)
|
||||
function _detalhes:OpenOptionsWindow (instance, no_reopen)
|
||||
|
||||
if (not instance.meu_id) then
|
||||
instance, no_reopen = unpack (instance)
|
||||
end
|
||||
|
||||
GameCooltip:Close()
|
||||
local window = _G.DetailsOptionsWindow
|
||||
@@ -64,6 +68,10 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
_G.DetailsOptionsWindow.instance = instance
|
||||
end
|
||||
|
||||
if (not no_reopen and not instance:IsEnabled() or not instance:IsStarted()) then
|
||||
_detalhes.CriarInstancia (_, _, instance:GetId())
|
||||
end
|
||||
|
||||
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow.full_created) then
|
||||
return _G.DetailsOptionsWindow.MyObject:update_all (instance)
|
||||
end
|
||||
@@ -88,13 +96,12 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
window.backdrop = nil
|
||||
_G.DetailsOptionsWindow.instance = instance
|
||||
|
||||
window.creating = true
|
||||
|
||||
window:SetHook ("OnHide", function()
|
||||
DetailsDisable3D:Hide()
|
||||
DetailsOptionsWindowDisable3D:SetChecked (false)
|
||||
window.Disable3DColorPick:Hide()
|
||||
window.Disable3DColorPick:Cancel()
|
||||
GameCooltip:Hide()
|
||||
end)
|
||||
|
||||
--x 9 897 y 9 592
|
||||
@@ -185,12 +192,8 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
|
||||
local this_instance = _detalhes.tabela_instancias [instance]
|
||||
|
||||
if (not this_instance.iniciada) then
|
||||
this_instance:RestauraJanela (_G.DetailsOptionsWindow.instance)
|
||||
|
||||
elseif (not this_instance:IsEnabled()) then
|
||||
if (not this_instance:IsEnabled() or not this_instance:IsStarted()) then
|
||||
_detalhes.CriarInstancia (_, _, this_instance.meu_id)
|
||||
|
||||
end
|
||||
|
||||
_detalhes:OpenOptionsWindow (this_instance)
|
||||
@@ -848,7 +851,11 @@ local menus = { --labels nos menus
|
||||
self = self.background_frame
|
||||
end
|
||||
|
||||
self.label:SetTextColor (1, .8, 0)
|
||||
if (self.is_button) then
|
||||
self.label:SetTextColor ("white")
|
||||
else
|
||||
self.label:SetTextColor (1, .8, 0)
|
||||
end
|
||||
|
||||
if (self.have_icon) then
|
||||
self.have_icon:SetBlendMode ("ADD")
|
||||
@@ -881,13 +888,18 @@ local menus = { --labels nos menus
|
||||
|
||||
GameCooltip:Hide()
|
||||
|
||||
self.label:SetTextColor (1, 1, 1)
|
||||
if (self.is_button) then
|
||||
self.label:SetTextColor ({1, 0.8, 0})
|
||||
else
|
||||
self.label:SetTextColor (1, 1, 1)
|
||||
end
|
||||
end
|
||||
|
||||
function window:create_line_background2 (frameX, label, parent, icon)
|
||||
function window:create_line_background2 (frameX, label, parent, icon, is_button)
|
||||
local f = CreateFrame ("frame", nil, frameX)
|
||||
f:SetPoint ("left", label.widget or label, "left", -2, 0)
|
||||
f:SetSize (260, 16)
|
||||
f.is_button = is_button
|
||||
f:SetScript ("OnEnter", background_on_enter2)
|
||||
f:SetScript ("OnLeave", background_on_leave2)
|
||||
f:SetScript ("OnMouseDown", background_on_mouse_down)
|
||||
@@ -915,7 +927,7 @@ local menus = { --labels nos menus
|
||||
return f
|
||||
end
|
||||
|
||||
function window:CreateLineBackground2 (frame, widget_name, label_name, desc_loc, icon)
|
||||
function window:CreateLineBackground2 (frame, widget_name, label_name, desc_loc, icon, is_button)
|
||||
|
||||
if (type (widget_name) == "table") then
|
||||
widget_name.info = desc_loc
|
||||
@@ -935,9 +947,11 @@ local menus = { --labels nos menus
|
||||
frame [widget_name].info = desc_loc
|
||||
frame [widget_name].have_tooltip = desc_loc
|
||||
frame [widget_name].have_icon = icon
|
||||
local f = window:create_line_background2 (frame, frame [label_name], frame [widget_name], icon)
|
||||
local f = window:create_line_background2 (frame, frame [label_name], frame [widget_name], icon, is_button)
|
||||
frame [widget_name]:SetHook ("OnEnter", background_on_enter2)
|
||||
frame [widget_name]:SetHook ("OnLeave", background_on_leave2)
|
||||
f.is_button = is_button
|
||||
frame [widget_name].is_button = is_button
|
||||
return f
|
||||
end
|
||||
|
||||
@@ -2932,7 +2946,7 @@ function window:CreateFrame1()
|
||||
_G.AvatarPickFrame:Show()
|
||||
end
|
||||
|
||||
g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", frame1.nicknameLabel:GetStringWidth() + SLIDER_WIDTH + 2, 14, openAtavarPickFrame, nil, nil, nil, Loc ["STRING_OPTIONS_AVATAR"])
|
||||
g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", frame1.nicknameLabel:GetStringWidth() + SLIDER_WIDTH + 2, 18, openAtavarPickFrame, nil, nil, nil, Loc ["STRING_OPTIONS_AVATAR"])
|
||||
frame1.chooseAvatarButton:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (frame1, "chooseAvatarButton", "chooseAvatarButton", Loc ["STRING_OPTIONS_AVATAR_DESC"])
|
||||
@@ -3120,10 +3134,34 @@ function window:CreateFrame1()
|
||||
|
||||
window:CreateLineBackground2 (frame1, "updatespeedSlider", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"])
|
||||
|
||||
--> window controls
|
||||
|
||||
--lock unlock
|
||||
g:NewButton (frame1, _, "$parentLockButton", "LockButton", 160, 18, _detalhes.lock_instance_function, nil, nil, nil, Loc ["STRING_OPTIONS_WC_LOCK"])
|
||||
frame1.LockButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "LockButton", "LockButton", Loc ["STRING_OPTIONS_WC_LOCK_DESC"], nil, true)
|
||||
|
||||
--break snap
|
||||
g:NewButton (frame1, _, "$parentBreakSnapButton", "BreakSnapButton", 160, 18, _G.DetailsOptionsWindow.instance.Desagrupar, -1, nil, nil, Loc ["STRING_OPTIONS_WC_UNSNAP"])
|
||||
frame1.BreakSnapButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "BreakSnapButton", "BreakSnapButton", Loc ["STRING_OPTIONS_WC_UNSNAP_DESC"], nil, true)
|
||||
|
||||
--close
|
||||
g:NewButton (frame1, _, "$parentCloseButton", "CloseButton", 160, 18, _detalhes.close_instancia_func, _G.DetailsOptionsWindow.instance, nil, nil, Loc ["STRING_OPTIONS_WC_CLOSE"])
|
||||
frame1.CloseButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "CloseButton", "CloseButton", Loc ["STRING_OPTIONS_WC_CLOSE_DESC"], nil, true)
|
||||
|
||||
--create
|
||||
g:NewButton (frame1, _, "$parentCreateWindowButton", "CreateWindowButton", 160, 18, function() _detalhes.CriarInstancia (nil, nil, true) end, nil, nil, nil, Loc ["STRING_OPTIONS_WC_CREATE"])
|
||||
frame1.CreateWindowButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "CreateWindowButton", "CreateWindowButton", Loc ["STRING_OPTIONS_WC_CREATE_DESC"], nil, true)
|
||||
|
||||
--> anchors
|
||||
|
||||
g:NewLabel (frame1, _, "$parentGeneralAnchor", "GeneralAnchorLabel", Loc ["STRING_OPTIONS_GENERAL_ANCHOR"], "GameFontNormal")
|
||||
g:NewLabel (frame1, _, "$parentIdentityAnchor", "GeneralIdentityLabel", Loc ["STRING_OPTIONS_AVATAR_ANCHOR"], "GameFontNormal")
|
||||
|
||||
g:NewLabel (frame1, _, "$parentWindowControlsAnchor", "WindowControlsLabel", Loc ["STRING_OPTIONS_WC_ANCHOR"], "GameFontNormal")
|
||||
|
||||
local w_start = 10
|
||||
|
||||
@@ -3152,6 +3190,11 @@ function window:CreateFrame1()
|
||||
{"maxInstancesLabel", 7},
|
||||
{"dpsAbbreviateLabel", 8},
|
||||
{"SegmentsLockedLabel", 5},
|
||||
{"WindowControlsLabel", 9, true},
|
||||
{"LockButton", 10},
|
||||
{"BreakSnapButton", 12},
|
||||
{"CloseButton", 11},
|
||||
{"CreateWindowButton", 13, true},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame1, left_side, window.left_start_at, window.top_start_at)
|
||||
@@ -6462,27 +6505,18 @@ end
|
||||
|
||||
function window:CreateFrame11()
|
||||
|
||||
local frame10 = window.options [10][1]
|
||||
local frame11 = window.options [11][1]
|
||||
|
||||
|
||||
window.creating = nil
|
||||
local label = g:NewLabel (frame11, _, "$parentMovedWarningLabel", "MovedWarningLabel", "This sectiong has been moved to Combat, under General Settings bracket.", "GameFontNormal")
|
||||
local image = g:NewImage (frame11, [[Interface\DialogFrame\UI-Dialog-Icon-AlertNew]])
|
||||
|
||||
label:SetPoint ("center", frame11, "center", 32, 0)
|
||||
image:SetPoint ("right", label, "left", -7, 0)
|
||||
|
||||
|
||||
end
|
||||
|
||||
--------------- Concatenate Trash
|
||||
--[[
|
||||
g:NewLabel (frame3, _, "$parentConcatenateTrash", "concatenateTrashLabel", "concatenate clean up segments")
|
||||
frame3.concatenateTrashLabel:SetPoint (10, -344)
|
||||
--
|
||||
g:NewSwitch (frame3, _, "$parentConcatenateTrashSlider", "concatenateTrashSlider", 60, 20, _, _, _detalhes.trash_concatenate)
|
||||
frame3.concatenateTrashSlider:SetPoint ("left", frame3.concatenateTrashLabel, "right")
|
||||
frame3.concatenateTrashSlider.OnSwitch = function (self, _, amount) --> slider, fixedValue, sliderValue
|
||||
_detalhes.trash_concatenate = amount
|
||||
end
|
||||
frame3.concatenateTrashSlider.tooltip = "Concatenate the next boss segments into only one."
|
||||
--]]
|
||||
|
||||
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- Advanced Plugins Config ~12
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@@ -6774,6 +6808,15 @@ local strata = {
|
||||
["DIALOG"] = "Dialog"
|
||||
}
|
||||
|
||||
function _detalhes:DelayUpdateWindowControls (editing_instance)
|
||||
_G.DetailsOptionsWindow1LockButton.MyObject:SetClickFunction (_detalhes.lock_instance_function, editing_instance.baseframe.lock_button)
|
||||
if (editing_instance.baseframe.isLocked) then
|
||||
_G.DetailsOptionsWindow1LockButton.MyObject:SetText (Loc ["STRING_OPTIONS_WC_UNLOCK"])
|
||||
else
|
||||
_G.DetailsOptionsWindow1LockButton.MyObject:SetText (Loc ["STRING_OPTIONS_WC_LOCK"])
|
||||
end
|
||||
end
|
||||
|
||||
function window:update_all (editing_instance)
|
||||
|
||||
--> window 1
|
||||
@@ -6788,6 +6831,37 @@ function window:update_all (editing_instance)
|
||||
_G.DetailsOptionsWindow1SliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed)
|
||||
_G.DetailsOptionsWindow1AnimateSlider.MyObject:SetValue (_detalhes.use_row_animations)
|
||||
|
||||
_G.DetailsOptionsWindow1WindowControlsAnchor:SetText (string.format (Loc ["STRING_OPTIONS_WC_ANCHOR"], editing_instance.meu_id))
|
||||
|
||||
if (not editing_instance.baseframe) then
|
||||
_detalhes:ScheduleTimer ("DelayUpdateWindowControls", 1, editing_instance)
|
||||
else
|
||||
_G.DetailsOptionsWindow1LockButton.MyObject:SetClickFunction (_detalhes.lock_instance_function, editing_instance.baseframe.lock_button)
|
||||
if (editing_instance.baseframe.isLocked) then
|
||||
_G.DetailsOptionsWindow1LockButton.MyObject:SetText (Loc ["STRING_OPTIONS_WC_UNLOCK"])
|
||||
else
|
||||
_G.DetailsOptionsWindow1LockButton.MyObject:SetText (Loc ["STRING_OPTIONS_WC_LOCK"])
|
||||
end
|
||||
end
|
||||
|
||||
_G.DetailsOptionsWindow1BreakSnapButton.MyObject:Disable()
|
||||
|
||||
for side, have_snap in pairs (editing_instance.snap) do
|
||||
if (have_snap) then
|
||||
_G.DetailsOptionsWindow1BreakSnapButton.MyObject:Enable()
|
||||
_G.DetailsOptionsWindow1BreakSnapButton.MyObject:SetClickFunction (editing_instance.Desagrupar, editing_instance, -1)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (editing_instance.ativa) then
|
||||
_G.DetailsOptionsWindow1CloseButton.MyObject:SetText (Loc ["STRING_OPTIONS_WC_CLOSE"])
|
||||
_G.DetailsOptionsWindow1CloseButton.MyObject:SetClickFunction (_detalhes.close_instancia_func, editing_instance.baseframe.cabecalho.fechar)
|
||||
else
|
||||
_G.DetailsOptionsWindow1CloseButton.MyObject:SetText (Loc ["STRING_OPTIONS_WC_REOPEN"])
|
||||
_G.DetailsOptionsWindow1CloseButton.MyObject:SetClickFunction (function() _detalhes:CriarInstancia (_, editing_instance.meu_id) end)
|
||||
end
|
||||
|
||||
--> window 2
|
||||
_G.DetailsOptionsWindow2FragsPvpSlider.MyObject:SetValue (_detalhes.only_pvp_frags)
|
||||
_G.DetailsOptionsWindow2TTDropdown.MyObject:Select (_detalhes.time_type)
|
||||
@@ -7285,6 +7359,10 @@ function window:update_all (editing_instance)
|
||||
if (editing_instance.meu_id > _detalhes.instances_amount) then
|
||||
else
|
||||
_G.DetailsOptionsWindowInstanceSelectDropdown.MyObject:Select (editing_instance.meu_id, true)
|
||||
GameCooltip:Reset()
|
||||
--_detalhes:CooltipPreset (1)
|
||||
GameCooltip:AddLine ("editing window:", editing_instance.meu_id)
|
||||
GameCooltip:ShowCooltip (_G.DetailsOptionsWindowInstanceSelectDropdown, "tooltip")
|
||||
end
|
||||
|
||||
_G.DetailsOptionsWindow4IconFileEntry:SetText (editing_instance.row_info.icon_file)
|
||||
|
||||
@@ -1259,6 +1259,12 @@ local lockFunctionOnLeave = function (self)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:DelayOptionsRefresh (instance, no_reopen)
|
||||
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
|
||||
_detalhes:ScheduleTimer ("OpenOptionsWindow", 0.1, {instance or _G.DetailsOptionsWindow.instance, no_reopen})
|
||||
end
|
||||
end
|
||||
|
||||
local lockFunctionOnClick = function (button)
|
||||
local baseframe = button:GetParent()
|
||||
if (baseframe.isLocked) then
|
||||
@@ -1280,6 +1286,9 @@ local lockFunctionOnClick = function (button)
|
||||
baseframe.resize_direita:SetAlpha (0)
|
||||
baseframe.resize_esquerda:SetAlpha (0)
|
||||
end
|
||||
|
||||
_detalhes:DelayOptionsRefresh()
|
||||
|
||||
end
|
||||
_detalhes.lock_instance_function = lockFunctionOnClick
|
||||
|
||||
@@ -2706,6 +2715,9 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
|
||||
esta_barra.row_id = index
|
||||
esta_barra.instance_id = instancia.meu_id
|
||||
esta_barra.animacao_fim = 0
|
||||
esta_barra.animacao_fim2 = 0
|
||||
|
||||
local y = instancia.row_height*(index-1)
|
||||
|
||||
if (instancia.bars_grow_direction == 1) then
|
||||
@@ -2745,7 +2757,7 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
esta_barra.statusbar:SetStatusBarTexture (esta_barra.textura)
|
||||
|
||||
esta_barra.statusbar:SetMinMaxValues (0, 100)
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
esta_barra.statusbar:SetValue (0)
|
||||
|
||||
local icone_classe = esta_barra.statusbar:CreateTexture (nil, "overlay")
|
||||
icone_classe:SetHeight (instancia.row_info.height)
|
||||
@@ -2781,7 +2793,6 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
|
||||
--> seta o texto da esqueda
|
||||
esta_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"])
|
||||
esta_barra.statusbar:SetValue (100)
|
||||
|
||||
instancia:InstanceRefreshRows()
|
||||
|
||||
@@ -5639,6 +5650,7 @@ end
|
||||
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
_detalhes.close_instancia_func = close_button_onclick
|
||||
|
||||
local close_button_onenter = function (self)
|
||||
OnEnterMainWindow (self.instance, self, 3)
|
||||
|
||||
@@ -140,11 +140,11 @@ function _detalhes:OpenWelcomeWindow ()
|
||||
|
||||
if (elapsed < 0.295) then
|
||||
_detalhes.use_row_animations = true
|
||||
_detalhes.update_speed = 0.2
|
||||
_detalhes.update_speed = 0.30
|
||||
|
||||
elseif (elapsed < 0.375) then
|
||||
_detalhes.use_row_animations = true
|
||||
_detalhes.update_speed = 0.3
|
||||
_detalhes.update_speed = 0.40
|
||||
|
||||
elseif (elapsed < 0.475) then
|
||||
_detalhes.use_row_animations = true
|
||||
|
||||
+112
-9
@@ -23,13 +23,50 @@ do
|
||||
frame:SetPoint ("center", _UIParent, "center", 500, -300)
|
||||
frame:SetWidth (250)
|
||||
frame:SetHeight (100)
|
||||
frame:SetBackdrop (gump_fundo_backdrop)
|
||||
--frame:SetBackdrop (gump_fundo_backdrop)
|
||||
frame:SetBackdropBorderColor (170/255, 170/255, 170/255)
|
||||
frame:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
|
||||
frame:SetFrameStrata ("FULLSCREEN")
|
||||
frame:SetFrameLevel (16)
|
||||
|
||||
frame.background = frame:CreateTexture (nil, "background")
|
||||
frame.background:SetTexture ([[Interface\Store\Store-Splash]])
|
||||
frame.background:SetTexCoord (16/1024, 561/1024, 8/1024, 263/1024)
|
||||
frame.background:SetAllPoints()
|
||||
frame.background:SetDesaturated (true)
|
||||
frame.background:SetVertexColor (.5, .5, .5, .85)
|
||||
|
||||
frame.topbg = frame:CreateTexture (nil, "background")
|
||||
frame.topbg:SetTexture ([[Interface\Scenarios\ScenariosParts]])
|
||||
frame.topbg:SetTexCoord (100/512, 267/512, 143/512, 202/512)
|
||||
frame.topbg:SetPoint ("bottomleft", frame, "topleft")
|
||||
frame.topbg:SetPoint ("bottomright", frame, "topright")
|
||||
frame.topbg:SetHeight (20)
|
||||
frame.topbg:SetDesaturated (true)
|
||||
frame.topbg:SetVertexColor (.3, .3, .3, 0.8)
|
||||
|
||||
frame.topbg_frame = CreateFrame ("frame", nil, frame)
|
||||
frame.topbg_frame:SetPoint ("bottomleft", frame, "topleft")
|
||||
frame.topbg_frame:SetPoint ("bottomright", frame, "topright")
|
||||
frame.topbg_frame:SetHeight (20)
|
||||
frame.topbg_frame:EnableMouse (true)
|
||||
frame.topbg_frame:SetScript ("OnMouseDown", function (self, button)
|
||||
if (button == "RightButton") then
|
||||
_detalhes.switch:CloseMe()
|
||||
end
|
||||
end)
|
||||
|
||||
frame.star = frame:CreateTexture (nil, "overlay")
|
||||
frame.star:SetTexture ([[Interface\Glues\CharacterSelect\Glues-AddOn-Icons]])
|
||||
frame.star:SetTexCoord (0.75, 1, 0, 1)
|
||||
frame.star:SetSize (16, 16)
|
||||
frame.star:SetPoint ("bottomleft", frame, "topleft", 4, 0)
|
||||
|
||||
frame.title_label = frame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
frame.title_label:SetPoint ("left", frame.star, "right", 4, -1)
|
||||
frame.title_label:SetText ("Bookmark")
|
||||
|
||||
function _detalhes.switch:CloseMe()
|
||||
_detalhes.switch.frame:Hide()
|
||||
GameCooltip:Hide()
|
||||
@@ -69,12 +106,12 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
_detalhes.switch.current_instancia = instancia
|
||||
|
||||
--_detalhes.switch.frame:SetFrameLevel (instancia.baseframe:GetFrameLevel() + 5)
|
||||
_detalhes.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 0)
|
||||
_detalhes.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 0)
|
||||
_detalhes.switch.frame:SetPoint ("topleft", instancia.baseframe, "topleft", 0, 1)
|
||||
_detalhes.switch.frame:SetPoint ("bottomright", instancia.baseframe, "bottomright", 0, 1)
|
||||
|
||||
_detalhes.switch.frame:SetBackdropColor (0.094, 0.094, 0.094, .8)
|
||||
local _r, _g, _b, _a = _detalhes.switch.frame:GetBackdropColor()
|
||||
gump:GradientEffect (_detalhes.switch.frame, "frame", _r, _g, _b, _a, _r, _g, _b, 1, 1)
|
||||
--local _r, _g, _b, _a = _detalhes.switch.frame:GetBackdropColor()
|
||||
--gump:GradientEffect (_detalhes.switch.frame, "frame", _r, _g, _b, _a, _r, _g, _b, 1, 1)
|
||||
|
||||
local altura = instancia.baseframe:GetHeight()
|
||||
local mostrar_quantas = _math_floor (altura / _detalhes.switch.button_height) * 2
|
||||
@@ -97,9 +134,52 @@ function _detalhes.switch:ShowMe (instancia)
|
||||
end
|
||||
|
||||
_detalhes.switch:Resize()
|
||||
|
||||
_detalhes.switch.frame:Show()
|
||||
instancia:StatusBarAlert (right_click_text, right_click_texture) --icon, color, time
|
||||
|
||||
if (not _detalhes.tutorial.bookmark_tutorial) then
|
||||
|
||||
if (not SwitchPanelTutorial) then
|
||||
local tutorial_frame = CreateFrame ("frame", "SwitchPanelTutorial", _detalhes.switch.frame)
|
||||
tutorial_frame:SetFrameStrata ("FULLSCREEN_DIALOG")
|
||||
tutorial_frame:SetAllPoints()
|
||||
tutorial_frame:EnableMouse (true)
|
||||
tutorial_frame:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16 })
|
||||
tutorial_frame:SetBackdropColor (0.05, 0.05, 0.05, 0.9)
|
||||
|
||||
tutorial_frame.info_label = tutorial_frame:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
tutorial_frame.info_label:SetPoint ("topleft", tutorial_frame, "topleft", 10, -10)
|
||||
tutorial_frame.info_label:SetText ("Bookmarks gives quick access to favorite displays.")
|
||||
tutorial_frame.info_label:SetJustifyH ("left")
|
||||
|
||||
tutorial_frame.mouse = tutorial_frame:CreateTexture (nil, "overlay")
|
||||
tutorial_frame.mouse:SetTexture ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]])
|
||||
tutorial_frame.mouse:SetTexCoord (0.0019531, 0.1484375, 0.6269531, 0.8222656)
|
||||
tutorial_frame.mouse:SetSize (20, 22)
|
||||
tutorial_frame.mouse:SetPoint ("topleft", tutorial_frame.info_label, "bottomleft", 0, -20)
|
||||
|
||||
tutorial_frame.close_label = tutorial_frame:CreateFontString (nil, "overlay", "GameFontHighlightSmall")
|
||||
tutorial_frame.close_label:SetPoint ("left", tutorial_frame.mouse, "right", 4, 0)
|
||||
tutorial_frame.close_label:SetText ("Use right click to close the bookmark panel.")
|
||||
tutorial_frame.close_label:SetJustifyH ("left")
|
||||
|
||||
local checkbox = CreateFrame ("CheckButton", "SwitchPanelTutorialCheckBox", tutorial_frame, "ChatConfigCheckButtonTemplate")
|
||||
checkbox:SetPoint ("topleft", tutorial_frame.mouse, "bottomleft", 0, -10)
|
||||
_G [checkbox:GetName().."Text"]:SetText ("Don't show this again.")
|
||||
|
||||
tutorial_frame:SetScript ("OnMouseDown", function()
|
||||
if (checkbox:GetChecked()) then
|
||||
_detalhes.tutorial.bookmark_tutorial = true
|
||||
end
|
||||
tutorial_frame:Hide()
|
||||
end)
|
||||
end
|
||||
|
||||
SwitchPanelTutorial:Show()
|
||||
SwitchPanelTutorial.info_label:SetWidth (_detalhes.switch.frame:GetWidth()-30)
|
||||
SwitchPanelTutorial.close_label:SetWidth (_detalhes.switch.frame:GetWidth()-30)
|
||||
end
|
||||
|
||||
--instancia:StatusBarAlert (right_click_text, right_click_texture) --icon, color, time
|
||||
end
|
||||
|
||||
function _detalhes.switch:Config (_,_, atributo, sub_atributo)
|
||||
@@ -281,12 +361,33 @@ function _detalhes.switch:Resize()
|
||||
end
|
||||
|
||||
local onenter = function (self)
|
||||
if (not _detalhes.switch.table [self.index].atributo) then
|
||||
GameCooltip:Reset()
|
||||
_detalhes:CooltipPreset (1)
|
||||
GameCooltip:AddLine ("add bookmark")
|
||||
GameCooltip:AddIcon ([[Interface\Glues\CharacterSelect\Glues-AddOn-Icons]], 1, 1, 16, 16, 0.75, 1, 0, 1, {0, 1, 0})
|
||||
|
||||
GameCooltip:SetOwner (self)
|
||||
GameCooltip:SetType ("tooltip")
|
||||
|
||||
GameCooltip:SetOption ("TextSize", 10)
|
||||
GameCooltip:SetOption ("ButtonsYMod", 0)
|
||||
GameCooltip:SetOption ("YSpacingMod", 0)
|
||||
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
|
||||
|
||||
GameCooltip:Show()
|
||||
else
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
|
||||
self.texto:SetTextColor (1, 1, 1, 1)
|
||||
self.border:SetBlendMode ("ADD")
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
|
||||
local onleave = function (self)
|
||||
if (GameCooltip:IsTooltip()) then
|
||||
GameCooltip:Hide()
|
||||
end
|
||||
self.texto:SetTextColor (.8, .8, .8, 1)
|
||||
self.border:SetBlendMode ("BLEND")
|
||||
end
|
||||
@@ -299,7 +400,7 @@ local oniconenter = function (self)
|
||||
|
||||
GameCooltip:Reset()
|
||||
_detalhes:CooltipPreset (1)
|
||||
GameCooltip:AddLine ("select attribute")
|
||||
GameCooltip:AddLine ("select bookmark")
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 14, 0.0019531, 0.1484375, 0.6269531, 0.8222656)
|
||||
|
||||
GameCooltip:SetOwner (self)
|
||||
@@ -397,6 +498,8 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton)
|
||||
button2.MouseOnLeaveHook = onleave
|
||||
|
||||
_detalhes.switch.buttons [index] = button
|
||||
button.index = index
|
||||
button2.index = index
|
||||
|
||||
return button
|
||||
end
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+26
-1
@@ -497,11 +497,36 @@ function _G._detalhes:Start()
|
||||
if (instance.auto_switch_to_old) then
|
||||
instance:SwitchBack()
|
||||
end
|
||||
|
||||
|
||||
function _detalhes:FadeStartVersion()
|
||||
_detalhes.gump:Fade (dev_icon, "in", 2)
|
||||
_detalhes.gump:Fade (dev_text, "in", 2)
|
||||
self.gump:Fade (instance._version, "in", 2)
|
||||
|
||||
if (_detalhes.switch.table) then
|
||||
|
||||
local have_bookmark
|
||||
|
||||
for index, t in ipairs (_detalhes.switch.table) do
|
||||
if (t.atributo) then
|
||||
have_bookmark = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (not have_bookmark) then
|
||||
function _detalhes:WarningAddBookmark()
|
||||
instance._version:SetText ("right click to set bookmarks.")
|
||||
self.gump:Fade (instance._version, "out", 1)
|
||||
function _detalhes:FadeBookmarkWarning()
|
||||
self.gump:Fade (instance._version, "in", 2)
|
||||
end
|
||||
_detalhes:ScheduleTimer ("FadeBookmarkWarning", 5)
|
||||
end
|
||||
_detalhes:ScheduleTimer ("WarningAddBookmark", 2)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
_detalhes:ScheduleTimer ("FadeStartVersion", 12)
|
||||
|
||||
Reference in New Issue
Block a user