removed inventorypanel from its only class to the render panel

removed inventorypanel from its only class to the render panel and added
key to open and close the inventory panel