@log_info
    def show(self):
        """
        Show inventory screen
        """
        running = 1
        self._draw_screen()

        while running == 1:
            item = None
            key = chr(self.screen.getch())
            if key in ['u', 'r', 'd', 'i']:
                self.screen.addstr(0, 2, 'select item')
                item_key = chr(self.screen.getch())
                if item_key in self.keys:
                    index = self.keys.index(item_key)
                    if index < len(self.character.inventory):
                        item = self.character.inventory[index]

                if item is not None:
                    if key == 'u':
                        self.inventory_controller.use_item(item)
                    elif key == 'r':
                        self.inventory_controller.unequip_item(item)
                    elif key == 'd':
                        self.inventory_controller.drop_item(item)
                    elif key == 'i':
                        self.screen.border()
                        self.screen.addstr(0, 2, 'press key to continue')
                        self.screen.refresh()
                        self._show_detailed_info(item, self.character)
            elif key == ' ':
                running = 0

            self._draw_screen()
            self.parent.refresh()
dataset/ETHPy150Open tuturto/pyherc/src/herculeum/ui/text/inventory.py/InventoryScreen.show/original