;----------------------------------------------------------- ; ; Api92/Api89 Source Code ; ; (c) NeXO Software, Benoit SCHERRER ; e-mail : p.c.scherrer@wanadoo.fr ; ; ; File> checkbox.xas ; Utility> CheckBox component ; ;----------------------------------------------------------- ;----------------------------------------------------- ; a0.l : Address of a api92CheckBox structure ;----------------------------------------------------- ; 00.b : 1=checked 0=unchecked ; 01.b : Style ; 02.b : X ; 03.b : Y ; 04.x : 0-terminated string ;----------------------------------------------------- apilib@0065: CheckBoxComponent: movem.l d0-d3/a0-a1,-(a7) move.l a0,a1 bsr _GetFontWidthHeight move.w d1,d3 ;font height subq.w #5,d3 lsr.w #1,d3 clr.w d1 clr.w d0 ;clear d0 lea gfx_CheckBoxes(PC),a0 move.b (a1)+,d0 mulu.w #5,d0 adda.w d0,a0 move.b (a1)+,d0 ;img index mulu.w #5*2,d0 adda.w d0,a0 move.b (a1)+,d0 move.b (a1)+,d1 add.w d3,d1 moveq.w #4,d2 bsr _draw_GFX8xn sub.w d3,d1 addq.w #7,d0 ;x+7 bsr _draw_StringSpecial movem.l (a7)+,d0-d3/a0-a1 rts