ScummVM API documentation
statusba.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 #ifndef SLUDGE_STATUSBA_H
22 #define SLUDGE_STATUSBA_H
23 
24 namespace Sludge {
25 
26 struct StatusBar {
27  Common::String text;
28  StatusBar *next;
29 };
30 
31 struct StatusStuff {
32  StatusBar *firstStatusBar;
33  uint16 alignStatus;
34  int litStatus;
35  int statusX, statusY;
36  int statusR, statusG, statusB;
37  int statusLR, statusLG, statusLB;
38 };
39 
41 public:
43 
44  void init();
45  void set(Common::String &txt);
46  void clear();
47  void addStatusBar();
48  void killLastStatus();
49  void statusBarColour(byte r, byte g, byte b);
50  void statusBarLitColour(byte r, byte g, byte b);
51  void setLitStatus(int i);
52  const Common::String statusBarText();
53  void positionStatus(int, int);
54  void draw();
55 
56  // Load and save
57  bool loadStatusBars(Common::SeekableReadStream *stream);
58  void saveStatusBars(Common::WriteStream *stream);
59 
60  // For freezing
61  void restoreBarStuff(StatusStuff *here);
62  StatusStuff *copyStatusBarStuff(StatusStuff *here);
63 
64  void setAlignStatus(uint16 val) { _nowStatus->alignStatus = val; }
65 
66 private:
67  SpritePalette _verbLinePalette;
68  SpritePalette _litVerbLinePalette;
69 
70  StatusStuff _mainStatus;
71  StatusStuff *_nowStatus;
72 
73  SludgeEngine *_sludge;
74 };
75 
76 } // End of namespace Sludge
77 
78 #endif
Definition: statusba.h:40
Definition: str.h:59
Definition: stream.h:77
Definition: stream.h:745
Definition: sprites.h:34
Definition: sludge.h:68
Definition: statusba.h:26
Definition: builtin.h:27
Definition: statusba.h:31