@ -178,7 +178,8 @@ local function setColor(texture, r, g, b, a)
local status , err = pcall ( texture.SetColorTexture , texture , r , g , b , a )
if not status then
errorhandler (
' error in " ' .. ( texture.style . name or " texture " ) .. ' " ' .. texture.style . mode .. " or alpha setting " , r , g , b ,
' error in " ' .. ( texture.style . name or " texture " ) .. ' " ' .. texture.style . mode .. " or alpha setting " , r , g ,
b ,
a )
end
end
@ -187,7 +188,7 @@ local function setGradient(texture, orientation, r1, g1, b1, a1, r2, g2, b2, a2)
CreateColor ( r2 , g2 , b2 , a2 ) )
if not status then
errorhandler ( ' error in " ' ..
( texture.style . name or " texture " ) .. ' " ' .. texture.style . mode .. " or alpha setting. " )
( texture.style . name or " texture " ) .. ' " ' .. texture.style . mode .. " or alpha setting. " )
end
end
-- ~~| Media |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -12275,9 +12276,9 @@ function DiesalStyle:StyleTexture(texture, style)
-- gradient
if texture.style . gradient then
texture.style . gradient.orientation = style.gradient_orientation or texture.style . gradient.orientation or
DEFAULT_GRADIENT_ORIENTATION
DEFAULT_GRADIENT_ORIENTATION
texture.style . gradient.color = style.gradient_color or texture.style . gradient.color or
{ DEFAULT_COLOR , DEFAULT_COLOR }
{ DEFAULT_COLOR , DEFAULT_COLOR }
end
-- image
if texture.style . image then
@ -12340,9 +12341,9 @@ function DiesalStyle:StyleTexture(texture, style)
texture : SetColorTexture ( 1 , 1 , 1 , 1 ) -- clear color
-- apply settings
local r1 , g1 , b1 = GetBlizzColorValues ( texture.style . gradient.color
[ texture.style . gradient.orientation == " HORIZONTAL " and 1 or 2 ] )
[ texture.style . gradient.orientation == " HORIZONTAL " and 1 or 2 ] )
local r2 , g2 , b2 = GetBlizzColorValues ( texture.style . gradient.color
[ texture.style . gradient.orientation == " HORIZONTAL " and 2 or 1 ] )
[ texture.style . gradient.orientation == " HORIZONTAL " and 2 or 1 ] )
local a1 , a2 =
texture.style . alpha [ texture.style . gradient.orientation == " HORIZONTAL " and 1 or 2 ] ,
texture.style . alpha [ texture.style . gradient.orientation == " HORIZONTAL " and 2 or 1 ]
@ -12392,7 +12393,7 @@ function DiesalStyle:StyleOutline(leftTexture, rightTexture, topTexture, bottomT
}
end
style.gradient_orientation = style.gradient_orientation and
style.gradient_orientation : upper ( ) --formatOrientation(style.gradient_orientation) -- fuck you
style.gradient_orientation : upper ( ) --formatOrientation(style.gradient_orientation) -- fuck you
if not texture.style . gradient and ( style.gradient_orientation or style.gradient_alpha or style.gradient_color ) then
texture.style . gradient = { }
end
@ -12406,9 +12407,9 @@ function DiesalStyle:StyleOutline(leftTexture, rightTexture, topTexture, bottomT
-- gradient
if texture.style . gradient then
texture.style . gradient.orientation = style.gradient_orientation or texture.style . gradient.orientation or
DEFAULT_GRADIENT_ORIENTATION
DEFAULT_GRADIENT_ORIENTATION
texture.style . gradient.color = style.gradient_color or texture.style . gradient.color or
{ DEFAULT_COLOR , DEFAULT_COLOR }
{ DEFAULT_COLOR , DEFAULT_COLOR }
end
-- | Apply Settings |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -12588,7 +12589,7 @@ end
---@param style Diesal.Style.ShadowStyle
function DiesalStyle : StyleShadow ( object , frame , style )
object.shadow = object.shadow or
CreateFrame ( " Frame " , nil , frame , BackdropTemplateMixin and " BackdropTemplate " ) --CreateFrame("Frame",nil,frame)
CreateFrame ( " Frame " , nil , frame , BackdropTemplateMixin and " BackdropTemplate " ) --CreateFrame("Frame",nil,frame)
object.shadow : Show ( )
if not object.shadow . style or style.clear then
object.shadow . style = { }
@ -12597,7 +12598,7 @@ function DiesalStyle:StyleShadow(object, frame, style)
-- ~~ Format New Settings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
local red , green , blue = DiesalTools.GetColor ( style.color )
local offset = style.offset and type ( style.offset ) == " number " and
{ style.offset , style.offset , style.offset , style.offset } or style.offset
{ style.offset , style.offset , style.offset , style.offset } or style.offset
-- Setting ~~~~~~~~~~~~~~~~~~~~~~~ New Setting ~~~~~~~~~~~~~~~ Old Setting ~~~~~~~~~~~~~~~~~ Default ~~~~~~~~~~~~~~~~~~
shadowStyle.edgeFile = style.edgeFile or shadowStyle.edgeFile or getMedia ( " border " , " shadow " )
shadowStyle.edgeSize = style.edgeSize or shadowStyle.edgeSize or 28