example changes and cursor bugfix

This commit is contained in:
Robert Jelic
2022-08-26 21:13:19 +02:00
parent b637e65983
commit b6c5531290
7 changed files with 40 additions and 29 deletions

View File

@@ -332,6 +332,9 @@ return function(name)
self.parent:writeText(obx, oby + (n - 1), text, bCol, fCol)
end
end
if(self:isFocused())then
self.parent:setCursor(true, obx + textX - wIndex, oby+math.max(math.ceil(self:getHeight()/2-1, 1)), self.fgColor)
end
end
end
end,

View File

@@ -596,6 +596,10 @@ return function(name)
self.parent:setBG(obx, oby + n - 1, bg)
self.parent:setFG(obx, oby + n - 1, fg)
end
if(self:isFocused())then
local anchx, anchy = self:getAnchorPosition()
self.parent:setCursor(true, anchx + textX - wIndex, anchy + textY - hIndex, self.fgColor)
end
end
end
end,