Small Fix
- Fixed BaseFrame & Frames not setting correct cursor position, when there is a offset
This commit is contained in:
@@ -174,12 +174,13 @@ return function(name, basalt)
|
||||
|
||||
setCursor = function(self, _blink, _xCursor, _yCursor, color)
|
||||
local obx, oby = self:getAbsolutePosition()
|
||||
local xO, yO = self:getOffset()
|
||||
cursorBlink = _blink or false
|
||||
if (_xCursor ~= nil) then
|
||||
xCursor = obx + _xCursor - 1
|
||||
xCursor = obx + _xCursor - 1 - xO
|
||||
end
|
||||
if (_yCursor ~= nil) then
|
||||
yCursor = oby + _yCursor - 1
|
||||
yCursor = oby + _yCursor - 1 - yO
|
||||
end
|
||||
cursorColor = color or cursorColor
|
||||
if (cursorBlink) then
|
||||
|
||||
@@ -81,7 +81,8 @@ return function(name, basalt)
|
||||
|
||||
setCursor = function(self, blink, x, y, color)
|
||||
local obx, oby = self:getPosition()
|
||||
parent:setCursor(blink or false, (x or 0)+obx-1, (y or 0)+oby-1, color or colors.white)
|
||||
local xO, yO = self:getOffset()
|
||||
parent:setCursor(blink or false, (x or 0)+obx-1 - xO, (y or 0)+oby-1 - yO, color or colors.white)
|
||||
return self
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ return function(name, basalt)
|
||||
|
||||
local defaultText = ""
|
||||
local defaultBGCol = colors.black
|
||||
local defaultFGCol = colors.white
|
||||
local defaultFGCol = colors.lightGray
|
||||
local showingText = defaultText
|
||||
local internalValueChange = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user