ScummVM API documentation
bark_gump.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 ULTIMA8_GUMPS_BARKGUMP_H
23#define ULTIMA8_GUMPS_BARKGUMP_H
24
25#include "common/str.h"
26#include "ultima/ultima8/gumps/item_relative_gump.h"
27#include "ultima/ultima8/misc/classtype.h"
28
29namespace Ultima {
30namespace Ultima8 {
31
35class BarkGump : public ItemRelativeGump {
36protected:
37 Common::String _barked;
38 int32 _counter;
39 ObjId _textWidget;
40 uint32 _speechShapeNum;
41 uint32 _speechLength;
42 bool _subtitles;
43 bool _speechMute;
44 int _talkSpeed;
45
46public:
47 ENABLE_RUNTIME_CLASSTYPE()
48
49 BarkGump();
50 BarkGump(uint16 owner, const Common::String &msg, uint32 speechShapeNum = 0);
51 ~BarkGump() override;
52
53 // Run the gump (decrement the counter)
54 void run() override;
55
56 // Got to the next page on mouse click
57 Gump *onMouseDown(int button, int32 mx, int32 my) override;
58
59 // Init the gump, call after construction
60 void InitGump(Gump *newparent, bool take_focus = true) override;
61
62 // Close the gump
63 void Close(bool no_del = false) override;
64
66 static int dialogFontForActor(uint16 actor);
67
68 bool loadData(Common::ReadStream *rs, uint32 version);
69 void saveData(Common::WriteStream *ws) override;
70
71protected:
74 bool NextText();
75 int calculateTicks();
76};
77
78} // End of namespace Ultima8
79} // End of namespace Ultima
80
81#endif
Definition: stream.h:385
Definition: str.h:59
Definition: stream.h:77
Definition: bark_gump.h:35
static int dialogFontForActor(uint16 actor)
Get the font that should be used from dialog from this actor.
void run() override
Run the gump.
void InitGump(Gump *newparent, bool take_focus=true) override
void Close(bool no_del=false) override
Definition: gump.h:46
Definition: item_relative_gump.h:34