From 2e2d63dfd75fb93106c54ce7fc6c3a6bb280c360 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Fri, 19 Apr 2024 12:50:58 -0600 Subject: [PATCH] Rename ZeroPad to just Pad --- loveframes/objects/numberbox.lua | 16 ++++++++-------- main.lua | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) 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)