home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / IKLOWNS / CGOPTION.H < prev    next >
C/C++ Source or Header  |  1996-08-28  |  3KB  |  91 lines

  1. /*===========================================================================*\
  2. |
  3. |  File:        cgoption.h
  4. |
  5. |  Description: 
  6. |       
  7. |-----------------------------------------------------------------------------
  8. |
  9. |  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  10. |
  11. |  Written by Moss Bay Engineering, Inc. under contract to Microsoft Corporation
  12. |
  13. \*===========================================================================*/
  14. /**************************************************************************
  15.  
  16.     (C) Copyright 1995-1996 Microsoft Corp.  All rights reserved.
  17.  
  18.     You have a royalty-free right to use, modify, reproduce and 
  19.     distribute the Sample Files (and/or any modified version) in 
  20.     any way you find useful, provided that you agree that 
  21.     Microsoft has no warranty obligations or liability for any 
  22.     Sample Application Files which are modified. 
  23.  
  24.     we do not recomend you base your game on IKlowns, start with one of
  25.     the other simpler sample apps in the GDK
  26.  
  27.  **************************************************************************/
  28.  
  29. #ifndef _CGOPTION_H
  30. #define _CGOPTION_H
  31.  
  32. HDC LoadBitmapFile (
  33.     LPSTR   pBitmapFile
  34. );
  35.  
  36. // Class for the options screen, to allow clean repaints
  37. // from the base window when the option screen is up
  38.  
  39. // Forward declaration of CGameText (protected member
  40. // needn't force include of new header file)
  41. class CGameText;
  42.  
  43. class COptionScreen
  44. {
  45.     public:
  46.         COptionScreen();
  47.  
  48.         BOOL Init(
  49.             LPSTR       pBitmapName,    // name of .BMP file or NULL to use default
  50.             LPSTR       ProfileName,    // filename of game config file
  51.             CGameInput  *Input=NULL,        // ptr to input object or NULL if no input
  52.             int     timeout=-1  // maximum time to wait or -1 forever
  53.         );
  54.  
  55.         BOOL Init(
  56.             LPSTR       pBitmapName,    // name of .BMP file or NULL to use default
  57.             int     idStringBase,   // first resource id of text lines
  58.             int     nChoices,   // number of text lines to display
  59.             LPSTR       ProfileName,    // filename of game config file
  60.             CGameInput  *Input=NULL,        // ptr to input object or NULL if no input
  61.             int     defSelect=0,    // line to hilight first or -1 if none
  62.             int     timeout=-1, // maximum time to wait or -1 forever
  63.             int     spacing=2,
  64.             int     lines=2
  65.         );
  66.         BOOL AddText(LPSTR);
  67.         BOOL SelectText(int);
  68.         void SetSpacing(int spacing);
  69.         void SetMaxLines(int lines);
  70.  
  71.         int DoOptionScreen( void );
  72.         void Shutdown( void );
  73.         void Paint( void );
  74.     protected:
  75.         RECT    rect;
  76.         HDC mHdcScreen;
  77.         HDC mHdcIntro; // DC screen is assembled in
  78.         COLORREF    colorDefault;
  79.         COLORREF    colorSelected;
  80.         COLORREF    colorDefaultShadow;
  81.         COLORREF    colorSelectedShadow;
  82.         LPSTR       pChoice;           
  83.         int         CurSel;    
  84.         CGameInput  *mInput;
  85.         int         mnChoices;
  86.         CGameText   *pText;
  87.         int         mTimeout;
  88. };
  89.  
  90. #endif
  91.