fix keyboard movement of Panel widgets

develop
Myk Taylor 2022-12-30 04:40:50 -08:00
parent 6871bc20c4
commit 3a76fc086f
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

@ -363,8 +363,10 @@ function Panel:setKeyboardDragEnabled(enabled)
return
end
if enabled then
local kbd_get_pos = function() return {x=0, y=0} end
Panel_begin_drag(self, kbd_get_pos())
local kbd_get_pos = function()
return {x=self.frame_rect.x1, y=self.frame_rect.y1}
end
Panel_begin_drag(self)
self.kbd_get_pos = kbd_get_pos
else
Panel_end_drag(self)