comparison src/core/inventory_dialog.h @ 105:f6b5e2fbbc81

inventory_dialog: add basic movements
author David Demelier <markand@malikania.fr>
date Tue, 31 Mar 2020 21:29:54 +0200
parents 26fef20fd89d
children
comparison
equal deleted inserted replaced
104:7f254a797faf 105:f6b5e2fbbc81
32 INVENTORY_DIALOG_NONE, 32 INVENTORY_DIALOG_NONE,
33 INVENTORY_DIALOG_SHOWING 33 INVENTORY_DIALOG_SHOWING
34 }; 34 };
35 35
36 struct inventory_dialog { 36 struct inventory_dialog {
37 int x; /*!< (RO) Position in x. */
38 int y; /*!< (RO) Position in y. */
37 struct inventory *inv; /*!< (RW, ref) Inventory to use. */ 39 struct inventory *inv; /*!< (RW, ref) Inventory to use. */
38 struct theme *theme; /*!< (RW, ref, optional) Theme to use. */ 40 struct theme *theme; /*!< (RW, ref, optional) Theme to use. */
39 struct label ldesc; /*!< (RO) Label containing current description. */
40 struct button bsort; /*!< (RO) Button sort. */ 41 struct button bsort; /*!< (RO) Button sort. */
41 struct frame fgrid; /*!< (RO) Grid frame. */ 42 struct frame fgrid; /*!< (RO) Grid frame. */
42 struct frame flabel; /*!< (RO) Label frame. */ 43 struct frame fname; /*!< (RO) Frame for name. */
44 struct frame fdesc; /*!< (RO) Frame for description. */
45 struct label lname; /*!< (RO) Label for name. */
46 struct label ldesc; /*!< (RO) Label for description. */
43 enum inventory_dialog_state state; /*!< (RO) Current dialog state. */ 47 enum inventory_dialog_state state; /*!< (RO) Current dialog state. */
44 unsigned int selrow; /*!< (RO) Current selected row. */ 48 unsigned int selrow; /*!< (RO) Current selected row. */
45 unsigned int selcol; /*!< (RO) Current selected column. */ 49 unsigned int selcol; /*!< (RO) Current selected column. */
46 }; 50 };
47 51
53 57
54 void 58 void
55 inventory_dialog_update(struct inventory_dialog *dlg, unsigned int ticks); 59 inventory_dialog_update(struct inventory_dialog *dlg, unsigned int ticks);
56 60
57 void 61 void
62 inventory_dialog_move(struct inventory_dialog *dlg, int x, int y);
63
64 void
58 inventory_dialog_draw(struct inventory_dialog *dlg); 65 inventory_dialog_draw(struct inventory_dialog *dlg);
59 66
60 void 67 void
61 inventory_dialog_finish(struct inventory_dialog *dlg); 68 inventory_dialog_finish(struct inventory_dialog *dlg);
62 69