small input fixed
Used the old way of receiving x position
This commit is contained in:
@@ -180,8 +180,9 @@ return function(name)
|
|||||||
local val = tostring(base.getValue())
|
local val = tostring(base.getValue())
|
||||||
local cursorX = (textX <= val:len() and textX - 1 or val:len()) - (wIndex - 1)
|
local cursorX = (textX <= val:len() and textX - 1 or val:len()) - (wIndex - 1)
|
||||||
|
|
||||||
if (cursorX > self.x + w - 1) then
|
local inpX = self:getX()
|
||||||
cursorX = self.x + w - 1
|
if (cursorX > inpX + w - 1) then
|
||||||
|
cursorX = inpX + w - 1
|
||||||
end
|
end
|
||||||
if (self.parent ~= nil) then
|
if (self.parent ~= nil) then
|
||||||
self.parent:setCursor(true, obx + cursorX, oby+math.max(math.ceil(h/2-1, 1)), self.fgColor)
|
self.parent:setCursor(true, obx + cursorX, oby+math.max(math.ceil(h/2-1, 1)), self.fgColor)
|
||||||
|
|||||||
Reference in New Issue
Block a user