home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / chip_20022115.iso / amiga / chipgame / scummvm_aga.lha / ScummVM_AGA / src / gui.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-01-05  |  1.7 KB  |  76 lines

  1. enum {
  2.     GUI_NONE = 0,
  3.     GUI_TEXT = 1,
  4.     GUI_IMAGE = 2,
  5.     GUI_STAT = 3,
  6. };
  7.  
  8. enum {
  9.     GWF_BORDER = 1,
  10.     GWF_CLEARBG = 2,
  11.     GWF_PARENT = 4,
  12.     GWF_DELAY = 8,
  13.     GWF_DEFAULT = GWF_BORDER|GWF_CLEARBG,
  14.     GWF_BUTTON = GWF_BORDER|GWF_CLEARBG|GWF_DELAY,
  15.  
  16. };
  17.  
  18. struct GuiWidget {
  19.     byte _type;
  20.     byte _page;
  21.     byte _flags;
  22.     int16 _x,_y;
  23.     uint16 _w,_h;
  24.     uint16 _id;
  25.     byte _string_number;
  26. };
  27.  
  28. struct Gui {
  29.     Scumm *_s;
  30.     const GuiWidget *_widgets[4];
  31.     int _curX, _curY;
  32.     VirtScreen *_vs;
  33.     byte _color,_shadowcolor;
  34.     byte _bgcolor;
  35.     byte _textcolor;
  36.     byte _textcolorhi;
  37.     int _parentX, _parentY;
  38.     byte _active;
  39.     byte _clickTimer;
  40.     byte _cur_page;
  41.     int _clickWidget;
  42.     char *_queryMess;
  43.  
  44.     /* savedialog specifics */    
  45.     int _slotIndex;
  46.     int _editString;
  47.     int _editLen;
  48.     bool valid_games[9];
  49.     char game_names[9][32];
  50.     void loop();
  51.     void init(Scumm *s);
  52.     void draw(int start, int end);
  53.     void draw(int item) { draw(item,-1); }
  54.     void drawWidget(const GuiWidget *w);
  55.     void moveto(int x, int y);
  56.     void lineto(int x, int y);
  57.     void hline(int x, int y, int x2);
  58.     void vline(int x, int y, int y2);
  59.     void drawString(const char *str, int x, int y, int w, byte color, bool center);
  60.     void widgetClear(const GuiWidget *w);
  61.     void widgetBorder(const GuiWidget *w);
  62.     byte *getBasePtr(int x, int y);
  63.     const GuiWidget *widgetFromPos(int x, int y);
  64.     void leftMouseClick(int x, int y);
  65.     void handleCommand(int cmd);
  66.     void close();
  67.     const char *queryString(int string, int id);
  68.     void getSavegameNames(int start);
  69.     void editString(int index);
  70.     void showCaret(bool show);
  71.     void addLetter(char letter);
  72.     void saveLoadDialog();
  73.     void queryMessage(const char *msg, const char *alts);
  74.     byte getDefaultColor(int color);
  75. };
  76.