22 #ifndef QDENGINE_QDCORE_QD_INVENTORY_H 23 #define QDENGINE_QDCORE_QD_INVENTORY_H 25 #include "qdengine/system/input/mouse_input.h" 26 #include "qdengine/qdcore/qd_named_object.h" 27 #include "qdengine/qdcore/qd_inventory_cell.h" 44 INV_TAKE_TO_MOUSE = 0x01,
46 INV_DONT_OPEN_AFTER_TAKE = 0x02,
48 INV_PUT_OBJECT_AFTER_CLICK = 0x04,
50 INV_ENABLE_RIGHT_CLICK = 0x08,
52 INV_VISIBLE_WHEN_INACTIVE = 0x10
56 INV_DEFAULT_SHADOW_COLOR = 0,
57 INV_DEFAULT_SHADOW_ALPHA = 128
61 return QD_NAMED_OBJECT_INVENTORY;
65 _cell_sets.push_back(
set);
67 void remove_cell_set(
int idx);
70 return _cell_sets[id];
73 void set_cells_pos(
int set_id,
const Vect2s &pos) {
74 if (set_id >= 0 && set_id < (
int)_cell_sets.size())
75 _cell_sets[set_id].set_screen_pos(pos);
78 if (set_id >= 0 && set_id < (
int)_cell_sets.size())
79 _cell_sets[set_id].set_cell_type(tp);
81 void set_cells_size(
int set_id,
const Vect2s &sz) {
82 if (set_id >= 0 && set_id < (
int)_cell_sets.size())
83 _cell_sets[set_id].set_size(sz);
87 Vect2s cell_position(
int cell_idx)
const;
89 void redraw(
int offs_x = 0,
int offs_y = 0,
bool inactive_mode =
false)
const;
90 void toggle_redraw(
bool state) {
93 void pre_redraw()
const;
102 uint32 shadow_color()
const {
103 return _shadow_color;
105 void set_shadow_color(uint32 color) {
106 _shadow_color = color;
109 int shadow_alpha()
const {
110 return _shadow_alpha;
112 void set_shadow_alpha(
int alpha) {
113 _shadow_alpha = alpha;
116 bool load_script(
const xml::tag *p);
119 bool load_resources();
120 bool free_resources();
131 void objects_quant(
float dt);
133 Vect2s additional_cells()
const {
134 return _additional_cells;
136 void set_additional_cells(
Vect2s val) {
137 _additional_cells = val;
146 void debug_log()
const;
154 uint32 _shadow_color;
163 #endif // QDENGINE_QDCORE_QD_INVENTORY_H
Поименованный объект.
Definition: qd_named_object.h:70
Группа ячеек инвентори.
Definition: qd_inventory_cell.h:176
Инвентори.
Definition: qd_inventory.h:36
Dynamic object.
Definition: qd_game_object_animated.h:37
XML тег.
Definition: xml_tag.h:33
int named_object_type() const
Возвращает тип объекта.
Definition: qd_inventory.h:60
Базовый класс для игровых ресурсов.
Definition: console.h:28
Definition: algorithm.h:29
Описание ячейки инвентори.
Definition: qd_inventory_cell.h:37
mouseEvent
События.
Definition: mouse_input.h:41