Updated LibOpenRaid and DetailsFramework
This commit is contained in:
+133
-133
@@ -5,12 +5,12 @@ if (not DF or not DetailsFrameworkCanLoad) then
|
||||
end
|
||||
|
||||
local _
|
||||
local _rawset = rawset --> lua local
|
||||
local _rawget = rawget --> lua local
|
||||
local _setmetatable = setmetatable --> lua local
|
||||
local _unpack = unpack --> lua local
|
||||
local _type = type --> lua local
|
||||
local _math_floor = math.floor --> lua local
|
||||
local _rawset = rawset --lua local
|
||||
local _rawget = rawget --lua local
|
||||
local _setmetatable = setmetatable --lua local
|
||||
local _unpack = unpack --lua local
|
||||
local _type = type --lua local
|
||||
local _math_floor = math.floor --lua local
|
||||
|
||||
local cleanfunction = function() end
|
||||
local APISplitBarFunctions
|
||||
@@ -45,107 +45,107 @@ end
|
||||
local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> metatables
|
||||
--metatables
|
||||
|
||||
SplitBarMetaFunctions.__call = function(_table, value)
|
||||
if (not value) then
|
||||
return _table.statusbar:GetValue()
|
||||
else
|
||||
_table.spark:SetPoint ("left", _table.statusbar, "left", value * (_table.statusbar:GetWidth()/100) - 18, 0)
|
||||
return _table.statusbar:SetValue (value)
|
||||
_table.spark:SetPoint("left", _table.statusbar, "left", value * (_table.statusbar:GetWidth()/100) - 18, 0)
|
||||
return _table.statusbar:SetValue(value)
|
||||
end
|
||||
end
|
||||
|
||||
SplitBarMetaFunctions.__add = function(v1, v2)
|
||||
if (_type (v1) == "table") then
|
||||
if (_type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v + v2
|
||||
v1.spark:SetPoint ("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue (v)
|
||||
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue(v)
|
||||
else
|
||||
local v = v2.statusbar:GetValue()
|
||||
v = v + v1
|
||||
v2.spark:SetPoint ("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue (v)
|
||||
v2.spark:SetPoint("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue(v)
|
||||
end
|
||||
end
|
||||
|
||||
SplitBarMetaFunctions.__sub = function(v1, v2)
|
||||
if (_type (v1) == "table") then
|
||||
if (_type(v1) == "table") then
|
||||
local v = v1.statusbar:GetValue()
|
||||
v = v - v2
|
||||
v1.spark:SetPoint ("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue (v)
|
||||
v1.spark:SetPoint("left", v1.statusbar, "left", value * (v1.statusbar:GetWidth()/100) - 18, 0)
|
||||
v1.statusbar:SetValue(v)
|
||||
else
|
||||
local v = v2.statusbar:GetValue()
|
||||
v = v - v1
|
||||
v2.spark:SetPoint ("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue (v)
|
||||
v2.spark:SetPoint("left", v2.statusbar, "left", value * (v2.statusbar:GetWidth()/100) - 18, 0)
|
||||
v2.statusbar:SetValue(v)
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> members
|
||||
--members
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
local function gmember_tooltip (_object)
|
||||
return _object:GetTooltip()
|
||||
end
|
||||
--> shown
|
||||
--shown
|
||||
local gmember_shown = function(_object)
|
||||
return _object.statusbar:IsShown()
|
||||
end
|
||||
--> frame width
|
||||
--frame width
|
||||
local gmember_width = function(_object)
|
||||
return _object.statusbar:GetWidth()
|
||||
end
|
||||
--> frame height
|
||||
--frame height
|
||||
local gmember_height = function(_object)
|
||||
return _object.statusbar:GetHeight()
|
||||
end
|
||||
--> value
|
||||
--value
|
||||
local gmember_value = function(_object)
|
||||
return _object.statusbar:GetValue()
|
||||
end
|
||||
--> right text
|
||||
--right text
|
||||
local gmember_rtext = function(_object)
|
||||
return _object.textright:GetText()
|
||||
end
|
||||
--> left text
|
||||
--left text
|
||||
local gmember_ltext = function(_object)
|
||||
return _object.textleft:GetText()
|
||||
end
|
||||
--> right color
|
||||
--right color
|
||||
local gmember_rcolor = function(_object)
|
||||
return _object.rightTexture.original_colors
|
||||
end
|
||||
--> left color
|
||||
--left color
|
||||
local gmember_lcolor = function(_object)
|
||||
return _object.texture.original_colors
|
||||
end
|
||||
--> right icon
|
||||
--right icon
|
||||
local gmember_ricon = function(_object)
|
||||
return _object.iconright:GetTexture()
|
||||
end
|
||||
--> left icon
|
||||
--left icon
|
||||
local gmember_licon = function(_object)
|
||||
return _object.iconleft:GetTexture()
|
||||
end
|
||||
--> texture
|
||||
--texture
|
||||
local gmember_texture = function(_object)
|
||||
return _object.texture:GetTexture()
|
||||
end
|
||||
--> font size
|
||||
--font size
|
||||
local gmember_textsize = function(_object)
|
||||
local _, fontsize = _object.textleft:GetFont()
|
||||
return fontsize
|
||||
end
|
||||
--> font face
|
||||
--font face
|
||||
local gmember_textfont = function(_object)
|
||||
local fontface = _object.textleft:GetFont()
|
||||
return fontface
|
||||
end
|
||||
--> font color
|
||||
--font color
|
||||
local gmember_textcolor = function(_object)
|
||||
return _object.textleft:GetTextColor()
|
||||
end
|
||||
@@ -187,11 +187,11 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> tooltip
|
||||
--tooltip
|
||||
local smember_tooltip = function(_object, _value)
|
||||
return _object:SetTooltip (_value)
|
||||
end
|
||||
--> show
|
||||
--show
|
||||
local smember_shown = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Show()
|
||||
@@ -199,7 +199,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
return _object:Hide()
|
||||
end
|
||||
end
|
||||
--> hide
|
||||
--hide
|
||||
local smember_hide = function(_object, _value)
|
||||
if (_value) then
|
||||
return _object:Hide()
|
||||
@@ -207,96 +207,96 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
return _object:Show()
|
||||
end
|
||||
end
|
||||
--> width
|
||||
--width
|
||||
local smember_width = function(_object, _value)
|
||||
return _object.statusbar:SetWidth (_value)
|
||||
return _object.statusbar:SetWidth(_value)
|
||||
end
|
||||
--> height
|
||||
--height
|
||||
local smember_height = function(_object, _value)
|
||||
return _object.statusbar:SetHeight (_value)
|
||||
return _object.statusbar:SetHeight(_value)
|
||||
end
|
||||
--> statusbar value
|
||||
--statusbar value
|
||||
local smember_value = function(_object, _value)
|
||||
_object.statusbar:SetValue (_value)
|
||||
return _object.spark:SetPoint ("left", _object.statusbar, "left", _value * (_object.statusbar:GetWidth()/100) - 18, 0)
|
||||
_object.statusbar:SetValue(_value)
|
||||
return _object.spark:SetPoint("left", _object.statusbar, "left", _value * (_object.statusbar:GetWidth()/100) - 18, 0)
|
||||
end
|
||||
--> right text
|
||||
--right text
|
||||
local smember_rtext = function(_object, _value)
|
||||
return _object.textright:SetText (_value)
|
||||
return _object.textright:SetText(_value)
|
||||
end
|
||||
--> left text
|
||||
--left text
|
||||
local smember_ltext = function(_object, _value)
|
||||
return _object.textleft:SetText (_value)
|
||||
return _object.textleft:SetText(_value)
|
||||
end
|
||||
--> right color
|
||||
--right color
|
||||
local smember_rcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
_object.rightTexture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
return _object.rightTexture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> left color
|
||||
--left color
|
||||
local smember_lcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
|
||||
_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
|
||||
_object.texture.original_colors = {_value1, _value2, _value3, _value4}
|
||||
return _object.texture:SetVertexColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
--> right icon
|
||||
--right icon
|
||||
local smember_ricon = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.iconright:SetTexture (_value1)
|
||||
_object.iconright:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object.iconright:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.iconright:SetTexture (_value)
|
||||
_object.iconright:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> left icon
|
||||
--left icon
|
||||
local smember_licon = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.iconleft:SetTexture (_value1)
|
||||
_object.iconleft:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object.iconleft:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.iconleft:SetTexture (_value)
|
||||
_object.iconleft:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> texture
|
||||
--texture
|
||||
local smember_texture = function(_object, _value)
|
||||
if (type (_value) == "table") then
|
||||
if (type(_value) == "table") then
|
||||
local _value1, _value2 = _unpack (_value)
|
||||
_object.texture:SetTexture (_value1)
|
||||
_object.rightTexture:SetTexture (_value1)
|
||||
_object.texture:SetTexture(_value1)
|
||||
_object.rightTexture:SetTexture(_value1)
|
||||
if (_value2) then
|
||||
_object.texture:SetTexCoord (_unpack (_value2))
|
||||
_object.rightTexture:SetTexCoord (_unpack (_value2))
|
||||
end
|
||||
else
|
||||
_object.texture:SetTexture (_value)
|
||||
_object.rightTexture:SetTexture (_value)
|
||||
_object.texture:SetTexture(_value)
|
||||
_object.rightTexture:SetTexture(_value)
|
||||
end
|
||||
return
|
||||
end
|
||||
--> font face
|
||||
--font face
|
||||
local smember_textfont = function(_object, _value)
|
||||
DF:SetFontFace (_object.textleft, _value)
|
||||
return DF:SetFontFace (_object.textright, _value)
|
||||
end
|
||||
--> font size
|
||||
--font size
|
||||
local smember_textsize = function(_object, _value)
|
||||
DF:SetFontSize (_object.textleft, _value)
|
||||
return DF:SetFontSize (_object.textright, _value)
|
||||
end
|
||||
--> font color
|
||||
--font color
|
||||
local smember_textcolor = function(_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors(_value)
|
||||
_object.textleft:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
return _object.textright:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
@@ -331,9 +331,9 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> methods
|
||||
--methods
|
||||
|
||||
--> show & hide
|
||||
--show & hide
|
||||
function SplitBarMetaFunctions:Show()
|
||||
return self.statusbar:Show()
|
||||
end
|
||||
@@ -348,34 +348,34 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
elseif (value < 0 or value > 100) then
|
||||
return
|
||||
end
|
||||
self.statusbar:SetValue (value)
|
||||
self.spark:SetPoint ("left", self.statusbar, "left", value * (self.statusbar:GetWidth()/100) - 18, 0)
|
||||
self.statusbar:SetValue(value)
|
||||
self.spark:SetPoint("left", self.statusbar, "left", value * (self.statusbar:GetWidth()/100) - 18, 0)
|
||||
end
|
||||
|
||||
-- setpoint
|
||||
function SplitBarMetaFunctions:SetPoint (v1, v2, v3, v4, v5)
|
||||
function SplitBarMetaFunctions:SetPoint(v1, v2, v3, v4, v5)
|
||||
v1, v2, v3, v4, v5 = DF:CheckPoints (v1, v2, v3, v4, v5, self)
|
||||
if (not v1) then
|
||||
print ("Invalid parameter for SetPoint")
|
||||
return
|
||||
end
|
||||
return self.widget:SetPoint (v1, v2, v3, v4, v5)
|
||||
return self.widget:SetPoint(v1, v2, v3, v4, v5)
|
||||
end
|
||||
|
||||
-- sizes
|
||||
function SplitBarMetaFunctions:SetSize (w, h)
|
||||
function SplitBarMetaFunctions:SetSize(w, h)
|
||||
if (w) then
|
||||
self.statusbar:SetWidth (w)
|
||||
self.statusbar:SetWidth(w)
|
||||
end
|
||||
if (h) then
|
||||
self.statusbar:SetHeight (h)
|
||||
self.statusbar:SetHeight(h)
|
||||
end
|
||||
end
|
||||
|
||||
-- texture
|
||||
function SplitBarMetaFunctions:SetTexture (texture)
|
||||
self.rightTexture:SetTexture (texture)
|
||||
self.texture:SetTexture (texture)
|
||||
function SplitBarMetaFunctions:SetTexture(texture)
|
||||
self.rightTexture:SetTexture(texture)
|
||||
self.texture:SetTexture(texture)
|
||||
end
|
||||
|
||||
function SplitBarMetaFunctions:SetBackgroundTexture(texture)
|
||||
@@ -384,26 +384,26 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- texts
|
||||
function SplitBarMetaFunctions:SetLeftText (text)
|
||||
self.textleft:SetText (text)
|
||||
self.textleft:SetText(text)
|
||||
end
|
||||
function SplitBarMetaFunctions:SetRightText (text)
|
||||
self.textright:SetText (text)
|
||||
self.textright:SetText(text)
|
||||
end
|
||||
|
||||
-- colors
|
||||
function SplitBarMetaFunctions:SetLeftColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
self.texture:SetVertexColor (r, g, b, a)
|
||||
self.texture.original_colors = {r, g, b, a}
|
||||
end
|
||||
function SplitBarMetaFunctions:SetRightColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
self.rightTexture:SetVertexColor (r, g, b, a)
|
||||
self.rightTexture.original_colors = {r, g, b, a}
|
||||
end
|
||||
|
||||
function SplitBarMetaFunctions:SetBackgroundColor (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors (r, g, b, a)
|
||||
r, g, b, a = DF:ParseColors(r, g, b, a)
|
||||
self.background:SetVertexColor (r, g, b, a)
|
||||
self.background.original_colors = {r, g, b, a}
|
||||
end
|
||||
@@ -418,14 +418,14 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- icons
|
||||
function SplitBarMetaFunctions:SetLeftIcon (texture, ...)
|
||||
self.iconleft:SetTexture (texture)
|
||||
self.iconleft:SetTexture(texture)
|
||||
if (...) then
|
||||
local L, R, U, D = unpack (...)
|
||||
self.iconleft:SetTexCoord (L, R, U, D)
|
||||
end
|
||||
end
|
||||
function SplitBarMetaFunctions:SetRightIcon (texture, ...)
|
||||
self.iconright:SetTexture (texture)
|
||||
self.iconright:SetTexture(texture)
|
||||
if (...) then
|
||||
local L, R, U, D = unpack (...)
|
||||
self.iconright:SetTexCoord (L, R, U, D)
|
||||
@@ -459,7 +459,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
|
||||
-- frame stratas
|
||||
function SplitBarMetaFunctions:SetFrameStrata (strata)
|
||||
if (_type (strata) == "table") then
|
||||
if (_type(strata) == "table") then
|
||||
self.statusbar:SetFrameStrata (strata:GetFrameStrata())
|
||||
else
|
||||
self.statusbar:SetFrameStrata (strata)
|
||||
@@ -467,7 +467,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
-- animation
|
||||
--> animation with acceleration ~animation ~healthbaranimation
|
||||
--animation with acceleration ~animation ~healthbaranimation
|
||||
local animateLeftWithAccel = function(self, deltaTime)
|
||||
local currentPercent = DetailsFramework:GetRangePercent(self.targetValue, self.startValue, self.currentValue)
|
||||
currentPercent = abs(currentPercent - 1)
|
||||
@@ -560,7 +560,7 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> scripts
|
||||
--scripts
|
||||
|
||||
local OnEnter = function(frame)
|
||||
local capsule = frame.MyObject
|
||||
@@ -633,17 +633,17 @@ local SplitBarMetaFunctions = _G[DF.GlobalWidgetControlNames ["split_bar"]]
|
||||
end
|
||||
|
||||
local OnSizeChanged = function(statusbar)
|
||||
statusbar.MyObject.spark:SetPoint ("left", statusbar, "left", statusbar:GetValue() * (statusbar:GetWidth()/100) - 18, 0)
|
||||
statusbar.MyObject.spark:SetPoint("left", statusbar, "left", statusbar:GetValue() * (statusbar:GetWidth()/100) - 18, 0)
|
||||
statusbar.MyObject.rightTexture:SetWidth(statusbar:GetWidth() - statusbar.MyObject.texture:GetWidth())
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
--> object constructor
|
||||
--object constructor
|
||||
|
||||
function DetailsFrameworkSplitlBar_OnCreate (self)
|
||||
self.texture.original_colors = {1, 1, 1, 1}
|
||||
self.rightTexture.original_colors = {.5, .5, .5, 1}
|
||||
self.spark:SetPoint ("left", self, "left", self:GetValue() * (self:GetWidth()/100) - 18, 0)
|
||||
self.spark:SetPoint("left", self, "left", self:GetValue() * (self:GetWidth()/100) - 18, 0)
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -653,58 +653,58 @@ end
|
||||
|
||||
local build_statusbar = function(self)
|
||||
|
||||
self:SetSize (300, 14)
|
||||
self:SetSize(300, 14)
|
||||
|
||||
self.background = self:CreateTexture ("$parent_StatusBarBackground", "BACKGROUND")
|
||||
self.background = self:CreateTexture("$parent_StatusBarBackground", "BACKGROUND")
|
||||
self.background:SetPoint("topright", self, "topright")
|
||||
self.background:SetPoint("bottomright", self, "bottomright")
|
||||
self.background:SetPoint("topleft", self, "topleft")
|
||||
self.background:SetPoint("bottomleft", self, "bottomleft")
|
||||
self.background:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.background:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.background:SetVertexColor (.3, .3, .3, 1)
|
||||
|
||||
--this is the left texture and it grows to the right, it is embed within the bar by SetStatusBarTexture
|
||||
self.texture = self:CreateTexture ("$parent_StatusBarTexture", "ARTWORK", nil, 1)
|
||||
self.texture = self:CreateTexture("$parent_StatusBarTexture", "ARTWORK", nil, 1)
|
||||
self.texture:Hide()
|
||||
self.texture:SetSize (300, 14)
|
||||
self.texture:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.texture:SetSize(300, 14)
|
||||
self.texture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
|
||||
--this is the right texture and its size is the bar:GetWidth() - self.texture:GetWidth()
|
||||
self.rightTexture = self:CreateTexture ("$parent_StatusBarTextureRight", "ARTWORK", nil, 2)
|
||||
self.rightTexture = self:CreateTexture("$parent_StatusBarTextureRight", "ARTWORK", nil, 2)
|
||||
self.rightTexture:Hide()
|
||||
self.rightTexture:SetSize (300, 14)
|
||||
self.rightTexture:SetTexture ([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.rightTexture:SetSize(300, 14)
|
||||
self.rightTexture:SetTexture([[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]])
|
||||
self.rightTexture:SetPoint("topright", self, "topright")
|
||||
self.rightTexture:SetPoint("bottomright", self, "bottomright")
|
||||
self.rightTexture:SetVertexColor(1, 0, 0)
|
||||
|
||||
self.lefticon = self:CreateTexture ("$parent_IconLeft", "OVERLAY")
|
||||
self.lefticon:SetSize (14, 14)
|
||||
self.lefticon:SetPoint ("LEFT", self, "LEFT")
|
||||
self.lefticon = self:CreateTexture("$parent_IconLeft", "OVERLAY")
|
||||
self.lefticon:SetSize(14, 14)
|
||||
self.lefticon:SetPoint("LEFT", self, "LEFT")
|
||||
|
||||
self.righticon = self:CreateTexture ("$parent_IconRight", "OVERLAY")
|
||||
self.righticon:SetSize (14, 14)
|
||||
self.righticon:SetPoint ("RIGHT", self, "RIGHT")
|
||||
self.righticon = self:CreateTexture("$parent_IconRight", "OVERLAY")
|
||||
self.righticon:SetSize(14, 14)
|
||||
self.righticon:SetPoint("RIGHT", self, "RIGHT")
|
||||
|
||||
self.spark = self:CreateTexture ("$parent_Spark", "OVERLAY")
|
||||
self.spark:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.spark:SetBlendMode ("ADD")
|
||||
self.spark:SetSize (32, 32)
|
||||
self.spark:SetPoint ("LEFT", self, "RIGHT", -17, -1)
|
||||
self.spark = self:CreateTexture("$parent_Spark", "OVERLAY")
|
||||
self.spark:SetTexture([[Interface\CastingBar\UI-CastingBar-Spark]])
|
||||
self.spark:SetBlendMode("ADD")
|
||||
self.spark:SetSize(32, 32)
|
||||
self.spark:SetPoint("LEFT", self, "RIGHT", -17, -1)
|
||||
|
||||
self.lefttext = self:CreateFontString ("$parent_TextLeft", "OVERLAY", "GameFontHighlight")
|
||||
DF:SetFontSize (self.lefttext, 10)
|
||||
self.lefttext:SetJustifyH ("left")
|
||||
self.lefttext:SetPoint ("LEFT", self.lefticon, "RIGHT", 3, 0)
|
||||
self.lefttext:SetJustifyH("left")
|
||||
self.lefttext:SetPoint("LEFT", self.lefticon, "RIGHT", 3, 0)
|
||||
|
||||
self.righttext = self:CreateFontString ("$parent_TextRight", "OVERLAY", "GameFontHighlight")
|
||||
DF:SetFontSize (self.righttext, 10)
|
||||
self.righttext:SetJustifyH ("right")
|
||||
self.righttext:SetPoint ("RIGHT", self.righticon, "LEFT", -3, 0)
|
||||
self.righttext:SetJustifyH("right")
|
||||
self.righttext:SetPoint("RIGHT", self.righticon, "LEFT", -3, 0)
|
||||
|
||||
self:SetStatusBarTexture (self.texture)
|
||||
self:SetMinMaxValues (1, 100)
|
||||
self:SetValue (50)
|
||||
self:SetValue(50)
|
||||
DetailsFrameworkSplitlBar_OnCreate (self)
|
||||
end
|
||||
|
||||
@@ -740,14 +740,14 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
|
||||
container = container.widget
|
||||
end
|
||||
|
||||
--> default members:
|
||||
--> misc
|
||||
--default members:
|
||||
--misc
|
||||
SplitBarObject.locked = false
|
||||
SplitBarObject.container = container
|
||||
SplitBarObject.currentValue = 0.5
|
||||
|
||||
--> create widgets
|
||||
SplitBarObject.statusbar = CreateFrame ("statusbar", name, parent, "BackdropTemplate")
|
||||
--create widgets
|
||||
SplitBarObject.statusbar = CreateFrame("statusbar", name, parent, "BackdropTemplate")
|
||||
build_statusbar (SplitBarObject.statusbar)
|
||||
SplitBarObject.spark = SplitBarObject.statusbar.spark
|
||||
SplitBarObject.widget = SplitBarObject.statusbar
|
||||
@@ -781,7 +781,7 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
|
||||
SplitBarObject.texture = _G [name .. "_StatusBarTexture"]
|
||||
SplitBarObject.rightTexture = _G [name .. "_StatusBarTextureRight"]
|
||||
|
||||
--> hooks
|
||||
--hooks
|
||||
SplitBarObject.HookList = {
|
||||
OnEnter = {},
|
||||
OnLeave = {},
|
||||
@@ -792,13 +792,13 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
|
||||
OnSizeChanged = {},
|
||||
}
|
||||
|
||||
SplitBarObject.statusbar:SetScript ("OnEnter", OnEnter)
|
||||
SplitBarObject.statusbar:SetScript ("OnLeave", OnLeave)
|
||||
SplitBarObject.statusbar:SetScript ("OnHide", OnHide)
|
||||
SplitBarObject.statusbar:SetScript ("OnShow", OnShow)
|
||||
SplitBarObject.statusbar:SetScript ("OnMouseDown", OnMouseDown)
|
||||
SplitBarObject.statusbar:SetScript ("OnMouseUp", OnMouseUp)
|
||||
SplitBarObject.statusbar:SetScript ("OnSizeChanged", OnSizeChanged)
|
||||
SplitBarObject.statusbar:SetScript("OnEnter", OnEnter)
|
||||
SplitBarObject.statusbar:SetScript("OnLeave", OnLeave)
|
||||
SplitBarObject.statusbar:SetScript("OnHide", OnHide)
|
||||
SplitBarObject.statusbar:SetScript("OnShow", OnShow)
|
||||
SplitBarObject.statusbar:SetScript("OnMouseDown", OnMouseDown)
|
||||
SplitBarObject.statusbar:SetScript("OnMouseUp", OnMouseUp)
|
||||
SplitBarObject.statusbar:SetScript("OnSizeChanged", OnSizeChanged)
|
||||
|
||||
_setmetatable (SplitBarObject, SplitBarMetaFunctions)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user