home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zodiac Super OZ
/
MEDIADEPOT.ISO
/
FILES
/
13
/
N_B_V203.ZIP
/
DRAWTBOX.DMO
< prev
next >
Wrap
Text File
|
1996-07-04
|
4KB
|
71 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME DRAWTBOX.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NBT1.INC"
SCREEN 0,,0,0 ' just to make sure
WIDTH 80,25
CLS '
VIDEOsetup ' gotta set-up the environment
? "┌────────────────────────────────────────────────────────────────────────
? "│ TBoxDRAW ( Row?, Col?, Rows?, Cols?, Border%, Attr? )
? "├─────────────────────────────────────────────────────────────────────────────
? "│ Draws 12 different box styles to an area of the screen in Attr? color.
? "│ SEE the help screen for the different box styles associated with Border%
? "└─────────────────────────────────────────────────────────────────────────────
Row? = 7 : Col? = 1 : A? = 0 ' border 0 is "no border"
FOR Brdr% = 1 TO 9 ' watch the action as the bottom
INCR A? ' new attribute
TBoxDRAW Row?, Col?, 10, 20, Brdr%, A? ' of the screen is reached
Tprint Row?+1,Col?+1, str$(Brdr%), 15 '
INCR Col?, 5 '
INCR Row?, 1 '
NEXT '
TBoxDRAW Row?+2, Col?, 8, 20, 177, A? ' use any ASCII character
Tprint Row?+3, Col?+2, "ASCII BORDERS", 15 ' > CHR$(13) too!
'
TBoxDRAW 6, 51, 5, 13, 10, 7 ' #10 & #11 make pull-down
Tprint 8, 53, "Border 10", 0
TBoxDRAW 6, 65, 5, 13, 11, 7 ' menu boxes
Tprint 8, 67, "Border 11", 0
'
TBoxDRAW 24, 2, 2, 27, 12, 9 ' #12 makes a good shadow
Tprint 24, 1," PRESS <ƒSPACE> TO CONTINUE ", 27 '
SCREEN 0,,1,0 ' Apage now #1
CLS
? "┌────────────────────────────────────────────────────────────────────────
? "│ SetTBorder ( BorderNo?, Border$ )
? "├────────────────────────────────────────────────────────────────────────
? "│ Just in case I didn't get your favorite(s), here is your window into
? "│ the data that TBoxDRAW uses. Just define your favorite border type
? "│ and stuff it into the border number of your choice or add it by using
? "│ border N° 13.
? "└────────────────────────────────────────────────────────────────────────
Border$ = "┬─┐││┴─┘├─┤┬│┴┼" ' menu slider box
SetTBorder 13, Border$ ' set border N° 13
TBoxDRAW 10, 2, 10, 20, 1, 7 ' a regular "menu" box
TBoxDRAW 10, 21, 10, 3, 13, 14 ' the new style box
'──────────────────────────────────────────────────┤
Tprint 13, 45, "Draw box w/out filling", 14 ' print to the screen
TBoxDRAW 10, 43, 10, 26, -2, 1 ' draw a box w/out
'──────────────────────────────────────────────────┤
fAnyKey ' pause for effect
TboxCopy 1, 1, 25, 80, pbvScrnApage, pbvScrnVpage ' copy Apage to Vpage
SCREEN ,,0,0