docu This Library contains graphics related routines, fonts, buttons docu 2 fonts available, sizes 8x13 and 9x17 docu variable gui.nc sets number of clickable areas docu ClickedOnArea determines where was clicked docu Routine button, Shows a button docu Routine Tag, draws Text using included Fonts docu send bugs or comments to herman_blues@geocities.com dim Font$(3,126),Fonth(3),Fontw(3),Fontf(3) for f=1 to 2 read Fontf(f) for i=32 to 126 read S$, Font$(f,i) next i next f Fonth(1)=13 Fontw(1)=8 Fonth(2)=17 Fontw(2)=9 if nc=0 nc=3 dim HotX(nc),HotY(nc),HotW(nc),HotH(nc), buf$(nc) export sub button(event$,x,y, siz, text$ ) local sx,sy,n,l,indx,indy,fonth,fontw,i,tmp indx=4:indy=4 fonth=gui.Fonth(siz) fontw=gui.Fontw(siz) l=len(text$) sx=fontw*l+2*indx sy=fonth+2*indy box x,y,x+sx,y+sy for i=1 to len(text$) tmp=asc(mid$(text$,i,1)) bitblit gui.Font$(siz,tmp) to x+fontw*(i-1)+indx,y+indy next i rem text x+indx,y+sy-indy, text$ if event$="show" then n=AddClickArea(x,y,sx,sy) buf$(n)=bitblit$( HotX(n), HotY(n), HotX(n)+HotW(n), HotY(n)+HotH(n) ) fi return n end sub export sub AddClickArea(x,y,sx,sy) static last last=last+1 HotX(last)=x HotY(last)=y HotW(last)=sx HotH(last)=sy return last end sub rem Check if clicked inside some Clickable Area export sub ClickedOnArea(click$,nb) local x,y, pb, bn, cx,cy, brx,bry pb=0 x=mousex(click$) y=mousey(click$) rem print "\n Mouse Button ",mouseb(a$)," at ",x,y for bn=1 to nb cx=HotX(bn) : cy=HotY(bn) brx=HotX(bn)+HotW(bn) bry=HotY(bn)+HotH(bn) if( (xcx) and (ycy)) pb=bn next bn return pb end sub rem this Draws Text on screen at x,y with font siz, returns last pixel export sub Tag(x,y,siz,spaces,text$) local sx,sy,n,l,indx,indy,fonth,fontw,fontf,i,tmp indx=4:indy=4 fonth=Fonth(siz) : fontw=Fontw(siz) : fontf=Fontf(siz) l=len(text$) sx=fontw*l+2*indx sy=fonth+2*indy for i=1 to l tmp=asc(mid$(text$,i,1)) bitblit Font$(siz,tmp) to x+fontw*(i-1)+indx,y-fonth+fontf+indy next i return (x+sx) end sub rem Data blits for Fonts data 2 data " ", "8,13:00000000000000000000000000" data "!", "8,13:00010101010101010001010000" data "\"", "8,13:00828282820000000000000000" data "#", "8,13:00424242e7424242e742424200" data "$", "8,13:01834541418103050545830100" data "%", "8,13:000040a0a44201844a0a040000" data "&", "8,13:0000c3202040c0292626c90000" data "'", "8,13:00030180000000000000000000" data "(", "8,13:00020101808080808001010200" data ")", "8,13:00800101020202020201018000" data "*", "8,13:00000001016d83018244000000" data "+", "8,13:000000010101ef010101000000" data ",", "8,13:00000000000000000081818040" data "-", "8,13:000000000000ef000000000000" data ".", "8,13:00000000000000000081810000" data "/", "8,13:04040202010180804040202000" data "0", "8,13:00c32424242424242424c30000" data "1", "8,13:00018101010101010101010000" data "2", "8,13:00c32404040201804020e70000" data "3", "8,13:00c32404048304040424c30000" data "4", "8,13:0003038282424222e702070000" data "5", "8,13:00e7202020e304040424c30000" data "6", "8,13:0083402020e324242424c30000" data "7", "8,13:00e72404020201018080800000" data "8", "8,13:00c3242424c324242424c30000" data "9", "8,13:00c324242424c7040402c10000" data ":", "8,13:00000000818100000081810000" data ";", "8,13:00000000818100000081818040" data "<", "8,13:00000008068160810608000000" data "=", "8,13:0000000000ef0000ef00000000" data ">", "8,13:00000020c0030c03c020000000" data "?", "8,13:00c72808040201010001010000" data "@", "8,13:000000834429aaaa2540870000" data "A", "8,13:00000101838282c744446c0000" data "B", "8,13:0000e7282828e7282828e70000" data "C", "8,13:00008748202020202048870000" data "D", "8,13:0000e324282828282824e30000" data "E", "8,13:0000ef202020e3202020ef0000" data "F", "8,13:0000ef202020e3202020200000" data "G", "8,13:000087482020202e28488f0000" data "H", "8,13:000028282828ef282828280000" data "I", "8,13:0000c701010101010101c70000" data "J", "8,13:00000704040404042424c30000" data "K", "8,13:0000242221a060a02122240000" data "L", "8,13:00002020202020202020e70000" data "M", "8,13:000028286c6caaaa2929280000" data "N", "8,13:0000282868a8292a2c28280000" data "O", "8,13:00008344282828282844830000" data "P", "8,13:0000e7282828e7202020200000" data "Q", "8,13:00008344282828282844834906" data "R", "8,13:0000e7282828e7212224280000" data "S", "8,13:0000c7282020c7080828c70000" data "T", "8,13:0000ef01010101010101010000" data "U", "8,13:00002828282828282828c70000" data "V", "8,13:00002828284444828201010000" data "W", "8,13:000028282929aaaa6c6c280000" data "X", "8,13:00002828448201824428280000" data "Y", "8,13:00002828448201010101010000" data "Z", "8,13:0000ef08040201804020ef0000" data "[", "8,13:00838080808080808080808300" data "\\", "8,13:20204040808001010202040400" data "]", "8,13:00830202020202020202028300" data "^", "8,13:01824428000000000000000000" data "_", "8,13:000000000000000000000000ef" data "`", "8,13:00810102000000000000000000" data "a", "8,13:00000000cf282828282ccb0000" data "b", "8,13:00202020e72828282828e70000" data "c", "8,13:00000000c72020202020c70000" data "d", "8,13:00080808cf2828282828cf0000" data "e", "8,13:00000000c72828ef2020c70000" data "f", "8,13:000f8080c38080808080800000" data "g", "8,13:00000000cf2828282828cf08c7" data "h", "8,13:00202020e72828282828280000" data "i", "8,13:00010100c10101010101c70000" data "j", "8,13:000404008704040404040404c3" data "k", "8,13:00202020242221e02122240000" data "l", "8,13:00c10101010101010101c70000" data "m", "8,13:00000000e62929292928280000" data "n", "8,13:00000000a76828282828280000" data "o", "8,13:00000000c72828282828c70000" data "p", "8,13:00000000e72828282828e72020" data "q", "8,13:00000000cf2828282828cf0808" data "r", "8,13:00000000a76020202020200000" data "s", "8,13:00000000c72020c30404e30000" data "t", "8,13:00808080e78080808080070000" data "u", "8,13:0000000028282828282ccb0000" data "v", "8,13:000000006c4444828201010000" data "w", "8,13:00000000282829292929c60000" data "x", "8,13:00000000284482018244280000" data "y", "8,13:00000000282828282828cf08c7" data "z", "8,13:00000000ef0402018040ef0000" data "{", "8,13:00020101010180010101010200" data "|", "8,13:00010101010101010101010100" data "}", "8,13:00800101010102010101018000" data "~", "8,13:00c82926000000000000000000" data 4 data " ", "10,17:0000000000000000000000000000000000000000000" data "!", "10,17:030c0030c0030c0030c0030c0000c00300000000000" data "\"", "10,17:cc033cc021000000000000000000000000000000000" data "#", "10,17:000c60b1c6cf3638d063ef1b1c60b10000000000000" data "$", "10,17:030f36b9d0638d0cf0c60b1c66b1f30300000000000" data "%", "10,17:000766b9d3cd081060c003067873bdcc10000000000" data "&", "10,17:830b1c60b1c3060c18d066b176c8b7c330000000000" data "'", "10,17:0f0c181000000000000000000000000000000000000" data "(", "10,17:0c081030c08106081060810c0030810c00000000000" data ")", "10,17:c0060030c00608106081060c003060c000000000000" data "*", "10,17:0000000033cc0e1ef1e1cc033000000000000000000" data "+", "10,17:00000000c0030c0ef1c0030c0000000000000000000" data ",", "10,17:0000000000000000000000000000c10706000000000" data "-", "10,17:000000000000000ef10000000000000000000000000" data ".", "10,17:0000000000000000000000000070c10700000000000" data "/", "10,17:00006081030c081060c00306081030c000000000000" data "0", "10,17:030e1cc033689166891668133cc0e10300000000000" data "1", "10,17:030e0c38d0030c0030c0030c0030c0ef10000000000" data "2", "10,17:8703368916081060c0c18103060810ef10000000000" data "3", "10,17:8703368916081030700308916681338700000000000" data "4", "10,17:080030e0c38d0336c813ef1030c0030c00000000000" data "5", "10,17:ef91060810608d1ec00608106681338700000000000" data "6", "10,17:8703368810608d1ec81668916681338700000000000" data "7", "10,17:ef106081030c081060c00306081030c000000000000" data "8", "10,17:8703368916681338703368916681338700000000000" data "9", "10,17:870336891668916cc1e608106481338700000000000" data ":", "10,17:00000000c10700000000000c1070000000000000000" data ";", "10,17:00000000c10700000000000c1070e00000000000000" data "<", "10,17:08003060c08103060030810c0060030800000000000" data "=", "10,17:0000000000ef10000000008f7000000000000000000" data ">", "10,17:40030810c00600308103060c0810304000000000000" data "?", "10,17:870336891668103060c0030c0000c00300000000000" data "@", "10,17:87033689976f9d66b9d66f891600368f00000000000" data "A", "10,17:030e1cc03368916689f768916689166810000000000" data "B", "10,17:e38916c8136c891e78136891668913e700000000000" data "C", "10,17:8703368910608106081060810681338700000000000" data "D", "10,17:e78136891668916689166891668913e700000000000" data "E", "10,17:ef9106081060810e78106081060810ef10000000000" data "F", "10,17:ef9106081060810e781060810608106000000000000" data "G", "10,17:8703368910608106e91668916681378710000000000" data "H", "10,17:689166891668916ef91668916689166810000000000" data "I", "10,17:ef1c0030c0030c0030c0030c0030c0ef10000000000" data "J", "10,17:0f10608106081060810608916681338700000000000" data "K", "10,17:689166c81366891e3891668136c8166810000000000" data "L", "10,17:608106081060810608106081060810ef10000000000" data "M", "10,17:68916ec937ef9d66b9d66b916689166810000000000" data "N", "10,17:68936e8976e99d66b9976e9176c9166810000000000" data "O", "10,17:8703368916689166891668916681338700000000000" data "P", "10,17:e781368916689166c8f160810608106000000000000" data "Q", "10,17:87033689166891668916689d66e1338f00600000000" data "R", "10,17:e781368916689166c8f1668136c8166810000000000" data "S", "10,17:8703368910600308700308106681338700000000000" data "T", "10,17:ef1c0030c0030c0030c0030c0030c00300000000000" data "U", "10,17:6891668916689166891668916681338700000000000" data "V", "10,17:6891668916cc033cc0e1870e1030c00300000000000" data "W", "10,17:6891668916689d66b9d66b937ec9166810000000000" data "X", "10,17:68916cc033870e1030e187033cc8166810000000000" data "Y", "10,17:68916cc033870e1030c0030c0030c00300000000000" data "Z", "10,17:ef1060810306081030608103060810ef10000000000" data "[", "10,17:cf030c0030c0030c0030c0030c0030cf00000000000" data "\\", "10,17:00030c0060810c003081060030c0060810000000000" data "]", "10,17:cf0030c0030c0030c0030c0030c003cf00000000000" data "^", "10,17:030e1cc816000000000000000000000000000000000" data "_", "10,17:000000000000000000000000000000008ff00000000" data "`", "10,17:c30e006000000000000000000000000000000000000" data "a", "10,17:0000000000000e3c8106cf91668916c710000000000" data "b", "10,17:6081060810608d1ec81668916689336700000000000" data "c", "10,17:0000000000000e3c891060810600368f00000000000" data "d", "10,17:0810608106081e6cc91668916681378b10000000000" data "e", "10,17:0000000000000e1cc816ef910600368f00000000000" data "f", "10,17:0f0668916081060818f181060810608100000000000" data "g", "10,17:0000000000000f56c9136c813c7810cf81668916cf0" data "h", "10,17:6081060810608d1ec81668916689166810000000000" data "i", "10,17:00000030c0000f0030c0030c0030c0ef10000000000" data "j", "10,17:00000081060008708106081060810608136c81368f0" data "k", "10,17:608106081060813668d0e18f0668136810000000000" data "l", "10,17:c30c0030c0030c0030c0030c0030c0ef10000000000" data "m", "10,17:000000000000863ef9d66b9d66b9d66b10000000000" data "n", "10,17:0000000000008d1ec81668916689166810000000000" data "o", "10,17:0000000000000e1cc81668916681338700000000000" data "p", "10,17:0000000000008d1ec81668916689336781060810600" data "q", "10,17:0000000000000e6cc91668916681378b10608106081" data "r", "10,17:0000000000008d3c9130c0030c0030c000000000000" data "s", "10,17:0000000000000f368910cf00608916cf00000000000" data "t", "10,17:0000081060818f18106081060810660f00000000000" data "u", "10,17:0000000000008166891668916681378b10000000000" data "v", "10,17:00000000000081668133cc0e1870c00300000000000" data "w", "10,17:000000000000816689166b9d66b9f7cc00000000000" data "x", "10,17:000000000000816cc0e1030c0870336810000000000" data "y", "10,17:0000000000008166891668916681378b10668133870" data "z", "10,17:0000000000000f708103060c081030cf10000000000" data "{", "10,17:0e1c0030c0030c0e10c0030c0030c00e10000000000" data "|", "10,17:030c0030c0030c0030c0030c0030c00300000000000" data "}", "10,17:e10c0030c0030c00e1c0030c0030c0e100000000000" data "~", "10,17:c99d66e000000000000000000000000000000000000"