home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / Concentration / Message.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-17  |  714 b   |  50 lines  |  [TEXT/KAHL]

  1. /*
  2.  * Display a message in a generic alert.
  3.  *
  4.  * SetMessageAlertNum () should be called early to set the alert resource number.
  5.  */
  6.  
  7. # include    "TransSkel.h"
  8. # include    "Message.h"
  9.  
  10.  
  11.  
  12. short    alrtNum = 0;
  13.  
  14.  
  15. void
  16. SetMessageAlertNum (short n)
  17. {
  18.     alrtNum = n;
  19. }
  20.  
  21.  
  22. void
  23. Message1 (StringPtr s1)
  24. {
  25.     Message4 (s1, "\p", "\p", "\p");
  26. }
  27.  
  28.  
  29. void
  30. Message2 (StringPtr s1, StringPtr s2)
  31. {
  32.     Message4 (s1, s2, "\p", "\p");
  33. }
  34.  
  35.  
  36. void
  37. Message3 (StringPtr s1, StringPtr s2, StringPtr s3)
  38. {
  39.     Message4 (s1, s2, s3, "\p");
  40. }
  41.  
  42.  
  43. void
  44. Message4 (StringPtr s1, StringPtr s2, StringPtr s3, StringPtr s4)
  45. {
  46.     ParamText (s1, s2, s3, s4);
  47.     (void) SkelAlert (alrtNum, SkelDlogFilter (nil, true), skelPositionOnParentWindow);
  48.     SkelRmveDlogFilter ();
  49. }
  50.