public void Set(UnitAlbumPanel parentPanel, AlbumController.EAlbumType albumType) { _parentPanel = parentPanel; _type = albumType; Text.text = AlbumController.GetAlbumTypeName(_type); onEnable(); }
// public void Set(Sprite s, AlbumController.EAlbumType albumType, bool isLocked) { set(s); _albumType = albumType; if (false == isLocked) { unlock(); } }
private CGScrollView getCGScrollView(AlbumController.EAlbumType albumType) { int count = _cgScrollViewList.Count; for (int i = 0; i < count; ++i) { if (_cgScrollViewList[i].AlbumType == albumType) { return(_cgScrollViewList[i]); } } return(null); }
// public void ShowCGList(AlbumController.EAlbumType albumType) { hideAllCGScrollView(); CGScrollView scrollView = getCGScrollView(albumType); if (null == scrollView) { Log.Error(string.Format("not found CGScrollView; {0}", albumType)); return; } scrollView.Show(); }
private void addAlbumType(AlbumController.EAlbumType albumType) { CGScrollView scrollView = Instantiate(PrefCGScrollView); scrollView.transform.SetParent(CGScrollViewListPanel.transform, false); scrollView.Set(AlbumId, albumType); scrollView.Hide(); _cgScrollViewList.Add(scrollView); AlbumTypeToggle toggle = Instantiate(PrefAlbumTypeToggle); toggle.transform.SetParent(ToggleGroup.transform, false); toggle.Set(ToggleGroup); toggle.Set(this, albumType); }
// @note : called before Start(), after OnEnabled() public void Set(int albumId, AlbumController.EAlbumType albumType) { if (false == AlbumController.IsValid(albumId)) { Log.Error(string.Format("invalid album id; {0}", albumId)); return; } if (AlbumController.EAlbumType.MAX == albumType) { Log.Error("invalid album type"); return; } AlbumId = albumId; AlbumType = albumType; _buttonCount = createButtons(); }