ScummVM API documentation
pda_button_actor.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 #ifndef PINK_PDA_BUTTON_ACTOR_H
23 #define PINK_PDA_BUTTON_ACTOR_H
24 
25 #include "pink/objects/actors/actor.h"
26 
27 namespace Pink {
28 
29 struct Command {
30  enum CommandType {
31  kGoToPage = 1,
32  kGoToPreviousPage,
33  kGoToDomain,
34  kGoToHelp, // won't be supported
35  kNavigateToDomain,
36  kIncrementCountry,
37  kDecrementCountry,
38  kIncrementDomain,
39  kDecrementDomain,
40  kClose,
41  kIncrementFrame, // not used
42  kDecrementFrame, // not used
43  kNull
44  };
45 
46  CommandType type;
47  Common::String arg;
48 };
49 
50 class PDAButtonActor : public Actor {
51 public:
52  void deserialize(Archive &archive) override;
53 
54  void toConsole() const override;
55 
56  void init(bool paused) override;
57 
58  void onMouseOver(Common::Point point, CursorMgr *mgr) override;
59 
60  void onLeftClickMessage() override;
61 
62 private:
63  bool isActive() const;
64 
65  Command _command;
66 
67  int16 _x;
68  int16 _y;
69 
70  bool _hideOnStop;
71  bool _opaque;
72 };
73 
74 } // End of namespace Pink
75 
76 #endif
Definition: archive.h:39
Definition: cursor_mgr.h:35
Definition: str.h:59
Definition: pda_button_actor.h:50
Definition: pda_button_actor.h:29
Definition: archive.h:35
Definition: rect.h:45
Definition: actor.h:39