private void OnItemRenderer(int index, GObject obj) { var item = obj as UI_List01; switch (UI.m_MainType.selectedIndex) { case 1: { DRAnimal deploy = UI.m_List.GetData <DRAnimal>(index); item.m_LabelName.SetText(deploy.Name); item.m_LoaderIcon.SetAnimalIcon(deploy.Id); } break; case 2: { DRFacility deploy = UI.m_List.GetData <DRFacility>(index); item.m_LabelName.SetText(deploy.Name); item.m_LoaderIcon.SetFacilityIcon(deploy.Id); } break; case 3: { DRLand deploy = UI.m_List.GetData <DRLand>(index); item.m_LabelName.SetText(deploy.Name); item.m_LoaderIcon.SetLandIcon(deploy.Id); } break; case 4: { DRFence deploy = UI.m_List.GetData <DRFence>(index); item.m_LabelName.SetText(deploy.Name); item.m_LoaderIcon.SetFenceIcon(deploy.Id); } break; } }
private bool OnSelectFacilityType(DRFacility obj) { return(obj.Type == UI.m_FacilityType.selectedIndex); }