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