Guidance
指路人
g.yi.org
software / rapidq / Examples / Console / 3dbox / 3DBOX.BAS

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'===========================================================================
' Subject: DRAW 3D-LIKE TEXT BOXES           Date: 10-26-97 (10:55)
'  Author: The ABC Programmer                Code: QB, QBasic, PDS
'  Origin: voxel@freenet.edmonton.ab.ca    Packet: TEXT.ABC
'===========================================================================
' 3D-Like Text Boxes programmed by William Yu (10-26-97)
' Just like the ones used in The ABC Express Reader
' 100% Public Domain

' Usage Notes:
'   X,Y,XX,YY are self explanatory
'   C  = Bright Colour
'   C2 = Dark Colour
'   BC = Background Colour
'   Solid = fill in box?  0 = No, anything else is Yes
'   Indent = create an indent effect? 0 = No, anything else is yes

     CONST False = 0
     CONST True = NOT False

     SUB Draw.3DBox (X% AS SHORT, Y% AS SHORT, XX% AS SHORT, YY% AS SHORT, _
       C% AS SHORT, C2% AS SHORT, BC% AS SHORT, Solid% AS SHORT, Indent AS SHORT)

  ' Character set
      Char1$    = "Ú"
      CharHoz$  = "Ä"
      Char2$    = "¿"
      CharVert$ = "³"
      Char3$    = "À"
      Char4$    = "Ù"

      COLOR C%, BC%
      A = (XX% - X%) - 1
      IF Indent THEN
       COLOR C2%
       LOCATE Y%, X%: PRINT Char1$; STRING$(A, CharHoz$);
       COLOR C%: PRINT Char2$;
      ELSE
       LOCATE Y%, X%: PRINT Char1$; STRING$(A, CharHoz$);
       COLOR C2%: PRINT Char2$;
      END IF
      FOR I = Y% + 1 TO YY% - 1
       IF Indent THEN
        COLOR C2%
       ELSE
        COLOR C%
       END IF
       LOCATE I, X%: PRINT CharVert$;
       IF Solid% THEN
        PRINT SPACE$(A);
       END IF
       IF Indent THEN
        COLOR C%
       ELSE
        COLOR C2%
       END IF
       LOCATE I, XX%: PRINT CharVert$;
      NEXT I
      LOCATE YY%, X%
      IF Indent THEN
       COLOR C2%
      ELSE
       COLOR C%
      END IF
      PRINT Char3$;
      IF Indent THEN
       COLOR C%
      ELSE
       COLOR C2%
      END IF
      PRINT STRING$(A, CharHoz$); Char4$;
     END SUB


     CLS
     Draw.3DBox 1, 1, 80, 24, 15, 0, 7, True, False
     Draw.3DBox 3, 2, 78, 23, 15, 0, 7, False, True
     LOCATE 25,1: COLOR ,3:?SPACE$(79);              ' Can't write to 80,25

     POKE 3999, 3*16         ' Background color 3
                        ' This writes an attribute to 80x25


     DO:LOOP UNTIL INKEY$<>""

     COLOR 7,0
     CLS
掌柜推荐
 
 
¥738.00 ·
 
 
¥1,480.00 ·
 
 
¥397.00 ·
 
 
¥950.00 ·
 
 
¥264.00 ·
 
 
¥1,005.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:43:25