The arrows were created with 2 new tools that allow compact code, easy quality object design, and in program image code.
* no need to share a image link* (forum friendly image sharing)
PROCLR(x,y,w):REM (x,y,width) locates a horizontal line at x,y that extends evenly from a center point
PROCUD(x,y,w):REM (x,y,width) locates a vertical line at x,y that extends evenly from a center point
I hope this makes it easier for people to create custom interface objects in BBCSDL and BBC4W.
Code: Select all
MODE 8
REM (x,y,color)
PROCarrowup(500,500,14)
PROCarrowdown(500,450,13)
PROCarrowleft(450,475,12)
PROCarrowright(550,475,11)
END
DEFPROCarrowleft(x,y,c)
LOCAL ax,aw
GCOL c
FOR ax=1 TO 20
PROCUD(x-ax,y,10)
NEXT ax
ax=0:aw=20
FOR ax=1 TO 20
PROCUD(x-20-ax,y,aw)
aw=aw-1
NEXT ax
ENDPROC
DEFPROCarrowright(x,y,c)
LOCAL ax,aw
GCOL c
FOR ax=1 TO 20
PROCUD(x+ax,y,10)
NEXT ax
ax=0:aw=20
FOR ax=1 TO 20
PROCUD(x+20+ax,y,aw)
aw=aw-1
NEXT ax
ENDPROC
DEFPROCarrowup(x,y,c)
LOCAL ax,aw
GCOL c
FOR ax=1 TO 20
PROCLR(x,y+ax,10)
NEXT ax
ax=0:aw=20
FOR ax=1 TO 20
PROCLR(x,y+20+ax,aw)
aw=aw-1
NEXT ax
ENDPROC
DEFPROCarrowdown(x,y,c)
LOCAL ax,aw
GCOL c
FOR ax=1 TO 20
PROCLR(x,y-ax,10)
NEXT ax
ax=0:aw=20
FOR ax=1 TO 20
PROCLR(x,y-20-ax,aw)
aw=aw-1
NEXT ax
ENDPROC
REM Left and Right from center x,y, and width w
DEFPROCLR(x,y,w)
LINE x-w,y,x+w,y
ENDPROC
DEFPROCUD(x,y,w)
LINE x,y+w,x,y-w
ENDPROC