ScummVM API documentation
converse_gump_wou.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 NUVIE_CORE_CONVERSE_GUMP_WOU_H
23 #define NUVIE_CORE_CONVERSE_GUMP_WOU_H
24 
25 #include "ultima/nuvie/misc/call_back.h"
26 #include "ultima/nuvie/gui/widgets/gui_widget.h"
27 #include "ultima/nuvie/fonts/font.h"
28 #include "ultima/shared/std/containers.h"
29 #include "ultima/shared/std/string.h"
30 
31 namespace Ultima {
32 namespace Nuvie {
33 
34 using Std::list;
35 
36 class Configuration;
37 class Font;
38 class MsgScroll;
39 class Actor;
40 
41 class ConverseGumpWOU: public MsgScroll {
42 
43  uint8 converse_bg_color;
44 
45  uint8 frame_w;
46  uint8 frame_h;
47  uint16 min_w;
48 
49  nuvie_game_t game_type;
50  bool found_break_char;
51 public:
52 
53  ConverseGumpWOU(const Configuration *cfg, Font *f, Screen *s);
54  ~ConverseGumpWOU() override;
55 
56  void set_talking(bool state, Actor *actor = nullptr) override;
57  void set_font(uint8 font_type) override {}
58  void display_converse_prompt() override;
59 
60  void Display(bool full_redraw) override;
61 
62  GUI_status MouseUp(int x, int y, Shared::MouseButton button) override {
63  return GUI_YUM;
64  }
65 
66  GUI_status MouseDown(int x, int y, Shared::MouseButton button) override {
67  return GUI_YUM;
68  }
69  GUI_status MouseMotion(int x, int y, uint8 state) override {
70  return GUI_YUM;
71  }
72  GUI_status MouseEnter(uint8 state) override {
73  return GUI_YUM;
74  }
75  GUI_status MouseLeave(uint8 state) override {
76  return GUI_YUM;
77  }
78  GUI_status MouseClick(int x, int y, Shared::MouseButton button) override {
79  return GUI_YUM;
80  }
81  GUI_status MouseDouble(int x, int y, Shared::MouseButton button) override {
82  return GUI_YUM;
83  }
84  GUI_status MouseDelayed(int x, int y, Shared::MouseButton button) override {
85  return GUI_YUM;
86  }
87  GUI_status MouseHeld(int x, int y, Shared::MouseButton button) override {
88  return GUI_YUM;
89  }
90 
91  bool is_converse_finished() override {
92  return (is_holding_buffer_empty() && !page_break);
93  }
94 
95 protected:
96 
97  void input_add_string(Std::string token_str);
98  void process_page_break() override;
99  uint8 get_input_font_color() const override {
100  return FONT_COLOR_WOU_CONVERSE_INPUT;
101  }
102  void display_bg();
103 
104 private:
105 
106  Graphics::ManagedSurface *bg_image;
107 };
108 
109 } // End of namespace Nuvie
110 } // End of namespace Ultima
111 
112 #endif
Definition: managed_surface.h:51
Definition: actor.h:178
Definition: msg_scroll.h:93
Definition: configuration.h:61
Definition: list.h:39
Definition: screen.h:41
Definition: detection.h:27
Definition: converse_gump_wou.h:41
Definition: string.h:30
Definition: font.h:42