Rename ZeroPad to just Pad
This commit is contained in:
parent
293b31d39a
commit
2e2d63dfd7
@ -28,7 +28,7 @@ function newobject:initialize()
|
||||
self.internal = false
|
||||
self.canmodify = false
|
||||
self.lastbuttonclicked = false
|
||||
self.zeropad = false
|
||||
self.pad = false
|
||||
self.internals = {}
|
||||
self.OnValueChanged = nil
|
||||
|
||||
@ -148,7 +148,7 @@ end
|
||||
function newobject:updateinput()
|
||||
|
||||
local value = self.value
|
||||
if self.zeropad then
|
||||
if self.pad then
|
||||
local maxabs = math.max(math.abs(self.min), math.abs(self.max))
|
||||
-- A range from 0 to 0 would be unusual, but it would break the math.
|
||||
if maxabs == 0 then maxabs = 1 end
|
||||
@ -500,26 +500,26 @@ function newobject:GetDecimals()
|
||||
end
|
||||
|
||||
--[[---------------------------------------------------------
|
||||
- func: SetZeroPad(decimals)
|
||||
- func: SetPad(decimals)
|
||||
- desc: sets whether to pad the object's value
|
||||
with zeroes
|
||||
--]]---------------------------------------------------------
|
||||
function newobject:SetZeroPad(zeropad)
|
||||
function newobject:SetPad(pad)
|
||||
|
||||
self.zeropad = zeropad
|
||||
self.pad = pad
|
||||
self:updateinput()
|
||||
return self
|
||||
|
||||
end
|
||||
|
||||
--[[---------------------------------------------------------
|
||||
- func: GetZeroPad()
|
||||
- func: GetPad()
|
||||
- desc: gets whether to pad the object's value
|
||||
with zeroes
|
||||
--]]---------------------------------------------------------
|
||||
function newobject:GetZeroPad()
|
||||
function newobject:GetPad()
|
||||
|
||||
return self.zeropad
|
||||
return self.pad
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user