init start
local exampleHud = HUD:new({
uniqueId = 'example-id',
draggable = true,
savePosition = true,
dragEvent = IEVENT_LMOUSEDOWN,
dragStopEvent = IEVENT_LMOUSEUP,
startPosition = Point:new($worldwin.left, $worldwin.top),
posRelativeTo = function() return Point:new($worldwin.left, $worldwin.top) end
})
exampleHud:bootstrap()
function inputevents(e)
exampleHud:handleInput(e)
end
setfontstyle('Tahoma', 26)
setfillstyle('color', color(0, 0, 0, 50))
init end
exampleHud:run()
addshape('roundrect', 0, 0, 150, 150, 5, 5)
addtext('Drag Me!', 5, 52)