- New API: _detalhes:Msg (text) print a text to chat.
- Fixed a issue with default wallpaper which isn't on Fill align. - Mode selection now are in a new order. - Added a instruction to click to report a death. - Added a 2 second delay before all raid equilize. - Capture dont try any more to get from cloud if the capture is actived. - Fixed a issue with statusbar color selection were it was changing instance color. - Added GameCooltip:SetTitle (1 or 2, text)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> global name declaration
|
||||
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0")
|
||||
_detalhes.userversion = "v1.1.3"
|
||||
_detalhes.version = "Alpha 002"
|
||||
_detalhes.realversion = 2
|
||||
|
||||
@@ -205,4 +206,9 @@ do
|
||||
_detalhes.delaymsgs = {}
|
||||
end
|
||||
|
||||
--> print messages
|
||||
function _detalhes:Msg (_string)
|
||||
print (Loc ["STRING_DETAILS1"] .. _string)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -702,7 +702,7 @@ end
|
||||
nova_instancia.wallpaper = {
|
||||
enabled = false,
|
||||
texture = nil,
|
||||
anchor = "bottomright",
|
||||
anchor = "all",
|
||||
alpha = 0.5,
|
||||
texcoord = {0, 1, 0, 1},
|
||||
width = 0,
|
||||
@@ -800,7 +800,7 @@ function _detalhes:RestauraJanela (index, temp)
|
||||
self.wallpaper = self.wallpaper or {
|
||||
enabled = false,
|
||||
texture = nil,
|
||||
anchor = "bottomright",
|
||||
anchor = "all",
|
||||
alpha = 0.5,
|
||||
texcoord = {0, 1, 0, 1},
|
||||
width = 0,
|
||||
@@ -1454,7 +1454,18 @@ function _detalhes:AlteraModo (instancia, qual)
|
||||
_detalhes:SendEvent ("DETAILS_INSTANCE_CHANGEMODE", nil, instancia, modo_all)
|
||||
end
|
||||
|
||||
_detalhes.popup:Select (1, qual)
|
||||
local checked
|
||||
if (instancia.modo == 1) then
|
||||
checked = 3
|
||||
elseif (instancia.modo == 2) then
|
||||
checked = 1
|
||||
elseif (instancia.modo == 3) then
|
||||
checked = 2
|
||||
elseif (instancia.modo == 4) then
|
||||
checked = 4
|
||||
end
|
||||
|
||||
_detalhes.popup:Select (1, checked)
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -155,6 +155,10 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra)
|
||||
end
|
||||
end
|
||||
|
||||
GameCooltip:AddLine (" ", " ", 1, "white", "white")
|
||||
GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], "--", 1, "white", "white")
|
||||
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625)
|
||||
|
||||
if (battleress) then
|
||||
--_table_insert (linhas, 2, {{"Interface\\AddOns\\Details\\images\\small_icons", .75, 1, 0, 1}, morte [6] .. " Morreu", "-- -- -- ", 100, {75/255, 75/255, 75/255, 1}, {noglow = true}}) --> localize-me
|
||||
GameCooltip:AddSpecial ("line", 2, nil, morte [6] .. " Morreu", "-- -- -- ", 1, "white")
|
||||
@@ -185,9 +189,8 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
local barra = instancia.barras [morte.minha_barra]
|
||||
|
||||
local reportar = {"Detalhes da morte de " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
|
||||
for i = 1, _detalhes.popup.NumLines, 1 do
|
||||
local texto_left = _detalhes.popup.frame1.linhas[i].left_text:GetText()
|
||||
local texto_right = _detalhes.popup.frame1.linhas[i].right_text:GetText()
|
||||
for i = 1, GameCooltip:GetNumLines() do
|
||||
local texto_left, texto_right = GameCooltip:GetText (i)
|
||||
|
||||
if (texto_left and texto_right) then
|
||||
texto_left = texto_left:gsub (("|T(.*)|t "), "")
|
||||
|
||||
+7
-3
@@ -232,7 +232,7 @@
|
||||
end
|
||||
_detalhes.tabela_vigente.enemy = inimigo
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:EqualizeActors()
|
||||
_detalhes:EqualizeActorsSchedule()
|
||||
end
|
||||
else
|
||||
|
||||
@@ -252,10 +252,10 @@
|
||||
end
|
||||
end
|
||||
|
||||
_detalhes:EqualizeActors()
|
||||
_detalhes:EqualizeActorsSchedule()
|
||||
else
|
||||
if (_detalhes.debug) then
|
||||
_detalhes:EqualizeActors()
|
||||
_detalhes:EqualizeActorsSchedule()
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -413,6 +413,10 @@
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:EqualizeActorsSchedule()
|
||||
_detalhes:ScheduleTimer ("EqualizeActors", 2)
|
||||
end
|
||||
|
||||
function _detalhes:EqualizeActors()
|
||||
|
||||
local damage, heal, energy, misc = _detalhes:GetAllActors ("current", UnitName ("player"))
|
||||
|
||||
+44
-11
@@ -12,26 +12,45 @@
|
||||
--> local pointers
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> api
|
||||
|
||||
function _detalhes:CheckDetailsUsers()
|
||||
|
||||
if (true) then --> disabled
|
||||
return
|
||||
end
|
||||
|
||||
if (IsInRaid()) then
|
||||
for i = 1, GetNumGroupMembers() do
|
||||
if (_detalhes.details_users [ UnitName ("raid"..i)]) then
|
||||
end
|
||||
end
|
||||
elseif (IsInGroup()) then
|
||||
for i = 1, GetNumGroupMembers()-1 do
|
||||
if (_detalhes.details_users [ UnitName ("party"..i)]) then
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local temp = {}
|
||||
|
||||
function _detalhes:RaidComm (_, data, _, source)
|
||||
local type = select (2, _detalhes:Deserialize (data))
|
||||
|
||||
local type, player, realm, dversion, arg6 = select (2, _detalhes:Deserialize (data))
|
||||
|
||||
if (_detalhes.debug) then
|
||||
print ("comm received", type)
|
||||
end
|
||||
|
||||
if (type == "highfive") then
|
||||
local player, realm, dversion = select (3, _detalhes:Deserialize (data))
|
||||
if (player ~= _detalhes.playername) then
|
||||
_detalhes.details_users [#_detalhes.details_users+1] = {player, realm, dversion}
|
||||
if (player ~= _detalhes.playername and not _detalhes.details_users [player]) then
|
||||
_detalhes.details_users [player] = {player, realm, dversion}
|
||||
end
|
||||
|
||||
elseif (type == "clouddatareceived") then
|
||||
|
||||
local atributo, atributo_name, data = select (3, _detalhes:Deserialize (data))
|
||||
--local atributo, atributo_name, data = select (3, _detalhes:Deserialize (data))
|
||||
local atributo, atributo_name, data = player, realm, dversion
|
||||
|
||||
local container = _detalhes.tabela_vigente [atributo]
|
||||
|
||||
@@ -77,7 +96,7 @@
|
||||
return
|
||||
end
|
||||
|
||||
local atributo, subatributo = select (3, _detalhes:Deserialize (data))
|
||||
local atributo, subatributo = player, realm
|
||||
|
||||
local data
|
||||
local atributo_name = _detalhes:GetInternalSubAttributeName (atributo, subatributo)
|
||||
@@ -118,7 +137,6 @@
|
||||
return
|
||||
end
|
||||
|
||||
local player, realm, dversion = select (3, _detalhes:Deserialize (data))
|
||||
if (realm ~= GetRealmName()) then
|
||||
player = player .."-"..realm
|
||||
end
|
||||
@@ -131,7 +149,7 @@
|
||||
_detalhes.cloud_process = _detalhes:ScheduleRepeatingTimer ("RequestData", 7)
|
||||
|
||||
elseif (type == "needcloud") then
|
||||
local player, realm, dversion = select (3, _detalhes:Deserialize (data))
|
||||
|
||||
if (_detalhes.debug) then
|
||||
print (player, _detalhes.host_of, _detalhes:CaptureIsAllEnabled(), dversion == _detalhes.realversion)
|
||||
end
|
||||
@@ -148,7 +166,7 @@
|
||||
|
||||
if (not _detalhes.in_combat) then
|
||||
|
||||
local player, realm, dversion, receivedActor = select (3, _detalhes:Deserialize (data))
|
||||
local receivedActor = arg6
|
||||
|
||||
if (dversion ~= _detalhes.realversion) then
|
||||
return
|
||||
@@ -166,6 +184,9 @@
|
||||
end
|
||||
|
||||
function _detalhes:SendHighFive()
|
||||
if (true) then --> disabled
|
||||
return
|
||||
end
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("highfive", UnitName ("player"), GetRealmName(), _detalhes.realversion), "RAID")
|
||||
end
|
||||
|
||||
@@ -185,8 +206,20 @@
|
||||
for index = 1, #_detalhes.tabela_instancias do
|
||||
local instancia = _detalhes.tabela_instancias [index]
|
||||
if (instancia.ativa) then
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", instancia.atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
||||
local atributo = instancia.atributo
|
||||
if (atributo == 1 and not _detalhes:CaptureGet ("damage")) then
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
||||
break
|
||||
elseif (atributo == 2 and (not _detalhes:CaptureGet ("heal") or _detalhes:CaptureGet ("aura"))) then
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
||||
break
|
||||
elseif (atributo == 3 and not _detalhes:CaptureGet ("energy")) then
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
||||
break
|
||||
elseif (atributo == 4 and not _detalhes:CaptureGet ("miscdata")) then
|
||||
_detalhes:SendCommMessage ("details_comm", _detalhes:Serialize ("clouddatarequest", atributo, instancia.sub_atributo), "WHISPER", _detalhes.host_by)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1884,6 +1884,8 @@
|
||||
_detalhes.in_group = IsInGroup() or IsInRaid()
|
||||
if (not _detalhes.in_group) then
|
||||
table.wipe (_detalhes.details_users)
|
||||
else
|
||||
_detalhes:CheckDetailsUsers()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -775,7 +775,7 @@ end
|
||||
|
||||
---------> default options panel ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local window = _detalhes.gump:NewPanel (UIParent, nil, "DetailsStatusBarOptions", nil, 300, 160)
|
||||
local window = _detalhes.gump:NewPanel (UIParent, nil, "DetailsStatusBarOptions", nil, 300, 180)
|
||||
tinsert (UISpecialFrames, "DetailsStatusBarOptions")
|
||||
window:SetPoint ("center", UIParent, "center")
|
||||
window.locked = false
|
||||
@@ -783,7 +783,7 @@ window.close_with_right = true
|
||||
window.child = nil
|
||||
window.instance = nil
|
||||
|
||||
local extraWindow = _detalhes.gump:NewPanel (window, nil, "DetailsStatusBarOptions2", "extra", 300, 160)
|
||||
local extraWindow = _detalhes.gump:NewPanel (window, nil, "DetailsStatusBarOptions2", "extra", 300, 180)
|
||||
extraWindow:SetPoint ("left", window, "right")
|
||||
extraWindow.close_with_right = true
|
||||
extraWindow.locked = false
|
||||
@@ -821,11 +821,12 @@ end)
|
||||
_detalhes.StatusBar:ApplyOptions (window.child, "textcolor", {r, g, b, a})
|
||||
end
|
||||
local colorpick = function()
|
||||
ColorPickerFrame:SetColorRGB (unpack (window.child.options.textColor))
|
||||
ColorPickerFrame.hasOpacity = false
|
||||
ColorPickerFrame.previousValues = window.child.options.textColor
|
||||
ColorPickerFrame.func = selectedColor
|
||||
ColorPickerFrame.cancelFunc = canceledColor
|
||||
ColorPickerFrame.hasOpacity = false
|
||||
ColorPickerFrame.previousValues = window.child.options.textColor
|
||||
ColorPickerFrame:SetParent (window.widget)
|
||||
ColorPickerFrame:SetColorRGB (unpack (window.child.options.textColor))
|
||||
ColorPickerFrame:Show()
|
||||
end
|
||||
|
||||
@@ -917,6 +918,10 @@ end)
|
||||
_detalhes.StatusBar:ApplyOptions (child, "textymod", amount)
|
||||
end)
|
||||
|
||||
--> right click to close
|
||||
local c = window:CreateRightClickLabel ("short")
|
||||
c:SetPoint ("bottomleft", window, "bottomleft", 8, 5)
|
||||
|
||||
--> open options
|
||||
function _detalhes.StatusBar:OpenOptionsForChild (child)
|
||||
|
||||
|
||||
+58
-9
@@ -155,20 +155,36 @@ function DetailsCreateCoolTip()
|
||||
--> Title Function
|
||||
----------------------------------------------------------------------
|
||||
|
||||
function CoolTip:SetTitle (_f, text)
|
||||
if (_f == 1) then
|
||||
CoolTip.title1 = true
|
||||
CoolTip.title_text = text
|
||||
end
|
||||
end
|
||||
|
||||
function CoolTip:SetTitleAnchor (_f, _anchor, ...)
|
||||
_anchor = string.lower (_anchor)
|
||||
if (_f == 1) then
|
||||
self.frame1.titleIcon:ClearAllPoints()
|
||||
self.frame1.titleText:ClearAllPoints()
|
||||
|
||||
if (_anchor == "left") then
|
||||
self.frame1.titleIcon:SetPoint ("left", frame1, "left", ...)
|
||||
self.frame1.titleText:SetPoint ("left", frame1.titleIcon, "right")
|
||||
|
||||
elseif (_anchor == "center") then
|
||||
self.frame1.titleIcon:SetPoint ("center", frame1, "center", ...)
|
||||
self.frame1.titleIcon:SetPoint ("center", frame1, "center")
|
||||
self.frame1.titleIcon:SetPoint ("bottom", frame1, "top")
|
||||
self.frame1.titleText:SetPoint ("left", frame1.titleIcon, "right")
|
||||
self.frame1.titleText:SetText ("TESTE")
|
||||
|
||||
self.frame1.titleText:Show()
|
||||
self.frame1.titleIcon:Show()
|
||||
|
||||
elseif (_anchor == "right") then
|
||||
self.frame1.titleIcon:SetPoint ("right", frame1, "right", ...)
|
||||
self.frame1.titleText:SetPoint ("right", frame1.titleIcon, "left")
|
||||
|
||||
end
|
||||
elseif (_f == 2) then
|
||||
self.frame2.titleIcon:ClearAllPoints()
|
||||
@@ -318,7 +334,7 @@ function DetailsCreateCoolTip()
|
||||
|
||||
local OnEnterUpdateButton = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.3) then
|
||||
if (elapsedTime > 0.001) then
|
||||
--> search key: ~onenterupdatemain
|
||||
CoolTip:ShowSub (self.index)
|
||||
CoolTip.last_button = self.index
|
||||
@@ -390,7 +406,7 @@ function DetailsCreateCoolTip()
|
||||
|
||||
elapsedTime = 0
|
||||
frame1:SetScript ("OnUpdate", OnLeaveUpdateButton)
|
||||
CoolTip:HideSub (i)
|
||||
--CoolTip:HideSub (i)
|
||||
else
|
||||
CoolTip.active = false
|
||||
elapsedTime = 0
|
||||
@@ -582,6 +598,7 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
--> string length
|
||||
if (not isSub) then --> main frame
|
||||
if (not CoolTip.OptionsTable.FixedWidth) then
|
||||
if (CoolTip.Type == 1 or CoolTip.Type == 2) then
|
||||
local stringWidth = menuButton.leftText:GetStringWidth() + menuButton.rightText:GetStringWidth() + menuButton.leftIcon:GetWidth() + menuButton.rightIcon:GetWidth()
|
||||
@@ -590,7 +607,17 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
end
|
||||
else
|
||||
if (isSub and CoolTip.OptionsTable.FixedWidthSub) then
|
||||
menuButton.leftText:SetWidth (CoolTip.OptionsTable.FixedWidth - menuButton.leftIcon:GetWidth() - 20)
|
||||
end
|
||||
else
|
||||
if (not CoolTip.OptionsTable.FixedWidthSub) then
|
||||
if (CoolTip.Type == 1 or CoolTip.Type == 2) then
|
||||
local stringWidth = menuButton.leftText:GetStringWidth() + menuButton.rightText:GetStringWidth() + menuButton.leftIcon:GetWidth() + menuButton.rightIcon:GetWidth()
|
||||
if (stringWidth > frame.w) then
|
||||
frame.w = stringWidth
|
||||
end
|
||||
end
|
||||
else
|
||||
menuButton.leftText:SetWidth (CoolTip.OptionsTable.FixedWidthSub - menuButton.leftIcon:GetWidth() - 20)
|
||||
end
|
||||
end
|
||||
@@ -1009,6 +1036,14 @@ function DetailsCreateCoolTip()
|
||||
frame1:ClearAllPoints()
|
||||
CoolTip:SetMyPoint (host)
|
||||
|
||||
if (CoolTip.title1) then
|
||||
CoolTip.frame1.titleText:Show()
|
||||
CoolTip.frame1.titleIcon:Show()
|
||||
CoolTip.frame1.titleText:SetText (CoolTip.title_text)
|
||||
CoolTip.frame1.titleIcon:SetWidth (frame1:GetWidth())
|
||||
CoolTip.frame1.titleIcon:SetHeight (40)
|
||||
end
|
||||
|
||||
gump:Fade (frame1, 0)
|
||||
|
||||
return true
|
||||
@@ -1071,9 +1106,9 @@ function DetailsCreateCoolTip()
|
||||
function CoolTip:GetText (buttonIndex)
|
||||
local button1 = frame1.Lines [buttonIndex]
|
||||
if (not button1) then
|
||||
return ""
|
||||
return "", ""
|
||||
else
|
||||
return button1.leftText:GetText()
|
||||
return button1.leftText:GetText(), button1.rightText:GetText()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1283,6 +1318,12 @@ function DetailsCreateCoolTip()
|
||||
_table_wipe (CoolTip.ParametersTableMain)
|
||||
_table_wipe (CoolTip.ParametersTableSub)
|
||||
|
||||
CoolTip.title1 = nil
|
||||
CoolTip.title_text = nil
|
||||
|
||||
CoolTip.frame1.titleText:Hide()
|
||||
CoolTip.frame1.titleIcon:Hide()
|
||||
|
||||
CoolTip:ClearAllOptions()
|
||||
CoolTip:SetColor (1, "transparent")
|
||||
CoolTip:SetColor (2, "transparent")
|
||||
@@ -1952,6 +1993,14 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
host.CoolTip.BuildFunc()
|
||||
|
||||
if (CoolTip.Indexes == 0) then
|
||||
if (host.CoolTip.Default) then
|
||||
CoolTip:SetType ("tooltip")
|
||||
CoolTip:AddLine (host.CoolTip.Default, nil, 1, "white")
|
||||
end
|
||||
end
|
||||
|
||||
CoolTip:ShowCooltip()
|
||||
|
||||
if (fromClick) then
|
||||
@@ -1959,7 +2008,7 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
end
|
||||
|
||||
local wait = 0.3
|
||||
local wait = 0.2
|
||||
|
||||
local InjectOnUpdateEnter = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
@@ -1971,7 +2020,7 @@ function DetailsCreateCoolTip()
|
||||
|
||||
local InjectOnUpdateLeave = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.3) then
|
||||
if (elapsedTime > 0.2) then
|
||||
if (not CoolTip.mouseOver and not CoolTip.buttonOver and self == CoolTip.Host) then
|
||||
CoolTip:ShowMe (false)
|
||||
end
|
||||
@@ -2004,7 +2053,7 @@ function DetailsCreateCoolTip()
|
||||
CoolTip:ExecFunc (self)
|
||||
else
|
||||
elapsedTime = 0
|
||||
wait = self.CoolTip.ShowSpeed or 0.3
|
||||
wait = self.CoolTip.ShowSpeed or 0.2
|
||||
self:SetScript ("OnUpdate", InjectOnUpdateEnter)
|
||||
end
|
||||
|
||||
|
||||
@@ -61,17 +61,18 @@
|
||||
</Anchors>
|
||||
</Texture>
|
||||
<!-- title icon -->
|
||||
<Texture name="$parent_TitleIcon" hidden="true" parentKey="titleIcon" file = "Interface\AddOns\Details\images\cooltip_selected">
|
||||
<Texture name="$parent_TitleIcon" hidden="true" parentKey="titleIcon" file = "Interface\Challenges\challenges-main">
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent" relativePoint="TOP" x="0" y="0"/>
|
||||
<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="0" y="0"/>
|
||||
<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER" x="0" y="0"/>
|
||||
<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOP" x="0" y="-22"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.1521484375" right="0.563671875" top="0.160859375" bottom="0.234375"/>
|
||||
</Texture>
|
||||
<!-- title text -->
|
||||
<FontString name="$parent_TitleText" parentKey="titleText" inherits="GameFontHighlightSmall" justifyH="LEFT" nonspacewrap="true">
|
||||
<FontHeight val="10.5"/>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parent_Selected" relativePoint="RIGHT" x="0" y="0"/>
|
||||
<Anchor point="CENTER" relativeTo="$parent_TitleIcon" relativePoint="CENTER" x="0" y="6"/>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
|
||||
@@ -12,7 +12,7 @@ local g = _detalhes.gump
|
||||
background:SetAllPoints()
|
||||
background:SetTexture (0, 0, 0, .8)
|
||||
|
||||
local edit_texture = g:NewImage (window, _, "$parentImage", _, _, _, nil, "artwork")
|
||||
local edit_texture = g:NewImage (window, _, "$parentImage", _, 300, 250, nil, "artwork")
|
||||
edit_texture:SetPoint ("center", window, "center")
|
||||
|
||||
local haveHFlip = false
|
||||
@@ -430,9 +430,11 @@ window:Hide()
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local ttexcoord
|
||||
function g:ImageEditor (callback, texture, texcoord, colors, extraParam)
|
||||
function g:ImageEditor (callback, texture, texcoord, colors, width, height, extraParam)
|
||||
|
||||
edit_texture:SetTexture (texture)
|
||||
edit_texture.width = width
|
||||
edit_texture.height = height
|
||||
|
||||
colors = colors or {1, 1, 1, 1}
|
||||
edit_texture:SetVertexColor (colors [1], colors [2], colors [3])
|
||||
|
||||
@@ -382,6 +382,8 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de
|
||||
|
||||
--> build frames
|
||||
local slider = gump:NewSlider (parent, container, name, member, w, h, 1, 2, 1, defaultv)
|
||||
slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8,
|
||||
bgFile = [[Interface\AddOns\Details\images\background]], insets = {left = 3, right = 3, top = 5, bottom = 5}})
|
||||
|
||||
slider:SetHook ("OnValueChange", function (self)
|
||||
if (slider:GetValue() == 1) then
|
||||
@@ -389,11 +391,13 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de
|
||||
if (slider.OnSwitch) then
|
||||
slider.OnSwitch (slider, slider.FixedValue, false)
|
||||
end
|
||||
slider:SetBackdropColor (1, 0, 0, 0.4)
|
||||
else
|
||||
slider.amt:SetText (rtext)
|
||||
if (slider.OnSwitch) then
|
||||
slider.OnSwitch (slider, slider.FixedValue, true)
|
||||
end
|
||||
slider:SetBackdropColor (0, 0, 1, 0.4)
|
||||
end
|
||||
return true
|
||||
end)
|
||||
|
||||
+53
-14
@@ -195,42 +195,56 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
g:NewLabel (window, _, "$parentCaptureDamageLabel", "auraCaptureLabel", "Auras")
|
||||
window.auraCaptureLabel:SetPoint ("left", window.auraCaptureImage, "right", 2)
|
||||
|
||||
local switch_icon_color = function (icon, on_off)
|
||||
icon:SetDesaturated (not on_off)
|
||||
end
|
||||
|
||||
g:NewSwitch (window, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"])
|
||||
window.damageCaptureSlider:SetPoint ("left", window.damageCaptureLabel, "right", 2)
|
||||
window.damageCaptureSlider.tooltip = "Pause or enable capture of:\n- damage done\n- damage per second\n- friendly fire\n- damage taken"
|
||||
window.damageCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "damage", true)
|
||||
switch_icon_color (window.damageCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (window.damageCaptureImage, _detalhes.capture_real ["damage"])
|
||||
|
||||
g:NewSwitch (window, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"])
|
||||
window.healCaptureSlider:SetPoint ("left", window.healCaptureLabel, "right", 2)
|
||||
window.healCaptureSlider.tooltip = "Pause or enable capture of:\n- healing done (not absorbs)\n- healing per second\n- overheal\n- healing taken"
|
||||
window.healCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "heal", true)
|
||||
switch_icon_color (window.healCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (window.healCaptureImage, _detalhes.capture_real ["heal"])
|
||||
|
||||
g:NewSwitch (window, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"])
|
||||
window.energyCaptureSlider:SetPoint ("left", window.energyCaptureLabel, "right", 2)
|
||||
window.energyCaptureSlider.tooltip = "Pause or enable capture of:\n- mana restored\n- rage generated\n- energy generated\n- runic power generated"
|
||||
window.energyCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "energy", true)
|
||||
switch_icon_color (window.energyCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (window.energyCaptureImage, _detalhes.capture_real ["energy"])
|
||||
|
||||
g:NewSwitch (window, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"])
|
||||
window.miscCaptureSlider:SetPoint ("left", window.miscCaptureLabel, "right", 2)
|
||||
window.miscCaptureSlider.tooltip = "Pause or enable capture of:\n- cc breaks\n- dispell\n- interrupts\n- ress\n- deaths"
|
||||
window.miscCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "miscdata", true)
|
||||
switch_icon_color (window.miscCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (window.miscCaptureImage, _detalhes.capture_real ["miscdata"])
|
||||
|
||||
g:NewSwitch (window, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"])
|
||||
window.auraCaptureSlider:SetPoint ("left", window.auraCaptureLabel, "right", 2)
|
||||
window.auraCaptureSlider.tooltip = "Pause or enable capture of:\n- buffs and debufs\n- absorbs (heal)"
|
||||
window.auraCaptureSlider.OnSwitch = function (self, _, value)
|
||||
_detalhes:CaptureSet (value, "aura", true)
|
||||
switch_icon_color (window.auraCaptureImage, value)
|
||||
end
|
||||
switch_icon_color (window.auraCaptureImage, _detalhes.capture_real ["aura"])
|
||||
|
||||
--------------- Cload Capture
|
||||
--------------- Cloud Capture
|
||||
|
||||
g:NewLabel (window, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", "Cloud Capture")
|
||||
window.cloudCaptureLabel:SetPoint (10, -268)
|
||||
@@ -267,10 +281,9 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
g:NewLabel (window, _, "$parentFontSizeLabel", "fonsizeLabel", "font size")
|
||||
window.fonsizeLabel:SetPoint (250, -65)
|
||||
--
|
||||
g:NewSlider (window, _, "$parentSliderFontSize", "fonsizeSlider", 90, 20, 9, 13, .5, tonumber (instance.barrasInfo.fontSize)) --parent, container, name, member, w, h, min, max, step, defaultv
|
||||
g:NewSlider (window, _, "$parentSliderFontSize", "fonsizeSlider", 90, 20, 8, 15, 1, tonumber (instance.barrasInfo.fontSize)) --parent, container, name, member, w, h, min, max, step, defaultv
|
||||
window.fonsizeSlider:SetPoint ("left", window.fonsizeLabel, "right")
|
||||
window.fonsizeSlider:SetThumbSize (50)
|
||||
window.fonsizeSlider.useDecimals = true
|
||||
window.fonsizeSlider:SetHook ("OnValueChange", function (self, instance, amount)
|
||||
instance.barrasInfo.fontSize = amount
|
||||
instance:RefreshBars()
|
||||
@@ -338,14 +351,13 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
end
|
||||
|
||||
local colorpick = function()
|
||||
ColorPickerFrame:SetColorRGB (unpack (window.instance.color))
|
||||
ColorPickerFrame.func = selectedColor
|
||||
ColorPickerFrame.cancelFunc = canceledColor
|
||||
ColorPickerFrame.hasOpacity = false
|
||||
ColorPickerFrame.opacity = window.instance.color[4] or 1
|
||||
ColorPickerFrame.previousValues = window.instance.color
|
||||
ColorPickerFrame.func = selectedColor
|
||||
ColorPickerFrame.opacityFunc = selectedAlpha
|
||||
ColorPickerFrame.cancelFunc = canceledColor
|
||||
ColorPickerFrame:SetParent (window.widget)
|
||||
ColorPickerFrame:SetColorRGB (unpack (window.instance.color))
|
||||
ColorPickerFrame:Show()
|
||||
end
|
||||
|
||||
@@ -359,7 +371,12 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
--------------- Background
|
||||
|
||||
local onSelectSecTexture = function (self, instance, texturePath)
|
||||
instance:InstanceWallpaper (texturePath)
|
||||
|
||||
if (texturePath:find ("TALENTFRAME")) then
|
||||
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125})
|
||||
else
|
||||
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1})
|
||||
end
|
||||
end
|
||||
|
||||
local subMenu = {
|
||||
@@ -402,7 +419,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-Dwarf1]], label = "Dwarf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.125, 0.25, 0, 0.25}},
|
||||
{value = [[Interface\DRESSUPFRAME\DRESSUPBACKGROUND-GNOME1]], label = "Gnome", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.25, 0.375, 0, 0.25}},
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-Goblin1]], label = "Goblin", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.625, 0.75, 0.75, 1}},
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-Human1]], label = "Human", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0, 0.125, 0.75, 1}},
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-Human1]], label = "Human", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0, 0.125, 0.5, 0.75}},
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-NightElf1]], label = "Night Elf", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.375, 0.5, 0, 0.25}},
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-Orc1]], label = "Orc", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.375, 0.5, 0.25, 0.5}},
|
||||
{value = [[Interface\DRESSUPFRAME\DressUpBackground-Pandaren1]], label = "Pandaren", onclick = onSelectSecTexture, icon = [[Interface\Glues\CHARACTERCREATE\UI-CHARACTERCREATE-RACES]], texcoord = {0.75, 0.875, 0.5, 0.75}},
|
||||
@@ -506,6 +523,18 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
window.useBackgroundSlider.OnSwitch = function (self, instance, value) --> slider, fixedValue, sliderValue
|
||||
instance.wallpaper.enabled = value
|
||||
if (value) then
|
||||
--> primeira vez que roda:
|
||||
if (not instance.wallpaper.texture) then
|
||||
local spec = GetSpecialization()
|
||||
if (spec) then
|
||||
local id, name, description, icon, _background, role = GetSpecializationInfo (spec)
|
||||
if (_background) then
|
||||
instance.wallpaper.texture = "Interface\\TALENTFRAME\\".._background
|
||||
end
|
||||
end
|
||||
instance.wallpaper.texcoord = {0, 1, 0, 0.703125}
|
||||
end
|
||||
|
||||
instance:InstanceWallpaper (true)
|
||||
_G.DetailsOptionsWindowBackgroundDropdown.MyObject:Enable()
|
||||
_G.DetailsOptionsWindowBackgroundDropdown2.MyObject:Enable()
|
||||
@@ -516,12 +545,17 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
_G.DetailsOptionsWindowBackgroundDropdown2.MyObject:Disable()
|
||||
end
|
||||
end
|
||||
|
||||
g:NewLabel (window, _, "$parentBackgroundLabel", "backgroundLabel", "wallpaper group")
|
||||
window.backgroundLabel:SetPoint (250, -160)
|
||||
g:NewLabel (window, _, "$parentBackgroundLabel", "backgroundLabel", "select wallpaper")
|
||||
window.backgroundLabel:SetPoint (370, -160)
|
||||
--
|
||||
g:NewDropDown (window, _, "$parentBackgroundDropdown", "backgroundDropdown", 120, 20, buildBackgroundMenu, nil)
|
||||
window.backgroundDropdown:SetPoint (250, -160)
|
||||
window.backgroundDropdown:SetPoint (250, -175)
|
||||
--
|
||||
g:NewDropDown (window, _, "$parentBackgroundDropdown2", "backgroundDropdown2", 120, 20, buildBackgroundMenu2, nil)
|
||||
window.backgroundDropdown2:SetPoint (370, -160)
|
||||
window.backgroundDropdown2:SetPoint (370, -175)
|
||||
|
||||
|
||||
local onSelectAnchor = function (_, instance, anchor)
|
||||
@@ -548,11 +582,16 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
|
||||
local startImageEdit = function()
|
||||
local tinstance = _G ["DetailsOptionsWindow"].MyObject.instance
|
||||
g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay)
|
||||
|
||||
if (tinstance.wallpaper.texture:find ("TALENTFRAME")) then
|
||||
g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay, window.instance.baseframe.wallpaper:GetWidth(), window.instance.baseframe.wallpaper:GetHeight())
|
||||
else
|
||||
g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay, window.instance.baseframe.wallpaper:GetWidth(), window.instance.baseframe.wallpaper:GetHeight())
|
||||
end
|
||||
end
|
||||
|
||||
g:NewLabel (window, _, "$parentAnchorLabel", "anchorLabel", "align")
|
||||
window.anchorLabel:SetPoint (250, -185)
|
||||
window.anchorLabel:SetPoint (250, -200)
|
||||
--
|
||||
g:NewDropDown (window, _, "$parentAnchorDropdown", "anchorDropdown", 100, 20, buildAnchorMenu, nil)
|
||||
window.anchorDropdown:SetPoint ("left", window.anchorLabel, "right", 2)
|
||||
@@ -570,7 +609,7 @@ function _detalhes:OpenOptionsWindow (instance)
|
||||
|
||||
local saveStyleFunc = function()
|
||||
if (not window.saveStyleName.text or window.saveStyleName.text == "") then
|
||||
print ("Give a name for your style.")
|
||||
_detalhes:Msg ("Give a name for your style.")
|
||||
return
|
||||
end
|
||||
local savedObject = {
|
||||
|
||||
+76
-15
@@ -1696,7 +1696,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando)
|
||||
instancia._version = BaseFrame:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
instancia._version:SetPoint ("left", BackGroundDisplay, "left", 20, 0)
|
||||
instancia._version:SetTextColor (1, 1, 1)
|
||||
instancia._version:SetText ("this is a early alpha version (1) of Details\nyou can help us sending bug reports\nuse the blue button.")
|
||||
instancia._version:SetText ("this is a alpha version of Details\nyou can help us sending bug reports\nuse the blue button.")
|
||||
if (not _detalhes.initializing) then
|
||||
instancia._version:Hide()
|
||||
end
|
||||
@@ -2053,6 +2053,7 @@ function gump:CriaNovaBarra (instancia, index)
|
||||
return esta_barra
|
||||
end
|
||||
|
||||
-- search key: ~wallpaper
|
||||
function _detalhes:InstanceWallpaper (texture, anchor, alpha, texcoord, width, height, overlay)
|
||||
|
||||
local wallpaper = self.wallpaper
|
||||
@@ -2441,11 +2442,6 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
|
||||
--> Generating Cooltip menu from table template
|
||||
local modeMenuTable = {
|
||||
{text = Loc ["STRING_MODE_SELF"]},
|
||||
{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_GROUP"]},
|
||||
{func = instancia.AlteraModo, param1 = 2},
|
||||
@@ -2459,7 +2455,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_RAID"]},
|
||||
{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)"},
|
||||
{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},
|
||||
@@ -2483,7 +2485,16 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
passou = 0.15
|
||||
end
|
||||
|
||||
local checked = instancia.modo or 2
|
||||
local checked
|
||||
if (instancia.modo == 1) then
|
||||
checked = 3
|
||||
elseif (instancia.modo == 2) then
|
||||
checked = 1
|
||||
elseif (instancia.modo == 3) then
|
||||
checked = 2
|
||||
elseif (instancia.modo == 4) then
|
||||
checked = 4
|
||||
end
|
||||
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
@@ -2502,7 +2513,7 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
CoolTip:SetOption ("ButtonsYMod", -5)
|
||||
CoolTip:SetOption ("YSpacingMod", 1)
|
||||
CoolTip:SetOption ("FixedHeight", 106)
|
||||
CoolTip:SetOption ("FixedWidth", 106)
|
||||
--CoolTip:SetOption ("FixedWidth", 138)
|
||||
CoolTip:SetOption ("FixedWidthSub", 146)
|
||||
CoolTip:SetOption ("SubMenuIsTooltip", true)
|
||||
|
||||
@@ -2785,18 +2796,66 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
_detalhes.popup:CoolTipInject (BaseFrame.cabecalho.atributo)
|
||||
|
||||
--> REPORTAR ----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
BaseFrame.cabecalho.report = gump:NewDetailsButton (BaseFrame, _, instancia, _detalhes.Reportar, instancia, nil, 16, 16,
|
||||
"Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON", "Interface\\COMMON\\VOICECHAT-ON")
|
||||
BaseFrame.cabecalho.report = gump:NewDetailsButton (BaseFrame, _, instancia, _detalhes.Reportar, instancia, nil, 16, 16, [[Interface\COMMON\VOICECHAT-ON]])
|
||||
BaseFrame.cabecalho.report:SetPoint ("left", BaseFrame.cabecalho.atributo, "right", -6, 0)
|
||||
BaseFrame.cabecalho.report:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1)
|
||||
BaseFrame.cabecalho.report:SetScript ("OnEnter", function()
|
||||
_detalhes.popup.button_over = true
|
||||
|
||||
--[[
|
||||
|
||||
BaseFrame.cabecalho.report:SetScript ("OnEnter", function (self)
|
||||
gump:Fade (BaseFrame.button_stretch, "alpha", 0.3)
|
||||
|
||||
_detalhes.popup.buttonOver = true
|
||||
BaseFrame.cabecalho.button_mouse_over = true
|
||||
|
||||
local passou = 0
|
||||
if (_detalhes.popup.active) then
|
||||
passou = 0.15
|
||||
end
|
||||
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.15) then
|
||||
|
||||
CoolTip:Reset()
|
||||
CoolTip:SetType ("menu")
|
||||
CoolTip:SetFixedParameter (instancia)
|
||||
CoolTip:SetColor ("main", "transparent")
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_REPORTFRAME_PARTY"], _, 1, "white")
|
||||
CoolTip:AddMenu (1, instancia.TrocaTabela, -1)
|
||||
|
||||
CoolTip:SetOwner (self)
|
||||
CoolTip:ShowCooltip()
|
||||
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end)
|
||||
BaseFrame.cabecalho.report:SetScript ("OnLeave", function()
|
||||
_detalhes.popup.button_over = false
|
||||
end)
|
||||
|
||||
BaseFrame.cabecalho.report:SetScript ("OnLeave", function (self)
|
||||
gump:Fade (BaseFrame.button_stretch, -1)
|
||||
|
||||
_detalhes.popup.buttonOver = false
|
||||
BaseFrame.cabecalho.button_mouse_over = false
|
||||
|
||||
if (_detalhes.popup.active) then
|
||||
local passou = 0
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.3) then
|
||||
if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver) then
|
||||
_detalhes.popup:ShowMe (false)
|
||||
end
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end)
|
||||
else
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end)
|
||||
|
||||
--]]
|
||||
|
||||
--> BOSS INFO ----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--BaseFrame.cabecalho.boss_info = gump:NewDetailsButton (BaseFrame, BaseFrame, instancia, _detalhes.AbrirEncounterWindow, instancia, nil, 16, 16,
|
||||
@@ -2887,6 +2946,8 @@ function gump:CriaCabecalho (BaseFrame, instancia)
|
||||
OnEnterFunc = function() gump:Fade (BaseFrame.button_stretch, "alpha", 0.3) end,
|
||||
--> a hook for OnLeaveScript
|
||||
OnLeaveFunc = function() gump:Fade (BaseFrame.button_stretch, -1) end,
|
||||
--> default message if there is no option avaliable
|
||||
Default = Loc ["STRING_NOCLOSED_INSTANCES"],
|
||||
--> instancia is the first parameter sent after click, before parameters
|
||||
FixedValue = instancia,
|
||||
Options = {TextSize = 10, NoLastSelectedBar = true}}
|
||||
|
||||
Binary file not shown.
@@ -93,10 +93,15 @@ if not Loc then return end
|
||||
|
||||
--> Mode Names
|
||||
|
||||
Loc ["STRING_MODE_SELF"] = "Self"
|
||||
Loc ["STRING_MODE_GROUP"] = "Group"
|
||||
Loc ["STRING_MODE_GROUP"] = "Group & Raid"
|
||||
Loc ["STRING_MODE_ALL"] = "Everything"
|
||||
Loc ["STRING_MODE_RAID"] = "Raid"
|
||||
|
||||
Loc ["STRING_MODE_SELF"] = "Lone Wolf"
|
||||
Loc ["STRING_MODE_RAID"] = "Widgets"
|
||||
Loc ["STRING_MODE_PLUGINS"] = "plugins"
|
||||
|
||||
Loc ["STRING_OPTIONS_WINDOW"] = "Options Panel"
|
||||
|
||||
|
||||
--> Wait Messages
|
||||
|
||||
@@ -218,12 +223,14 @@ if not Loc then return end
|
||||
Loc ["STRING_CUSTOM_NEW"] = "Create New"
|
||||
Loc ["STRING_CUSTOM_REPORT"] = "Report for (custom)"
|
||||
Loc ["STRING_REPORT"] = "Report for"
|
||||
Loc ["STRING_REPORT_LEFTCLICK"] = "Click to open report dialog"
|
||||
Loc ["STRING_REPORT_FIGHT"] = "fight"
|
||||
Loc ["STRING_REPORT_LAST"] = "Last" -- >last< 3 fights
|
||||
Loc ["STRING_REPORT_FIGHTS"] = "fights" -- last 3 >fights<
|
||||
Loc ["STRING_REPORT_LASTFIGHT"] = "last fight"
|
||||
Loc ["STRING_REPORT_PREVIOUSFIGHTS"] = "previous fights"
|
||||
Loc ["STRING_REPORT_INVALIDTARGET"] = "Whisper target not found"
|
||||
Loc ["STRING_NOCLOSED_INSTANCES"] = "There are no closed instances,\nclick to open a new one."
|
||||
|
||||
--> report frame
|
||||
|
||||
@@ -257,7 +264,6 @@ if not Loc then return end
|
||||
|
||||
--> Main Window
|
||||
|
||||
Loc ["STRING_OPTIONS_WINDOW"] = "options"
|
||||
Loc ["STRING_LOCK_WINDOW"] = "lock"
|
||||
Loc ["STRING_UNLOCK_WINDOW"] = "unlock"
|
||||
Loc ["STRING_ERASE"] = "delete"
|
||||
|
||||
@@ -93,11 +93,14 @@ if not Loc then return end
|
||||
|
||||
--> Mode Names
|
||||
|
||||
Loc ["STRING_MODE_SELF"] = "Sozinho"
|
||||
Loc ["STRING_MODE_GROUP"] = "Grupo"
|
||||
Loc ["STRING_MODE_ALL"] = "Tudo"
|
||||
Loc ["STRING_MODE_RAID"] = "Raid"
|
||||
Loc ["STRING_MODE_GROUP"] = "Grupo & Raide"
|
||||
Loc ["STRING_MODE_ALL"] = "Mostrar Tudo"
|
||||
|
||||
Loc ["STRING_MODE_SELF"] = "Lobo Solitario"
|
||||
Loc ["STRING_MODE_RAID"] = "Acessorios"
|
||||
Loc ["STRING_MODE_PLUGINS"] = "plugins"
|
||||
|
||||
Loc ["STRING_OPTIONS_WINDOW"] = "Painel de Opcoes"
|
||||
-->
|
||||
|
||||
Loc ["STRING_NEWROW"] = "esperando atualizar..."
|
||||
@@ -214,12 +217,14 @@ if not Loc then return end
|
||||
Loc ["STRING_CUSTOM_NEW"] = "Criar Novo"
|
||||
Loc ["STRING_CUSTOM_REPORT"] = "Relatorio para (custom)"
|
||||
Loc ["STRING_REPORT"] = "Relatorio para"
|
||||
Loc ["STRING_REPORT_LEFTCLICK"] = "Clique para abrir a janela de relatorio"
|
||||
Loc ["STRING_REPORT_FIGHT"] = "luta"
|
||||
Loc ["STRING_REPORT_LAST"] = "Ultimas"
|
||||
Loc ["STRING_REPORT_FIGHTS"] = "lutas"
|
||||
Loc ["STRING_REPORT_LASTFIGHT"] = "ultima luta"
|
||||
Loc ["STRING_REPORT_PREVIOUSFIGHTS"] = "lutas anteriores"
|
||||
Loc ["STRING_REPORT_INVALIDTARGET"] = "O alvo nao pode ser encontrado"
|
||||
Loc ["STRING_NOCLOSED_INSTANCES"] = "Nao ha instancias fechadas,\nclique para abrir uma nova."
|
||||
|
||||
--> report frame
|
||||
|
||||
@@ -253,7 +258,6 @@ if not Loc then return end
|
||||
|
||||
--> Main Window
|
||||
|
||||
Loc ["STRING_OPTIONS_WINDOW"] = "opcoes"
|
||||
Loc ["STRING_LOCK_WINDOW"] = "travar"
|
||||
Loc ["STRING_UNLOCK_WINDOW"] = "destravar"
|
||||
Loc ["STRING_ERASE"] = "apagar"
|
||||
|
||||
+4
-3
@@ -28,7 +28,7 @@ function _G._detalhes:Start()
|
||||
--> combat
|
||||
self.in_combat = false
|
||||
self.combat_id = self.combat_id or 0
|
||||
self.segments_amount = self.segments_amount or 3
|
||||
self.segments_amount = self.segments_amount or 8
|
||||
self.segments_amount_to_save = self.segments_amount_to_save or 2
|
||||
self.deadlog_limit = self.deadlog_limit or 12
|
||||
self.minimum_combat_time = self.minimum_combat_time or 5
|
||||
@@ -291,8 +291,9 @@ function _G._detalhes:Start()
|
||||
else
|
||||
for index, instancia in ipairs (self.tabela_instancias) do
|
||||
if (instancia.ativa) then
|
||||
instancia._version:SetText ("Details Alpha (" .. self.realversion..")")
|
||||
instancia._version:SetPoint ("bottomleft", self.baseframe, "bottomleft", 0, 16)
|
||||
self.gump:Fade (instancia._version, 0)
|
||||
instancia._version:SetText ("Details Alpha " .. _detalhes.userversion .. " (" .. self.realversion .. ")")
|
||||
instancia._version:SetPoint ("bottomleft", instancia.baseframe, "bottomleft", 0, 1)
|
||||
self.gump:Fade (instancia._version, "in", 10)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user