home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
No Fragments Archive 10: Diskmags
/
nf_archive_10.iso
/
MAGS
/
COMA
/
COMA004.MSA
/
KF_MENU.LST
< prev
next >
Wrap
File List
|
1989-04-05
|
4KB
|
149 lines
' ===============================
' ======= =======
' ======= KF-SOFT =======
' ======= =======
' ======= MENU =======
' ======= =======
' ======= PROGRAM =======
' ======= =======
' ===============================
menue_bar
screen
wait
' ===============================
> PROCEDURE menue_bar
ON MENU GOSUB menue
DIM item$(26)
DO !MENU-ITEMS INTO ARRAY
READ item$(i&)
EXIT IF item$(i&)="-1-1"
INC i&
LOOP
DATA DESK , ABOUT THE PROGRAMM ,---------------,1,2,3,4,5,6,""
DATA REACTION: , OUTBOX OFF , INBOX OFF ,--------------
DATA TIMER ON , TIMER OFF ,""
DATA SHOW: , POSITION , KEYBORD ,""
DATA END , END ,""
DATA "",""
DATA -1-1
RETURN
' ===============================
> PROCEDURE screen
DEFTEXT 1,8,0,10
DEFFILL 2,2,4
PBOX 0,0,639,199
OPENW 0
MENU item$()
MENU 15,2
DEFFILL 1,2,6
BOUNDARY 1
PBOX 20,0,620,150
TEXT 30,33,150,"OUTBOX"
' ==============================
DEFFILL 3,3,3
PBOX 110,50,210,125
TEXT 115,80,"INBOX"
' ==============================
DEFTEXT 1,0,0,6
PRINT AT(3,20);"Scancode of Key : "
PRINT AT(3,21);"ASCII-Code of Key: "
' ==============================
PRINT AT(30,20);"X-Position of the Mauscursor: "
PRINT AT(30,21);"Y-Position of the Mauscursor: "
RETURN
' ===============================
> PROCEDURE wait
DO
IF arr&=1
PRINT AT(58,20);USING "###",MOUSEX
PRINT AT(58,21);USING "###",MOUSEY
ENDIF
ON MENU
LOOP
RETURN
' ===============================
> PROCEDURE menue
e&=MENU(0) !ARRAY-INDEX
i$=item$(e&)
IF i$=" ABOUT THE PROGRAMM "
ALERT 1,"KF-SOFT|SHOWS TO YOU| HOW TO CREAT| A MENU",1," OK ",b&
ELSE IF i$=" INBOX OFF "
item$(e&)=" INBOX ON "
~MENU_TEXT(MENU(-1),MENU(5),item$(e&)+CHR$(0))
ON MENU IBOX 1,110,50+19,100,125 GOSUB inbox
ELSE IF i$=" INBOX ON "
item$(e&)=" INBOX OFF "
~MENU_TEXT(MENU(-1),MENU(5),item$(e&)+CHR$(0))
ON MENU IBOX 1,110,50+19,100,125 GOSUB nothing
ELSE IF i$=" OUTBOX OFF "
item$(e&)=" OUTBOX ON "
~MENU_TEXT(MENU(-1),MENU(5),item$(e&)+CHR$(0))
ON MENU OBOX 2,20,0,600,150 GOSUB outbox
ELSE IF i$=" OUTBOX ON "
item$(e&)=" OUTBOX OFF "
~MENU_TEXT(MENU(-1),MENU(5),item$(e&)+CHR$(0))
ON MENU OBOX 2,20,0,600,150 GOSUB nothing
ELSE IF i$=" TIMER ON "
MENU 15,3 !>TIMER ON< NOT SELECTABLE
MENU 14,2 !>TIMER OFF< SELECTABLE
EVERY 200 GOSUB clock !EVERY SECONDS
ELSE IF i$=" TIMER OFF "
MENU 15,2 !>TIMER OFF< NOT SELECTABLE
MENU 14,3 !>TIMER ON< SELECTABLE
EVERY 1000 GOSUB nothing !CLOCK-CALL STOP
ELSE IF i$=" POSITION "
arr&=arr& XOR 1
IF arr&=1
MENU e&,1
ELSE
MENU e&,0
ENDIF
ELSE IF i$=" KEYBORD "
key&=key& XOR 1
IF key&=1
MENU e&,1
ON MENU KEY GOSUB keybd
ELSE
MENU e&,0
ON MENU KEY GOSUB nothing
ENDIF
ELSE IF i$=" END "
MENU KILL
CLOSEW 0
END
ENDIF
MENU OFF
RETURN
' ===============================
> PROCEDURE inbox
ALERT 3," MOUSECURSOR | IS IN THE| | INBOX !",1," OK ",butt&
RETURN
' ===============================
> PROCEDURE outbox
ALERT 3," MOUSECURSOR | IS BEYOND OF| | THE OUTBOX !",1," OK ",butt&
RETURN
' ===============================
> PROCEDURE clock
IF TIME$=TIME$ AND VAL(RIGHT$(TIME$,1))+1<10
MID$(time$,8)=RIGHT$(STR$(VAL(RIGHT$(TIME$,1))+1),1)
ELSE
TIME$=TIME$
ENDIF
TEXT 220,180,"TIME: "
TEXT 220,180,TIME$
RETURN
' ===============================
> PROCEDURE keybd
EVERY STOP !CLOCK OFF
scan_code&=MENU(14) DIV 256
ascii_code&=MOD(MENU(14),256)
PRINT AT(3,20);"Scancode of Key : ";
PRINT USING "###",scan_code&
PRINT AT(3,21);"ASCII-Code of Key: ";
PRINT USING "###",ascii_code&
EVERY CONT !CLOCK ON AGAIN
RETURN
' ===============================
> PROCEDURE nothing
RETURN