Ejemplo n.º 1
0
void Menu_attribute_controller::Handle_event(const Ustring& event_handle, const Event& event) {
	Menu* widget = dynamic_cast<Menu*>(layout_controller->Get_current_widget());
	if(widget) {
		if(event_handle == "add_option") {
			Inputbox* option_text = dynamic_cast<Inputbox*>(controller_layout.Get_widget("option text"));
			widget->Add_option(option_text->Get_text());
		}
		if(event_handle == "remove_option") {
			widget->Remove_option(widget->Get_selected_option());
		}
	}
}