Exemplo n.º 1
0
 public void downloadMods()
 {
     foreach (Item mod in downloadableListPopup.selectedItems())
     {
         modManager.installMod((Repo)repoListPopup.selectedItem(), (Mod)mod);
     }
     downloadableListPopup.SetItemList(repoManager.getModListForRepo((Repo)repoListPopup.selectedItem()));
     downloadableListPopup.setSelectedItems(new List <Item> ());
     modListPopup.SetItemList(modManager.installedMods);
     App.Popups.KillCurrentPopup();
 }
Exemplo n.º 2
0
        public void OnCreate(MonoBehaviour parentScene)
        {
            App.ChatUI.Show(false);
            repoListPopup = new GameObject("Repo List").AddComponent <UIListPopup> ();
            repoListPopup.transform.parent = parentScene.transform;
            repoListPopup.Init(new Rect((float)Screen.width / 15.0f + (float)Screen.width / 35.0f, (float)Screen.height / 5.0f + (float)Screen.height / 30.0f + 40.0f, (float)Screen.width / 4.5f, (float)Screen.height / 6.0f * 4.0f - (float)Screen.height / 15.0f - 80.0f), false, true, repoManager.repositories, this, null, null, false, true, true, true, null, true, false);
            repoListPopup.enabled = true;
            repoListPopup.SetOpacity(1f);
            if (repoManager.repositories.Count > 0)
            {
                repoListPopup.setSelectedItem(repoManager.repositories [0]);
            }

            downloadableListPopup = new GameObject("Downloadable List").AddComponent <UIListPopup> ();
            downloadableListPopup.transform.parent = parentScene.transform;
            if (repoManager.repositories.Count > 0)
            {
                downloadableListPopup.Init(new Rect((float)Screen.width / 15.0f + (float)Screen.width / 35.0f * 1.5f + (float)Screen.width / 4.5f, (float)Screen.height / 5.0f + (float)Screen.height / 30.0f + 40.0f, (float)Screen.width / 4.1f, (float)Screen.height / 6.0f * 4.0f - (float)Screen.height / 15.0f - 80.0f), false, true, repoManager.getModListForRepo((Repo)repoListPopup.selectedItem()), this, null, null, true, true, true, true, null, true, false);
            }
            else
            {
                downloadableListPopup.Init(new Rect((float)Screen.width / 15.0f + (float)Screen.width / 35.0f * 1.5f + (float)Screen.width / 4.5f, (float)Screen.height / 5.0f + (float)Screen.height / 30.0f + 40.0f, (float)Screen.width / 4.1f, (float)Screen.height / 6.0f * 4.0f - (float)Screen.height / 15.0f - 80.0f), false, true, new List <Item>(), this, null, null, true, true, true, true, null, true, false);
            }

            downloadableListPopup.enabled = true;
            downloadableListPopup.SetOpacity(1f);

            modListPopup = new GameObject("Mod List").AddComponent <UIListPopup> ();
            modListPopup.transform.parent = parentScene.transform;
            modListPopup.Init(new Rect((float)Screen.width / 15.0f * 9.5f + (float)Screen.width / 35.0f, (float)Screen.height / 5.0f + (float)Screen.height / 30.0f + 40.0f, (float)Screen.width / 15.0f * 4.5f - (float)Screen.width / 35.0f * 2.0f, (float)Screen.height / 6.0f * 4.0f - (float)Screen.height / 15.0f - 80.0f), false, true, modManager.installedMods, this, null, null, true, true, true, true, null, true, true);
            modListPopup.enabled = true;
            modListPopup.SetOpacity(1f);
            modListPopup.setSelectedItems(modManager.installedMods.FindAll(delegate(Item mod) {
                return((mod as LocalMod).enabled);
            }));
        }
Exemplo n.º 3
0
        public void OnCreate(MonoBehaviour parentScene)
        {
            App.ChatUI.Show (false);
            repoListPopup = new GameObject ("Repo List").AddComponent<UIListPopup> ();
            repoListPopup.transform.parent = parentScene.transform;
            repoListPopup.Init (new Rect((float)Screen.width/15.0f+(float)Screen.width/35.0f, (float)Screen.height/5.0f+(float)Screen.height/30.0f+40.0f, (float)Screen.width/4.5f, (float)Screen.height/6.0f*4.0f-(float)Screen.height/15.0f-80.0f), false, true, repoManager.repositories, this, null, null, false, true, true, true, null, true, false);
            repoListPopup.enabled = true;
            repoListPopup.SetOpacity(1f);
            if (repoManager.repositories.Count > 0)
                repoListPopup.setSelectedItem (repoManager.repositories [0]);

            downloadableListPopup = new GameObject ("Downloadable List").AddComponent<UIListPopup> ();
            downloadableListPopup.transform.parent = parentScene.transform;
            if (repoManager.repositories.Count > 0)
                downloadableListPopup.Init (new Rect((float)Screen.width/15.0f+(float)Screen.width/35.0f*1.5f+(float)Screen.width/4.5f, (float)Screen.height/5.0f+(float)Screen.height/30.0f+40.0f, (float)Screen.width/4.1f, (float)Screen.height/6.0f*4.0f-(float)Screen.height/15.0f-80.0f), false, true, repoManager.getModListForRepo((Repo)repoListPopup.selectedItem()), this, null, null, true, true, true, true, null, true, false);
            else
                downloadableListPopup.Init (new Rect((float)Screen.width/15.0f+(float)Screen.width/35.0f*1.5f+(float)Screen.width/4.5f, (float)Screen.height/5.0f+(float)Screen.height/30.0f+40.0f, (float)Screen.width/4.1f, (float)Screen.height/6.0f*4.0f-(float)Screen.height/15.0f-80.0f), false, true, new List<Item>(), this, null, null, true, true, true, true, null, true, false);

            downloadableListPopup.enabled = true;
            downloadableListPopup.SetOpacity(1f);

            modListPopup = new GameObject ("Mod List").AddComponent<UIListPopup> ();
            modListPopup.transform.parent = parentScene.transform;
            modListPopup.Init (new Rect((float)Screen.width/15.0f*9.5f+(float)Screen.width/35.0f, (float)Screen.height/5.0f+(float)Screen.height/30.0f+40.0f, (float)Screen.width/15.0f*4.5f-(float)Screen.width/35.0f*2.0f, (float)Screen.height/6.0f*4.0f-(float)Screen.height/15.0f-80.0f), false, true, modManager.installedMods, this, null, null, true, true, true, true, null, true, true);
            modListPopup.enabled = true;
            modListPopup.SetOpacity(1f);
            modListPopup.setSelectedItems(modManager.installedMods.FindAll(delegate (Item mod) {
                return (mod as LocalMod).enabled;
            }));
        }