22 #ifndef NUVIE_CORE_CONVERSE_GUMP_H 23 #define NUVIE_CORE_CONVERSE_GUMP_H 25 #include "ultima/nuvie/misc/call_back.h" 26 #include "ultima/nuvie/gui/widgets/gui_widget.h" 27 #include "ultima/shared/std/containers.h" 28 #include "ultima/shared/std/string.h" 47 unsigned char *npc_portrait;
48 unsigned char *avatar_portrait;
50 bool found_break_char;
53 uint8 converse_bg_color;
55 uint16 cursor_position;
58 uint8 portrait_height;
63 nuvie_game_t game_type;
70 void set_actor_portrait(
Actor *a);
71 unsigned char *create_framed_portrait(
Actor *a);
72 bool parse_token(
MsgText *token)
override;
73 Std::string get_token_string_at_pos(uint16 x, uint16 y)
override;
74 void display_string(
const Std::string &s,
Font *f,
bool include_on_map_window)
override;
75 void set_talking(
bool state,
Actor *actor =
nullptr)
override;
76 void set_font(uint8 font_type)
override {}
78 void set_solid_bg(
bool val) {
82 void Display(
bool full_redraw)
override;
85 GUI_status MouseUp(
int x,
int y, Shared::MouseButton button)
override;
87 GUI_status MouseDown(
int x,
int y, Shared::MouseButton button)
override {
90 GUI_status MouseMotion(
int x,
int y, uint8 state)
override {
93 GUI_status MouseEnter(uint8 state)
override {
96 GUI_status MouseLeave(uint8 state)
override {
99 GUI_status MouseClick(
int x,
int y, Shared::MouseButton button)
override {
102 GUI_status MouseDouble(
int x,
int y, Shared::MouseButton button)
override {
105 GUI_status MouseDelayed(
int x,
int y, Shared::MouseButton button)
override {
108 GUI_status MouseHeld(
int x,
int y, Shared::MouseButton button)
override {
112 void set_found_break_char(
bool val) {
113 found_break_char = val;
116 bool input_buf_add_char(
char c)
override;
117 bool input_buf_remove_char()
override;
119 bool is_converse_finished()
override {
120 return (is_holding_buffer_empty() && msg_buf.size() == 1 && msg_buf.back()->total_length == 0);
123 void drawCursor(uint16 x, uint16 y)
override;
129 void set_permitted_input(
const char *allowed)
override;
130 void clear_permitted_input()
override;
132 bool cursor_at_input_section()
const {
133 return (keyword_list && cursor_position == keyword_list->
size());
135 void cursor_reset() {
138 void cursor_move_to_input() {
139 cursor_position = keyword_list ? keyword_list->
size() : 0;
146 bool is_permanent_keyword(
const Std::string &keyword);
147 void parse_fm_towns_token(
MsgText *token);
150 unsigned char *get_portrait_data(
Actor *a);
Definition: configuration.h:61
size_type size() const
Definition: list.h:198
Definition: converse_gump.h:41
Definition: detection.h:27
Definition: msg_scroll.h:54
Definition: containers.h:200
Definition: keyboard.h:294