
current version: foo_looks 2.0 (public beta)
credits: danZ
allows a hotspot to be dragged around while the right mouse button is held down.
lua freeMove
moving = false
clickOffset = { x=0, y=0 }
function onrightbuttondown(this)
moving = true
local rect = look_getRect(this)
clickOffset.x = look_mouseX() - rect.x
clickOffset.y = look_mouseY() - rect.y
end
function onrightbuttonup(this)
moving = false
end
function onupdate(this)
if (moving == true) then
local rect = look_getRect(this)
rect.x = look_mouseX() - clickOffset.x
rect.y = look_mouseY() - clickOffset.y
look_setRect(this, rect)
end
end
endlua
credits: tk32
allows a hotspot to toggle AlbumArt display (can be set to any hotspot). when the skin is first loaded, albumart is turned on or off according to a preset 'x'
lua toggleAlbumArt x = 1 function onleftbuttonup(this) look_setVisible(albumart, not look_getVisible(albumart)) end function onattach(this) if (x == 0) then look_setVisible(albumart,false) elseif (x == 1) then look_setVisible(albumart,true) end end endlua