ScummVM API documentation
vmenu.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * This code is based on original Soltys source code
24  * Copyright (c) 1994-1995 Janusz B. Wisniewski and L.K. Avalon
25  */
26 
27 #ifndef CGE_VMENU_H
28 #define CGE_VMENU_H
29 
30 #include "cge/talk.h"
31 
32 namespace CGE {
33 
34 #define kMenuBarVM 1
35 #define kMenuBarHM 3
36 #define kMenuBarLT kVgaColLightGray
37 #define kMenuBarRB kVgaColDarkGray
38 
39 
40 struct Choice {
41  const char *_text;
42  void (CGEEngine::*Proc)();
43 };
44 
45 
46 class MenuBar : public Talk {
47 public:
48  MenuBar(CGEEngine *vm, uint16 w);
49 private:
50  CGEEngine *_vm;
51 };
52 
53 class Vmenu : public Talk {
54 public:
55  static Vmenu *_addr;
56  static int _recent;
57  MenuBar *_bar;
58  Vmenu(CGEEngine *vm, Choice *list, int x, int y);
59  ~Vmenu() override;
60  void touch(uint16 mask, int x, int y) override;
61 private:
62  char *_vmgt;
63  CGEEngine *_vm;
64  uint16 _items;
65  Choice *_menu;
66 
67  char *VMGather(Choice *list);
68 };
69 
70 } // End of namespace CGE
71 
72 #endif
Definition: vmenu.h:53
Definition: cge.h:150
Definition: vmenu.h:40
Definition: vmenu.h:46
Definition: talk.h:49
Definition: bitmap.h:33