mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- Fix for the alpha problem in graphical combo point display (thanks Kurathor)
- Scaling for every bar - Horizontal position adjustment for you dual screen freaks
This commit is contained in:
@ -38,6 +38,7 @@ function IceBarElement.prototype:GetDefaultSettings()
|
|||||||
|
|
||||||
settings["side"] = IceCore.Side.Left
|
settings["side"] = IceCore.Side.Left
|
||||||
settings["offset"] = 1
|
settings["offset"] = 1
|
||||||
|
settings["scale"] = 1
|
||||||
settings["barFontSize"] = 12
|
settings["barFontSize"] = 12
|
||||||
settings["lockTextAlpha"] = true
|
settings["lockTextAlpha"] = true
|
||||||
settings["textVisible"] = {upper = true, lower = true}
|
settings["textVisible"] = {upper = true, lower = true}
|
||||||
@ -99,6 +100,28 @@ function IceBarElement.prototype:GetOptions()
|
|||||||
order = 31
|
order = 31
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts["scale"] =
|
||||||
|
{
|
||||||
|
type = 'range',
|
||||||
|
name = '|c' .. self.configColor .. 'Scale|r',
|
||||||
|
desc = 'Scale of the bar',
|
||||||
|
min = 0.1,
|
||||||
|
max = 2,
|
||||||
|
step = 0.05,
|
||||||
|
isPercent = true,
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.scale
|
||||||
|
end,
|
||||||
|
set = function(value)
|
||||||
|
self.moduleSettings.scale = value
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
order = 32
|
||||||
|
}
|
||||||
|
|
||||||
opts["textSettings"] =
|
opts["textSettings"] =
|
||||||
{
|
{
|
||||||
type = 'group',
|
type = 'group',
|
||||||
|
14
IceCore.lua
14
IceCore.lua
@ -38,6 +38,7 @@ function IceCore.prototype:init()
|
|||||||
local defaults = {
|
local defaults = {
|
||||||
gap = 150,
|
gap = 150,
|
||||||
verticalPos = -110,
|
verticalPos = -110,
|
||||||
|
horizontalPos = 0,
|
||||||
scale = 0.9,
|
scale = 0.9,
|
||||||
|
|
||||||
alphaooc = 0.3,
|
alphaooc = 0.3,
|
||||||
@ -117,7 +118,7 @@ function IceCore.prototype:DrawFrame()
|
|||||||
|
|
||||||
self:SetScale(self.settings.scale)
|
self:SetScale(self.settings.scale)
|
||||||
|
|
||||||
self.IceHUDFrame:SetPoint("CENTER", 0, self.settings.verticalPos)
|
self.IceHUDFrame:SetPoint("CENTER", self.settings.horizontalPos, self.settings.verticalPos)
|
||||||
self.IceHUDFrame:Show()
|
self.IceHUDFrame:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -196,7 +197,16 @@ end
|
|||||||
function IceCore.prototype:SetVerticalPos(value)
|
function IceCore.prototype:SetVerticalPos(value)
|
||||||
self.settings.verticalPos = value
|
self.settings.verticalPos = value
|
||||||
self.IceHUDFrame:ClearAllPoints()
|
self.IceHUDFrame:ClearAllPoints()
|
||||||
self.IceHUDFrame:SetPoint("CENTER", 0, self.settings.verticalPos)
|
self.IceHUDFrame:SetPoint("CENTER", self.settings.horizontalPos, self.settings.verticalPos)
|
||||||
|
end
|
||||||
|
|
||||||
|
function IceCore.prototype:GetHorizontalPos()
|
||||||
|
return self.settings.horizontalPos
|
||||||
|
end
|
||||||
|
function IceCore.prototype:SetHorizontalPos(value)
|
||||||
|
self.settings.horizontalPos = value
|
||||||
|
self.IceHUDFrame:ClearAllPoints()
|
||||||
|
self.IceHUDFrame:SetPoint("CENTER", self.settings.horizontalPos, self.settings.verticalPos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
24
IceHUD.lua
24
IceHUD.lua
@ -31,12 +31,28 @@ IceHUD.options =
|
|||||||
set = function(v)
|
set = function(v)
|
||||||
IceHUD.IceCore:SetVerticalPos(v)
|
IceHUD.IceCore:SetVerticalPos(v)
|
||||||
end,
|
end,
|
||||||
min = -200,
|
min = -400,
|
||||||
max = 200,
|
max = 400,
|
||||||
step = 10,
|
step = 10,
|
||||||
order = 11
|
order = 11
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hpos = {
|
||||||
|
type = 'range',
|
||||||
|
name = 'Horizontal position',
|
||||||
|
desc = 'Horizontal position (for you dual screen freaks)',
|
||||||
|
get = function()
|
||||||
|
return IceHUD.IceCore:GetHorizontalPos()
|
||||||
|
end,
|
||||||
|
set = function(v)
|
||||||
|
IceHUD.IceCore:SetHorizontalPos(v)
|
||||||
|
end,
|
||||||
|
min = -2000,
|
||||||
|
max = 2000,
|
||||||
|
step = 10,
|
||||||
|
order = 12
|
||||||
|
},
|
||||||
|
|
||||||
gap = {
|
gap = {
|
||||||
type = 'range',
|
type = 'range',
|
||||||
name = 'Gap',
|
name = 'Gap',
|
||||||
@ -50,7 +66,7 @@ IceHUD.options =
|
|||||||
min = 50,
|
min = 50,
|
||||||
max = 300,
|
max = 300,
|
||||||
step = 5,
|
step = 5,
|
||||||
order = 12,
|
order = 13,
|
||||||
},
|
},
|
||||||
|
|
||||||
scale = {
|
scale = {
|
||||||
@ -67,7 +83,7 @@ IceHUD.options =
|
|||||||
max = 1.5,
|
max = 1.5,
|
||||||
step = 0.05,
|
step = 0.05,
|
||||||
isPercent = true,
|
isPercent = true,
|
||||||
order = 13,
|
order = 14,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Name: IceHUD
|
## Name: IceHUD
|
||||||
## Title: IceHUD |cff7fff7f -Ace2-|r
|
## Title: IceHUD |cff7fff7f -Ace2-|r
|
||||||
## Notes: Another HUD addon
|
## Notes: Another HUD addon
|
||||||
## Version: 0.9.3 ($Revision$)
|
## Version: 0.9.4 ($Revision$)
|
||||||
## SavedVariables: IceCoreDB
|
## SavedVariables: IceCoreDB
|
||||||
## OptionalDeps: Ace2, GratuityLib, SharedMediaLib, WaterfallLib, MobHealth
|
## OptionalDeps: Ace2, GratuityLib, SharedMediaLib, WaterfallLib, MobHealth
|
||||||
## X-Embeds: Ace2, GratuityLib, SharedMediaLib, WaterfallLib
|
## X-Embeds: Ace2, GratuityLib, SharedMediaLib, WaterfallLib
|
||||||
|
@ -184,7 +184,7 @@ function ComboPoints.prototype:CreateComboFrame()
|
|||||||
-- create combo points
|
-- create combo points
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
if (not self.frame.graphical[i]) then
|
if (not self.frame.graphical[i]) then
|
||||||
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame.graphicalBG[i])
|
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
||||||
self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo")
|
self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo")
|
||||||
end
|
end
|
||||||
self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
|
self.frame.graphical[i]:SetFrameStrata("BACKGROUND")
|
||||||
|
Reference in New Issue
Block a user