public void ConstructView(DateForm_ModelCollection modelCollection) { ResetOriginalElement(DateElements[0], modelCollection.numOfDates); for (int dateIndex = 1; dateIndex < modelCollection.numOfDates; dateIndex++) { DateElements[dateIndex] = ConstructDateElement(dateIndex); } TileRect.sizeDelta = new Vector2(TileRect.sizeDelta.x, StartingTileHeight + RowOffset); for (int dateIndex = 0; dateIndex < modelCollection.numOfDates; dateIndex++) { if (dateIndex + 1 == modelCollection.TempDay) { DateElements[dateIndex].SetSelected(true); } else { DateElements[dateIndex].SetSelected(false); } } MonthTitle.text = modelCollection.MonthText; }
public void RefreshView(DateForm_ModelCollection modelCollection) { DeconstructView(); ConstructView(modelCollection); }