Ejemplo n.º 1
0
 public void ButtonClicked(UIListPopup popup, ECardListButton button, Item card)
 {
     if (popup == modListPopup) {
         if (button == ECardListButton.BUTTON_LEFT)
             if ((card as LocalMod).enabled)
                 loader.moveModUp ((LocalMod)card);
         else if (button == ECardListButton.BUTTON_RIGHT)
             if ((card as LocalMod).enabled)
                 loader.moveModDown((LocalMod)card);
     }
 }
Ejemplo n.º 2
0
 public void ButtonClicked(UIListPopup popup, ECardListButton button, Item card)
 {
     if (popup == modListPopup)
     {
         if (button == ECardListButton.BUTTON_LEFT)
         {
             if ((card as LocalMod).enabled)
             {
                 loader.moveModUp((LocalMod)card);
             }
             else if (button == ECardListButton.BUTTON_RIGHT)
             {
                 if ((card as LocalMod).enabled)
                 {
                     loader.moveModDown((LocalMod)card);
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 public void ItemClicked(UIListPopup popup, Item card)
 {
     if (popup == repoListPopup)
     {
         repoListPopup.setSelectedItem(card);
         downloadableListPopup.SetItemList(repoManager.getModListForRepo((Repo)repoListPopup.selectedItem()));
     }
     if (popup == downloadableListPopup)
     {
         System.Diagnostics.Process.Start((repoListPopup.selectedItem() as Repo).url + "mod/" + (downloadableListPopup.selectedItem() as Mod).id);
     }
     if (popup == modListPopup)
     {
         if (modListPopup.selectedItems().Contains(card))
         {
             modManager.enableMod((LocalMod)card);
         }
         else
         {
             modManager.disableMod((LocalMod)card);
         }
         modListPopup.SetItemList(modManager.installedMods);
     }
 }
Ejemplo n.º 4
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);
            }));
        }
Ejemplo n.º 5
0
 public void ItemClicked(UIListPopup popup, Item card)
 {
 }
Ejemplo n.º 6
0
 public void ButtonClicked(UIListPopup popup, ECardListButton button, List<Item> selectedCards)
 {
 }
Ejemplo n.º 7
0
 public void ButtonClicked(UIListPopup popup, ECardListButton button)
 {
 }
Ejemplo n.º 8
0
 public void ButtonClicked(UIListPopup popup, ECardListButton button, List<Item> selectedCards, Item card)
 {
     this.ButtonClicked (popup, button, card);
 }
Ejemplo n.º 9
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;
            }));
        }
Ejemplo n.º 10
0
 public void ButtonClicked(UIListPopup popup, ECardListButton button, List <Item> selectedCards, Item card)
 {
     this.ButtonClicked(popup, button, card);
 }
Ejemplo n.º 11
0
 public void ItemCanceled(UIListPopup popup, Item card)
 {
     deinstallCache = (LocalMod)card;
     App.Popups.ShowOkCancel (this, "removeMod", "Uninstallation Warning", "Are you sure you want to remove " + card.getName () + "?", "Uninstall", "Cancel");
 }
Ejemplo n.º 12
0
 public void ItemCanceled(UIListPopup popup, Item card)
 {
     deinstallCache = (LocalMod)card;
     App.Popups.ShowOkCancel(this, "removeMod", "Uninstallation Warning", "Are you sure you want to remove " + card.getName() + "?", "Uninstall", "Cancel");
 }
Ejemplo n.º 13
0
 public void ItemHovered(UIListPopup popup, Item card)
 {
 }
Ejemplo n.º 14
0
 public void ItemButtonClicked(UIListPopup popup, Item card)
 {
 }
Ejemplo n.º 15
0
 public void ItemHovered(UIListPopup popup, Item card)
 {
 }
Ejemplo n.º 16
0
        public void OnCreate(MonoBehaviour parentScene)
        {
            //null, null, true, true, false, false, ResourceManager.LoadTexture ("ChatUI/buttonicon_add"), true);
            //tradeSkin = (GUISkin)Resources.Load ("_GUISkins/TradeSystem");
            //tradeSkinClose = (GUISkin)Resources.Load ("_GUISkins/TradeSystemCloseButton");
            //lobbySkin = (GUISkin)Resources.Load ("_GUISkins/Lobby");

            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, repositories, this, null, null, true, true, true, true, null, true, false);
            repoListPopup.enabled = true;
            repoListPopup.SetOpacity(1f);

            downloadableListPopup = new GameObject ("Downloadable List").AddComponent<UIListPopup> ();
            downloadableListPopup.transform.parent = parentScene.transform;
            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, downloadableMods, 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, installedMods, this, null, null, true, true, true, true, null, true, true);
            modListPopup.enabled = true;
            modListPopup.SetOpacity(1f);
        }
Ejemplo n.º 17
0
 public void ItemClicked(UIListPopup popup, Item card)
 {
     if (popup == repoListPopup) {
         repoListPopup.setSelectedItem(card);
         downloadableListPopup.SetItemList (repoManager.getModListForRepo ((Repo)repoListPopup.selectedItem ()));
     }
     if (popup == downloadableListPopup) {
         System.Diagnostics.Process.Start((repoListPopup.selectedItem() as Repo).url+"mod/"+(downloadableListPopup.selectedItem() as Mod).id);
     }
     if (popup == modListPopup) {
         if (modListPopup.selectedItems ().Contains (card))
             modManager.enableMod ((LocalMod)card);
         else
             modManager.disableMod ((LocalMod)card);
         modListPopup.SetItemList (modManager.installedMods);
     }
 }