+ add_text_with_linebreaks(world, win, text);
+}
+
+
+
+extern void draw_win_inventory(struct Win * win)
+{
+ struct World * world = (struct World *) win->data;
+ struct MapObj * player = get_player(world);
+ if (NULL == player->owns)
+ {
+ add_line(world, win, "(none)", 0, 0);
+ return;
+ }
+ win->center.y = world->inventory_select;
+ struct MapObj * owned = player->owns;
+ uint8_t y;
+ for (y = 0; NULL != owned; y++)
+ {
+ attr_t attri = 0;
+ if (y == world->inventory_select)
+ {
+ attri = A_REVERSE;
+ }
+ struct MapObjDef * mod = get_map_object_def(world, owned->type);
+ add_line(world, win, mod->name, attri, 0);
+ owned = owned->next;
+ }
+}
+
+
+
+extern void draw_win_available_keybindings(struct Win * win)
+{
+ struct World * world = (struct World *) win->data;
+ char * title = "Active window's keybindings:";
+ struct KeyBinding * kb_p;
+ struct WinConf * wc = get_winconf_by_win(world, world->wmeta->active);
+ if (0 == wc->view)
+ {
+ kb_p = wc->kb.kbs;
+ }
+ else if (1 == wc->view)
+ {
+ kb_p = world->kb_wingeom.kbs;
+ }
+ else if (2 == wc->view)
+ {
+ kb_p = world->kb_winkeys.kbs;
+ }
+ uint16_t offset = draw_titled_keybinding_list(world, title, win, 0, kb_p);
+ add_line(world, win, " ", 0, 0);
+ draw_titled_keybinding_list(world, "Global keybindings", win, offset + 1,
+ world->kb_global.kbs);