#module
#deffunc winstretch int, int, int, int, int
mref dir, 0 : mref left, 1 : mref top, 2 : mref right, 3 : mref bottom, 4
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, i, nonuse
}
return
#global
screen 2, dispx, dispy, , , , 400, 400
title "色付きエリア内、または外枠のみ伸縮処理可能"
r = 10, 10, winx - 10, winy - 10
color 240, 240, 240
boxf r.0, r.1, r.2, r.3
color 255
line 50, 50, 350, 350
line 50, 50, 50, 100 : line 50, 50, 100, 50
line 350, 350, 300, 350 : line 350, 350, 350, 300
color , , 255
pos 20, 20 : mes "縮める"
pos 340, 360 : mes "伸ばす"
repeat
wait 1
stick key, , 1
if key & 256 = 0 : continue
winstretch 8, r.0, r.1, r.2, r.3
loop
|