' The buttons are all used on screen, except for the big file-selector
' box, and the one above the comment. The up and down gadgets on the box also
' press.
' CLICK and _UNCLICK are the procedures which draw the different buttons.
' BUT[Min zone,Max zone] waits for a button to be pressed within the 2 variables
' and draws any action, then exits with the button no. in ZNE.
' Follow the source through for more details.
' If you compile the program, the drawing of the font is speeded up 100%.
Dim FX(60),FXX(60),A(100),B(100),C(100),D(100),TX(100),TY(100),TX$(100)
Dim _MODLIST$(200)
Global J$,TEXY,TEXX,BUTTON,A(),B(),C(),D(),POSY,POSX,FX(),FXX()
Global ZNE,TEX$,TX(),TY(),TX$(),TEMP,MN,MX,OX
Global RY,A$,F$,MN$,H$,BUTTON,VAR,_SCREEN
Proc PREPFONT
Unpack 4 To 0 : Reserve Zone 100
Unpack 5 To 7 : Screen Hide 7 : Screen 0
Proc PREPSCREEN
Proc MAIN
Procedure _UNCLICK[VAR]
Ink 0 : Draw A(BUTTON),B(BUTTON) To C(BUTTON),B(BUTTON) : Draw C(BUTTON),B(BUTTON) To C(BUTTON),D(BUTTON)
Ink 2 : Draw A(BUTTON),B(BUTTON) To A(BUTTON),D(BUTTON) : Draw A(BUTTON),D(BUTTON) To C(BUTTON),D(BUTTON)
If VAR=1
Set Zone ZNE,A(BUTTON),B(BUTTON) To C(BUTTON),D(BUTTON) : Inc ZNE
End If
End Proc
Procedure _CLICK[VAR]
Ink 2 : Draw A(BUTTON),B(BUTTON) To C(BUTTON),B(BUTTON) : Draw C(BUTTON),B(BUTTON) To C(BUTTON),D(BUTTON)
Ink 0 : Draw A(BUTTON),B(BUTTON) To A(BUTTON),D(BUTTON) : Draw A(BUTTON),D(BUTTON) To C(BUTTON),D(BUTTON)
If VAR=1
Set Zone ZNE,A(BUTTON),B(BUTTON) To C(BUTTON),D(BUTTON) : Inc ZNE
End If
End Proc
Procedure PREPSCREEN
Screen 0
Cls 15,0,0 To 320,162 : ZNE=1
DAT:
Data "load mod",12,6,57,15,19,8,"replay mod",12,17,57,26,15,19,"clear mod",12,28,57,37,17,30
Data "stop mod",12,39,57,48,19,41,"mod info",12,50,57,59,19,52,"delete file",12,61,57,70,13,63
Data "screensaver",12,83,57,92,13,85,"online help",12,105,57,114,13,107,"load list",60,6,105,15,66,8,"save list",60,17,105,26,65,19
Data "clear list",60,28,105,37,63,30,"add to list",60,39,105,48,61,41,"remove",60,50,105,59,71,52,"play track",60,61,105,70,63,63
Data "next track",60,72,105,81,63,74,"prev track",60,83,105,92,63,85,"last track",60,94,105,103,63,97,"first track",60,105,105,114,61,107
Data "preferences",108,6,153,15,109,8,"load prefs",108,17,153,26,111,19,"save prefs",108,28,153,37,111,30,"default",108,39,153,48,117,41
Data "screenshot",108,50,153,59,111,52,"iconify",108,61,153,70,116,63,"quit",108,72,153,81,123,74,"about",108,94,153,103,121,96
Data "register",108,105,153,114,115,107,"other games",108,116,153,125,109,118,"features",108,127,153,136,115,129," ",0,0,4,4,0,0,"just what the hell am i doing?",5,152,313,160,6,145
DAT2:
Data 1,168,5,176,13,2,168,15,176,127,1,168,129,176,137,2,181,5,312,137,2,181,140,313,148
For N=1 To 5 : Read TYPE,A(100),B(100),C(100),D(100) : Cls 15,A(BUTTON),B(BUTTON) To C(BUTTON),D(BUTTON) : If TYPE=1 : Proc _CLICK[0] : End If : If TYPE=2 : Proc _UNCLICK[0] : End If : Next N
DAT3:
Data 168,5,176,13,0,0
Data 168,129,176,137,0,0
Data 181,140,313,148,183,142
Restore DAT3
For BUTTON=47 To 49 : Read A(BUTTON),B(BUTTON),C(BUTTON),D(BUTTON),TX(BUTTON),TY(BUTTON) : Next BUTTON
End Proc
Procedure PREPFONT
Restore DAT : For N=1 To 55 : Read A : FX(N)=A : FXX(N)=A+3 : Next N