Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function unbox() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION UNBOX()

  Short:
  ------
  UNBOX() Removes a box created by makebox()

  Returns:
  --------
  Nothing

  Syntax:
  -------
  Unbox([cMakeBox],[nTop,nLeft,nBottom,nRight],[expRestScreen] )

  Description:
  ------------
  UNBOX restores the screen <cMakeBox> saved by
  MAKEBOX(). MAKEBOX() stores the dimensions and color in the
  returned string, so it is not necessary to pass these to
  UNBOX(). If the dimensions are passed, UNBOX() assumes these are
  not part of the saved string, and assumes the string is a
  savescreen() string. If the string and any other single param
  are passed, UNBOX() assumes it is a full screen (0,0,24,79)
  restore and does so.

  [nTop,nLeft,nBottom,nRight] - the dimensions of the box.

  Use these to UNBOX() a screen saved with SAVESCREEN().

  [bcRestScreen] This is a block which can override the
  default screen restore mechanism. If passed, this screen restore
  is used instead of the default. To set back to default, pass
  this parameter as an empty string "". If passing this parameter,
  pass all other parameters as NIL. What this does, basically, is
  set up a static variable which holds the screen restore block.
  Default is {|t,l,b,r,s|restscreen(t,l,b,r,s)} or if sls_xplode()
  is (.t.), {|t,l,b,r,s|bxx_imbox(t,l,b,r,s)} (an internal
  function within S_UNBOX.PRG) .

  Examples:
  ---------
   cMsgBox := MAKEBOX(10,40,12,60,'W/R,+GR/R')

   @11,42 SAY "What's up, Doc ?"

   inkey(0)

   UNBOX(cMsgBox)

   // to set up the alternate screen restore method:
  unbox(nil,nil,nil,nil,nil,{|t,l,b,r,s| ss_fade(t,l,b,r,s)})
  unbox(nil,nil,nil,nil,nil,{|t,l,b,r,s| ss_fall(t,l,b,r,s,100)} )

   // to set screen restore back to the default
  unbox(nil,nil,nil,nil,nil,"")

  Source:
  -------
  S_UNBOX.PRG


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson