#module
#deffunc winddmove int, int, int, int
mref left, 0 : mref top, 1 : mref right, 2 : mref bottom, 3
i = mousex, mousey
if i >= left & (i <= right) & (i.1 >= top) & (i.1 <= bottom) {
if dir < 0 : i = 0XF000 : else : if dir > 8 : i = 0xF008 : else : i = 0xF000 + dir
objsend -28, 0x0112, 0xF011, nonuse
}
return
#global
screen 0, 400, 400
r = 20, 20, 380, 380
color 240, 240, 240 : boxf r.0, r.1, r.2, r.3 : color
pos r.0 + 10, r.1 + 10 : mes "色付きエリア内をドラッグしてください"
repeat
wait 1
stick key, , 1
if key & 256 = 0 : continue
winddmove r.0, r.1, r.2, r.3
loop
|