Exemple #1
0
        public void Init(IntersectionTemplate template)
        {
            Screenshot.texture     = template.HasPreview ? template.Preview : Empty;
            NoScreenshot.isVisible = !template.HasPreview;

            Roads.text      = template.Roads.ToString();
            Lines.text      = template.Lines.ToString();
            Crosswalks.text = template.Crosswalks.ToString();
            Fillers.text    = template.Fillers.ToString();

            for (var i = 0; i < template.Enters.Length; i += 1)
            {
                Temp.Add(AddTitleData(string.Format(NodeMarkup.Localize.PresetInfo_RoadPoints, i + 1)));
                Temp.Add(AddValueData(template.Enters[i].Points.ToString()));
            }

            Titles.autoLayout = true;
            Titles.autoLayout = false;
            Titles.FitChildrenVertically();
            Values.autoLayout = true;
            Values.autoLayout = false;
            Values.FitChildrenVertically();

            Init();
        }