home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / tools / codeit / demom4.bas < prev    next >
BASIC Source File  |  1992-05-27  |  7KB  |  213 lines

  1. DECLARE SUB RingTestDefine ()
  2. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  3. 'DEMOM4.BAS Copyright (C) 1991-1992, Clear Software. ALL RIGHTS RESERVED
  4. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  5.  
  6. '$INCLUDE: 'CITOOLS.BI'
  7. '$INCLUDE: 'CIMENU4.BI'
  8. '$INCLUDE: 'CIMOUSE.BI'
  9.  
  10. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  11.  
  12. DEFINT A-Z
  13.  
  14. CONST TRUE = -1, FALSE = 0
  15.  
  16. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  17.  
  18. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  19. 'Initialize the mouse, clear the screen, and paint the background.
  20. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  21.  
  22.     MouseInit
  23.  
  24.     CLS
  25.     COLOR 0, 1
  26.     ScreenPaint 2, 79, 4, 22, ""
  27.     COLOR 9, 1
  28.     DrawBox 1, 80, 3, 23, 2
  29.  
  30. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  31. 'Call the RingTestDefine SUB to define the ring menu then show the mouse and
  32. 'enter the menu loop.
  33. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  34.     
  35.     RingTestDefine
  36.  
  37.     MouseShow
  38.    
  39.     MENUTRAP = FALSE
  40.     curMenu = 1
  41.     curItem = 1
  42.  
  43.     WHILE NOT RINGDONE
  44.  
  45.         item = RingActive(curMenu, curItem)
  46.  
  47.         SELECT CASE item
  48.  
  49.            CASE 1
  50.              curMenu = 2
  51.              curItem = 1
  52.              DO
  53.                  item = RingActive(curMenu, curItem)
  54.                  SELECT CASE item
  55.                      CASE 5, -27
  56.                          curMenu = 1
  57.                          curItem = 1
  58.                          EXIT DO
  59.                  END SELECT
  60.              LOOP
  61.  
  62.            CASE 2
  63.              curMenu = 3
  64.              curItem = 1
  65.              DO
  66.                  item = RingActive(curMenu, curItem)
  67.                  SELECT CASE item
  68.                      CASE 5, -27
  69.                          curMenu = 1
  70.                          curItem = 2
  71.                          EXIT DO
  72.                  END SELECT
  73.              LOOP
  74.  
  75.            CASE 3
  76.              curMenu = 4
  77.              curItem = 1
  78.              DO
  79.                  item = RingActive(curMenu, curItem)
  80.                  SELECT CASE item
  81.                      CASE 5, -27
  82.                          curMenu = 1
  83.                          curItem = 3
  84.                          EXIT DO
  85.                  END SELECT
  86.              LOOP
  87.             
  88.            CASE 4
  89.              curMenu = 5
  90.              curItem = 1
  91.              DO
  92.                  item = RingActive(curMenu, curItem)
  93.                  SELECT CASE item
  94.                      CASE 5, -27
  95.                          curMenu = 1
  96.                          curItem = 4
  97.                          EXIT DO
  98.                  END SELECT
  99.              LOOP
  100.  
  101.  
  102.            CASE 5
  103.              RINGDONE = TRUE
  104.  
  105.            CASE -27
  106.              RINGDONE = TRUE
  107.  
  108.         END SELECT
  109.  
  110.     WEND
  111.  
  112. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  113. 'The user selected to exit the program so hide the mouse and clean up the
  114. 'screen.
  115. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  116.         
  117.     MouseHide
  118.     COLOR 7, 0
  119.     CLS
  120.  
  121. SUB RingTestDefine
  122.  
  123. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  124. 'Dimention the arrays. Note the (1 TO 10) dimentions.
  125. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  126.  
  127.     DIM HelpRing1$(1 TO 10)
  128.     DIM HelpRing2$(1 TO 10)
  129.     DIM HelpRing3$(1 TO 10)
  130.     DIM HelpRing4$(1 TO 10)
  131.     DIM HelpRing5$(1 TO 10)
  132.  
  133.  
  134. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  135. 'Define the menu choices, location, and colors for the main and one sub menu.
  136. '::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  137.  
  138.  
  139.     RingDefine 1, 1, 1, "West", 1
  140.     RingDefine 1, 2, 1, "East", 1
  141.     RingDefine 1, 3, 1, "North", 1
  142.     RingDefine 1, 4, 1, "South", 1
  143.     RingDefine 1, 5, 1, "Exit", 2
  144.  
  145.     HelpRing1$(1) = "Go west young man, go west"
  146.     HelpRing1$(2) = "Not the far east, just east"
  147.     HelpRing1$(3) = "Don't go too far north, it's chilly up there"
  148.     HelpRing1$(4) = "Southern hospitality"
  149.     HelpRing1$(5) = "Exit the program, take me away from this nonsense"
  150.  
  151.     RingDescript 1, 2, 2, 79, HelpRing1$(), 3, 0
  152.  
  153.     RingDefine 2, 1, 1, "Beaches", 1
  154.     RingDefine 2, 2, 1, "Mountains", 1
  155.     RingDefine 2, 3, 1, "Trafic", 1
  156.     RingDefine 2, 4, 1, "Sunshine", 1
  157.     RingDefine 2, 5, 1, "Return", 1
  158.  
  159.     HelpRing2$(1) = "Surf's up dude"
  160.     HelpRing2$(2) = "There are still some between the condos"
  161.     HelpRing2$(3) = "Everywhere"
  162.     HelpRing2$(4) = "When the smog clears"
  163.     HelpRing2$(5) = "Return to the main menu, get me out of California"
  164.  
  165.     RingDescript 2, 2, 2, 79, HelpRing2$(), 3, 0
  166.  
  167.     RingDefine 3, 1, 1, "History", 1
  168.     RingDefine 3, 2, 1, "Broadway", 1
  169.     RingDefine 3, 3, 1, "People", 1
  170.     RingDefine 3, 4, 1, "Slang", 1
  171.     RingDefine 3, 5, 1, "Return", 1
  172.  
  173.     HelpRing3$(1) = "Fore scores and seven years ago"
  174.     HelpRing3$(2) = "Expensive entertainment"
  175.     HelpRing3$(3) = "Sometimes you just can't get away from them"
  176.     HelpRing3$(4) = "Yo"
  177.     HelpRing3$(5) = "Return to the main menu, awway from all this madness"
  178.  
  179.     RingDescript 3, 2, 2, 79, HelpRing3$(), 3, 0
  180.  
  181.     RingDefine 4, 1, 1, "Farms", 1
  182.     RingDefine 4, 2, 1, "Green", 1
  183.     RingDefine 4, 3, 1, "Small Town", 1
  184.     RingDefine 4, 4, 1, "Water", 1
  185.     RingDefine 4, 5, 1, "Return", 1
  186.  
  187.     HelpRing4$(1) = "The backbone of America"
  188.     HelpRing4$(2) = "Everythings green, exept the milk"
  189.     HelpRing4$(3) = "Everybody knows everyone and tells everyone everything"
  190.     HelpRing4$(4) = "Sometimes more than they need...Send some to California"
  191.     HelpRing4$(5) = "Return to the main menu, I'm goin to the city"
  192.     
  193.     RingDescript 4, 2, 2, 79, HelpRing4$(), 3, 0
  194.  
  195.     RingDefine 5, 1, 1, "Hats", 1
  196.     RingDefine 5, 2, 1, "Long Horns", 1
  197.     RingDefine 5, 3, 1, "Blue Grass", 1
  198.     RingDefine 5, 4, 1, "Cajun", 1
  199.     RingDefine 5, 5, 1, "Return", 1
  200.  
  201.     HelpRing5$(1) = "Ten gallon to be exact"
  202.     HelpRing5$(2) = "Big moo moo's"
  203.     HelpRing5$(3) = "The music, not the growin kind"
  204.     HelpRing5$(4) = "Coookin' that will wake you up!"
  205.     HelpRing5$(5) = "Return to the main menu, I've got indigestion from the spicy food"
  206.  
  207.     RingDescript 5, 2, 2, 79, HelpRing5$(), 3, 0
  208.  
  209.     RingColors 3, 0, 0, 3, 15, 15
  210.  
  211. END SUB
  212.  
  213.