23 #ifndef M4_RIDDLE_GUI_INVENTORY_H 24 #define M4_RIDDLE_GUI_INVENTORY_H 26 #include "m4/gui/gui_cheapo.h" 34 constexpr int16 INVENTORY_CELLS_COUNT = 128;
35 constexpr int16 ARROW_WIDTH = 8;
36 constexpr int16 MAX_INVENTORY = 20;
38 constexpr int16 LEFT_ARROW_TAG = 128;
39 constexpr int16 RIGHT_ARROW_TAG = 129;
41 constexpr int16 LEFT_ARROW_TAG_DORMANT = 130;
42 constexpr int16 RIGHT_ARROW_TAG_DORMANT = 134;
43 constexpr int16 LEFT_ARROW_TAG_ROLL = 131;
44 constexpr int16 RIGHT_ARROW_TAG_ROLL = 135;
45 constexpr int16 LEFT_ARROW_TAG_DOWN = 132;
46 constexpr int16 RIGHT_ARROW_TAG_DOWN = 136;
47 constexpr int16 LEFT_ARROW_TAG_NONFUNC = 133;
48 constexpr int16 RIGHT_ARROW_TAG_NONFUNC = 137;
64 bool _right_arrow_visible =
false;
67 int16 cell_pos_x(int16 index);
68 int16 cell_pos_y(int16 index);
69 int16 interface_tracking = -1;
73 int16 _cells_h = 0, _cells_v = 0;
74 int16 _cell_w = 0, _cell_h = 0;
75 int16 _must_redraw1 = 0, _must_redraw2 = 0;
77 bool _must_redraw_all =
false;
79 Entry _items[INVENTORY_CELLS_COUNT];
82 Inventory(
const RectClass &r, int32 sprite, int16 cells_h, int16 cells_v, int16 cell_w, int16 cell_h, int16 tag);
86 void draw(
GrBuff *interface_buffer);
88 int16 inside(int16 x, int16 y)
const override;
89 ControlStatus track(int32 eventType, int16 x, int16 y);
93 void highlight_part(int16 index);
95 bool need_left()
const;
96 bool need_right()
const;
97 void refresh_right_arrow();
98 void refresh_left_arrow();
99 void refresh_scrollbars();
103 void set_scroll(int32 new_scroll);
Definition: gui_cheapo.h:47
Definition: gui_cheapo.h:136
Definition: inventory.h:50
Definition: database.h:28
Definition: game_menu.h:30