Add DrawElement method and input event process