mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- added bar/background graphical blend mode options so we can have us some snazzier artses
This commit is contained in:
@ -511,6 +511,7 @@ function IceBarElement.prototype:CreateBackground()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.frame.bg:SetTexture(IceElement.TexturePath .. self.settings.barTexture.."BG")
|
self.frame.bg:SetTexture(IceElement.TexturePath .. self.settings.barTexture.."BG")
|
||||||
|
self.frame.bg:SetBlendMode(self.settings.barBgBlendMode)
|
||||||
self.frame.bg:ClearAllPoints()
|
self.frame.bg:ClearAllPoints()
|
||||||
self.frame.bg:SetAllPoints(self.frame)
|
self.frame.bg:SetAllPoints(self.frame)
|
||||||
|
|
||||||
@ -556,6 +557,7 @@ function IceBarElement.prototype:CreateBar()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.barFrame.bar:SetTexture(IceElement.TexturePath .. self.settings.barTexture)
|
self.barFrame.bar:SetTexture(IceElement.TexturePath .. self.settings.barTexture)
|
||||||
|
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
|
||||||
self.barFrame.bar:SetAllPoints(self.frame)
|
self.barFrame.bar:SetAllPoints(self.frame)
|
||||||
|
|
||||||
if (self.moduleSettings.side == IceCore.Side.Left) then
|
if (self.moduleSettings.side == IceCore.Side.Left) then
|
||||||
|
32
IceCore.lua
32
IceCore.lua
@ -305,6 +305,24 @@ function IceCore.prototype:SetBarTexture(value)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function IceCore.prototype:GetBarBlendMode()
|
||||||
|
return self.settings.barBlendMode
|
||||||
|
end
|
||||||
|
function IceCore.prototype:SetBarBlendMode(value)
|
||||||
|
self.settings.barBlendMode = value
|
||||||
|
self:Redraw()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function IceCore.prototype:GetBarBgBlendMode()
|
||||||
|
return self.settings.barBgBlendMode
|
||||||
|
end
|
||||||
|
function IceCore.prototype:SetBarBgBlendMode(value)
|
||||||
|
self.settings.barBgBlendMode = value
|
||||||
|
self:Redraw()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceCore.prototype:GetBarWidth()
|
function IceCore.prototype:GetBarWidth()
|
||||||
return self.settings.barWidth
|
return self.settings.barWidth
|
||||||
end
|
end
|
||||||
@ -355,6 +373,8 @@ function IceCore.prototype:ChangePreset(value)
|
|||||||
self:SetBarWidth(self.presets[value].barWidth)
|
self:SetBarWidth(self.presets[value].barWidth)
|
||||||
self:SetBarSpace(self.presets[value].barSpace)
|
self:SetBarSpace(self.presets[value].barSpace)
|
||||||
self:SetBarProportion(self.presets[value].barProportion)
|
self:SetBarProportion(self.presets[value].barProportion)
|
||||||
|
self:SetBarBlendMode(self.presets[value].barBlendMode)
|
||||||
|
self:SetBarBgBlendMode(self.presets[value].barBgBlendMode)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -422,6 +442,8 @@ function IceCore.prototype:LoadPresets()
|
|||||||
barHeight = 220,
|
barHeight = 220,
|
||||||
barProportion = 0.15,
|
barProportion = 0.15,
|
||||||
barSpace = 3,
|
barSpace = 3,
|
||||||
|
barBlendMode = "BLEND",
|
||||||
|
barBgBlendMode = "BLEND",
|
||||||
}
|
}
|
||||||
|
|
||||||
self.presets["HiBar"] = {
|
self.presets["HiBar"] = {
|
||||||
@ -430,6 +452,8 @@ function IceCore.prototype:LoadPresets()
|
|||||||
barHeight = 150,
|
barHeight = 150,
|
||||||
barProportion = 0.34,
|
barProportion = 0.34,
|
||||||
barSpace = 4,
|
barSpace = 4,
|
||||||
|
barBlendMode = "BLEND",
|
||||||
|
barBgBlendMode = "BLEND",
|
||||||
}
|
}
|
||||||
|
|
||||||
self.presets["RoundBar"] = {
|
self.presets["RoundBar"] = {
|
||||||
@ -438,6 +462,8 @@ function IceCore.prototype:LoadPresets()
|
|||||||
barHeight = 220,
|
barHeight = 220,
|
||||||
barProportion = 0.14,
|
barProportion = 0.14,
|
||||||
barSpace = 1,
|
barSpace = 1,
|
||||||
|
barBlendMode = "BLEND",
|
||||||
|
barBgBlendMode = "BLEND",
|
||||||
}
|
}
|
||||||
|
|
||||||
self.presets["ColorBar"] = {
|
self.presets["ColorBar"] = {
|
||||||
@ -446,6 +472,8 @@ function IceCore.prototype:LoadPresets()
|
|||||||
barHeight = 220,
|
barHeight = 220,
|
||||||
barProportion = 0.15,
|
barProportion = 0.15,
|
||||||
barSpace = 3,
|
barSpace = 3,
|
||||||
|
barBlendMode = "Blend",
|
||||||
|
barBgBlendMode = "BLEND",
|
||||||
}
|
}
|
||||||
|
|
||||||
self.presets["RivetBar"] = {
|
self.presets["RivetBar"] = {
|
||||||
@ -454,6 +482,8 @@ function IceCore.prototype:LoadPresets()
|
|||||||
barHeight = 220,
|
barHeight = 220,
|
||||||
barProportion = 0.15,
|
barProportion = 0.15,
|
||||||
barSpace = 3,
|
barSpace = 3,
|
||||||
|
barBlendMode = "BLEND",
|
||||||
|
barBgBlendMode = "BLEND",
|
||||||
}
|
}
|
||||||
|
|
||||||
self.presets["RivetBar2"] = {
|
self.presets["RivetBar2"] = {
|
||||||
@ -462,6 +492,8 @@ function IceCore.prototype:LoadPresets()
|
|||||||
barHeight = 220,
|
barHeight = 220,
|
||||||
barProportion = 0.15,
|
barProportion = 0.15,
|
||||||
barSpace = 3,
|
barSpace = 3,
|
||||||
|
barBlendMode = "BLEND",
|
||||||
|
barBgBlendMode = "BLEND",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
28
IceHUD.lua
28
IceHUD.lua
@ -376,6 +376,34 @@ IceHUD.options =
|
|||||||
step = 1,
|
step = 1,
|
||||||
order = 15
|
order = 15
|
||||||
},
|
},
|
||||||
|
|
||||||
|
bgBlendMode = {
|
||||||
|
type = 'text',
|
||||||
|
name = 'Bar Background Blend Mode',
|
||||||
|
desc = 'IceHUD Bar Background Blend mode',
|
||||||
|
get = function()
|
||||||
|
return IceHUD.IceCore:GetBarBgBlendMode()
|
||||||
|
end,
|
||||||
|
set = function(value)
|
||||||
|
IceHUD.IceCore:SetBarBgBlendMode(value)
|
||||||
|
end,
|
||||||
|
validate = { BLEND = "Blend", ADD = "Additive" }, --"Disable", "Alphakey", "Mod" },
|
||||||
|
order = 16
|
||||||
|
},
|
||||||
|
|
||||||
|
barBlendMode = {
|
||||||
|
type = 'text',
|
||||||
|
name = 'Bar Blend Mode',
|
||||||
|
desc = 'IceHUD Bar Blend mode',
|
||||||
|
get = function()
|
||||||
|
return IceHUD.IceCore:GetBarBlendMode()
|
||||||
|
end,
|
||||||
|
set = function(value)
|
||||||
|
IceHUD.IceCore:SetBarBlendMode(value)
|
||||||
|
end,
|
||||||
|
validate = { BLEND = "Blend", ADD = "Additive" }, --"Disable", "Alphakey", "Mod" },
|
||||||
|
order = 17
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user