I have created a choice-based game in Python for a project in my AP Computer Science class. It works, for the most part, but I am having trouble getting the buttons to disappear once they are pressed. Help would be much obliged.
def new_1_button(frame,text,function): #frame.stop() #frame = simplegui.create_frame('CYOA', FRAMEWIDTH,FRAMEHEIGHT) hp_color() #frame.set_draw_handler(draw_handler) frame.set_canvas_background('black') #frame.start() frame.add_button(text, function) def new_2_button(frame, text_1, func_1, text_2, func_2): #frame.stop() #frame = simplegui.create_frame('CYOA', FRAMEWIDTH,FRAMEHEIGHT) hp_color() frame.set_draw_handler(draw_handler) frame.set_canvas_background('black') #frame.start() frame.add_button(text_1,func_1) frame.add_label(" ") frame.add_button(text_2,func_2)This is the code for the buttons.