def display_statusline (message=""): global status # display_player_stats() for x in range (libtcod.console_get_width(status_console)): libtcod.console_put_char (status_console, x, 0, ' ', libtcod.BKGND_NONE) libtcod.console_put_char (status_console, x, 1, ' ', libtcod.BKGND_NONE) libtcod.console_print_rect_ex(status_console, 1, 0, M.SCREEN_WIDTH, 2, libtcod.BKGND_NONE, libtcod.LEFT, message[:M.SCREEN_WIDTH*2].strip()) libtcod.console_blit(status_console,0,0,M.SCREEN_WIDTH, (M.SCREEN_HEIGHT-M.MAP_HEIGHT-1),0,0,M.MAP_HEIGHT+1,1) libtcod.console_flush()
def draw_items(): height = 0 libtcod.console_set_default_background(cons.items_console, libtcod.red) libtcod.console_set_default_foreground(cons.items_console, libtcod.white) libtcod.console_clear(cons.items_console) for item in tile_items: height+=libtcod.console_print_rect_ex(cons.items_console, 0, height, libtcod.console_get_width(cons.items_console), libtcod.console_get_height(cons.items_console), libtcod.BKGND_NONE, libtcod.LEFT, item.name) libtcod.console_blit(cons.items_console,0,0, libtcod.console_get_width(cons.items_console), height, 0,1,1, 1.0,0.5) libtcod.console_flush()