diff --git a/loveframes/objects/numberbox.lua b/loveframes/objects/numberbox.lua index 0b3c877..878d940 100644 --- a/loveframes/objects/numberbox.lua +++ b/loveframes/objects/numberbox.lua @@ -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 diff --git a/main.lua b/main.lua index 194fe96..9d8961c 100644 --- a/main.lua +++ b/main.lua @@ -58,7 +58,7 @@ function love.load() :SetValue(0) :SetParent(timeInputs) :SetX(100) - :SetZeroPad(true) + :SetPad(true) local controls = loveframes.Create("collapsiblecategory") :SetPos(column2X, margin) :SetObject(timeInputs)