- 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:
+63
-14
@@ -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,15 +598,26 @@ function DetailsCreateCoolTip()
|
||||
end
|
||||
|
||||
--> string length
|
||||
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()
|
||||
if (stringWidth > frame.w) then
|
||||
frame.w = stringWidth
|
||||
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()
|
||||
if (stringWidth > frame.w) then
|
||||
frame.w = stringWidth
|
||||
end
|
||||
end
|
||||
else
|
||||
menuButton.leftText:SetWidth (CoolTip.OptionsTable.FixedWidth - menuButton.leftIcon:GetWidth() - 20)
|
||||
end
|
||||
else
|
||||
if (isSub and CoolTip.OptionsTable.FixedWidthSub) then
|
||||
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
|
||||
@@ -1008,6 +1035,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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user