Esempio n. 1
0
 private void RebuildGradientList()
 {
     gradientList.Clear();
     foreach (SkySettings sky in GlobalState.Settings.skies)
     {
         AddGradient(sky);
     }
 }
Esempio n. 2
0
        private void LoadProjectItems()
        {
            projects.Clear();
            projectList.Clear();
            List <string> paths = Serialization.SaveManager.Instance.GetProjectThumbnailPaths();

            foreach (string path in paths)
            {
                GameObject item = Instantiate(itemPrefab);
                item.name = Directory.GetParent(path).Name;
                ProjectItem       projectItem = item.GetComponent <ProjectItem>();
                UIDynamicListItem dlItem      = projectList.AddItem(item.transform);
                projectItem.SetListItem(dlItem, path);
                projects.Add(item);
            }

            projectList.ForceUpdate();
            UpdateButtons();
        }
Esempio n. 3
0
        // Update UI: rebuild shots list
        void OnShotManagerChanged()
        {
            shotList.Clear();
            ShotManager sm = ShotManager.Instance;
            int         activeShotCount = 0;

            foreach (Shot shot in sm.shots)
            {
                ShotItem shotItem = ShotItem.GenerateShotItem(shot);
                shotItem.AddListeners(OnUpdateShotName, OnUpdateShotStart, OnUpdateShotEnd, OnUpdateShotColor, OnUpdateShotEnabled, OnSetCamera);
                UIDynamicListItem dlItem = shotList.AddItem(shotItem.transform);
                dlItem.UseColliderForUI       = false;       // dont use the default global collider, sub-widget will catch UI events and propagate them.
                shotItem.transform.localScale = Vector3.one; // Items are hidden (scale 0) while they are not added into a list, so activate the item here.
                shotItem.SetListItem(dlItem);                // link individual elements to their parent list in order to be able to send messages upwards.

                if (shot.enabled)
                {
                    activeShotCount++;
                }
            }
            shotList.CurrentIndex     = sm.ActiveShotIndex;
            activeShotCountLabel.Text = activeShotCount.ToString() + "/" + sm.shots.Count.ToString();
        }
Esempio n. 4
0
 public void ClearPrefabs()
 {
     prefabs.Clear();
     prefabList.Clear();
 }
Esempio n. 5
0
 private void OnClearScene()
 {
     grassList.Clear();
 }
Esempio n. 6
0
 private void OnClearScene()
 {
     cameraList.Clear();
 }
Esempio n. 7
0
 private void OnClearScene()
 {
     lightList.Clear();
 }