Use MyGUI's castType for widget casts