public void CreateStaticNode(List <ContentNode> list) { this.DestroyNode(); for (int index = 0; index < list.Count; ++index) { ContentNode contentNode = list[index]; int x = index % this.m_ViewWidthNum; int y = index / this.m_ViewWidthNum; int paramIndex = this.GetParamIndex(x, y); contentNode.Initialize(this); contentNode.Setup(paramIndex, x, y, this.GetParam(paramIndex)); this.m_NodeUsed.Add(this.GetNodeKey(x, y), contentNode); } this.UpdateNode(); this.m_SelectNode = -1; }
private void CheckActiveNode() { ContentGrid grid = this.GetGrid(); List <ContentNode> contentNodeList = new List <ContentNode>(); IDictionaryEnumerator enumerator = (IDictionaryEnumerator)this.m_NodeUsed.GetEnumerator(); while (enumerator.MoveNext()) { ContentNode contentNode = (ContentNode)enumerator.Value; if (Object.op_Inequality((Object)contentNode, (Object)null) && (contentNode.IsReMake() || !contentNode.IsValid() || (contentNode.gridX < grid.x - 1 || contentNode.gridX > grid.x + this.m_NodeWidthNum) || (contentNode.gridY < grid.y - 1 || contentNode.gridY > grid.y + this.m_NodeHeightNum))) { contentNodeList.Add(contentNode); } } for (int index = 0; index < contentNodeList.Count; ++index) { ContentNode contentNode = contentNodeList[index]; if (Object.op_Inequality((Object)contentNode, (Object)null)) { contentNode.OnSelectOff(); contentNode.SetActive(false); this.m_NodeUsed.Remove(this.GetNodeKey(contentNode.gridX, contentNode.gridY)); this.m_NodeEmpty.Add(contentNode); } } int x1 = grid.x; int y1 = grid.y; int num1 = grid.x + this.m_NodeWidthNum; int num2 = grid.y + this.m_NodeHeightNum; if (this.isScrollHorizontal) { --x1; ++num1; } if (this.isScrollVertical) { --y1; ++num2; } for (int y2 = y1; y2 < num2; ++y2) { for (int x2 = x1; x2 < num1; ++x2) { if ((this.m_WidthLoop || x2 >= 0 && x2 < this.m_ViewWidthNum) && (this.m_HeightLoop || y2 >= 0 && y2 < this.m_ViewHeightNum) && Object.op_Equality((Object)this.GetNodeUsed(x2, y2), (Object)null)) { int paramIndex = this.GetParamIndex(x2, y2); ContentSource.Param obj = this.GetParam(paramIndex); if (obj != null) { ContentNode nodeEmpty = this.GetNodeEmpty(); if (Object.op_Inequality((Object)nodeEmpty, (Object)null)) { nodeEmpty.Setup(paramIndex, x2, y2, obj); nodeEmpty.SetActive(true); this.m_NodeUsed.Add(this.GetNodeKey(x2, y2), nodeEmpty); } else { Debug.LogError((object)"ノードが不足しています"); } } } } } }