Skip to content

Commit a329154

Browse files
committed
small input fixed
Used the old way of receiving x position
1 parent 0503aa1 commit a329154

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Basalt/objects/Input.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ return function(name)
180180
local val = tostring(base.getValue())
181181
local cursorX = (textX <= val:len() and textX - 1 or val:len()) - (wIndex - 1)
182182

183-
if (cursorX > self.x + w - 1) then
184-
cursorX = self.x + w - 1
183+
local inpX = self:getX()
184+
if (cursorX > inpX + w - 1) then
185+
cursorX = inpX + w - 1
185186
end
186187
if (self.parent ~= nil) then
187188
self.parent:setCursor(true, obx + cursorX, oby+math.max(math.ceil(h/2-1, 1)), self.fgColor)

0 commit comments

Comments
 (0)