mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- add text offset sliders to MirrorBar's text settings
This commit is contained in:
@ -309,6 +309,44 @@ function MirrorBarHandler.prototype:GetOptions()
|
|||||||
end,
|
end,
|
||||||
order = 15
|
order = 15
|
||||||
},
|
},
|
||||||
|
|
||||||
|
textVerticalOffset = {
|
||||||
|
type = 'range',
|
||||||
|
name = '|c' .. self.configColor .. 'Text Vertical Offset|r',
|
||||||
|
desc = 'Offset of the text from the bar vertically (negative is farther below)',
|
||||||
|
min = -250,
|
||||||
|
max = 350,
|
||||||
|
step = 1,
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.textVerticalOffset
|
||||||
|
end,
|
||||||
|
set = function(v)
|
||||||
|
self.moduleSettings.textVerticalOffset = v
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
textHorizontalOffset = {
|
||||||
|
type = 'range',
|
||||||
|
name = '|c' .. self.configColor .. 'Text Horizontal Offset|r',
|
||||||
|
desc = 'Offset of the text from the bar horizontally',
|
||||||
|
min = -50,
|
||||||
|
max = 50,
|
||||||
|
step = 1,
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.textHorizontalOffset
|
||||||
|
end,
|
||||||
|
set = function(v)
|
||||||
|
self.moduleSettings.textHorizontalOffset = v
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,6 +445,8 @@ function MirrorBarHandler.prototype:SetSettings(bar)
|
|||||||
bar.moduleSettings.lockTextAlpha = self.moduleSettings.lockTextAlpha
|
bar.moduleSettings.lockTextAlpha = self.moduleSettings.lockTextAlpha
|
||||||
bar.moduleSettings.textVisible = self.moduleSettings.textVisible
|
bar.moduleSettings.textVisible = self.moduleSettings.textVisible
|
||||||
bar.moduleSettings.scale = self.moduleSettings.scale
|
bar.moduleSettings.scale = self.moduleSettings.scale
|
||||||
|
bar.moduleSettings.textVerticalOffset = self.moduleSettings.textVerticalOffset
|
||||||
|
bar.moduleSettings.textHorizontalOffset = self.moduleSettings.textHorizontalOffset
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user