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 return
end end
if enabled then if enabled then
local kbd_get_pos = function() return {x=0, y=0} end local kbd_get_pos = function()
Panel_begin_drag(self, kbd_get_pos()) return {x=self.frame_rect.x1, y=self.frame_rect.y1}
end
Panel_begin_drag(self)
self.kbd_get_pos = kbd_get_pos self.kbd_get_pos = kbd_get_pos
else else
Panel_end_drag(self) Panel_end_drag(self)