// on PopupHolder init protected void PopupHolderInit(object sender, EventArgs e) { PopupHolder popupHolder = sender as PopupHolder; // Add Image Properties popup to be loaded on demand popupHolder.Preload.Add(new ImageProperties() { // use our custom Images Browser BrowserType = (typeof(MyImageBrowser)).AssemblyQualifiedName }); // Add our custom images browser to be loaded on demand popupHolder.Preload.Add(new MyImageBrowser() { // use obout Treeview for navigation UseOboutTree = true, // set some Treeview features TreeFeatures = { // image for the folder nodes FolderImageUrl = "~/treeview/icons/folder_old.gif", // images for leaf nodes LeafImages = { // node image for pictures with any extensions new LeafImage() { Extensions = "*", Url= "~/treeview/img/picture.png" } } } }); }
private bool AreThereWeaknesses() { bool areThereWeaknesses = playerHand.AreThereWeaknesses(); PopupHolder popupHolder = FindObjectOfType <PopupHolder>(); if (areThereWeaknesses) { popupHolder.SpawnWeaknessesInHandPopup(); return(true); } else { popupHolder.DestroyAllPopups(); return(false); } }
private bool DiscardDownToMaxHandSize() { int extraCardsInHand = playerHand.GetCardsInHandCount() - character.GetStartingHandSize(); PopupHolder popupHolder = FindObjectOfType <PopupHolder>(); if (skipEndTurnDiscard) { skipEndTurnDiscard = false; return(true); } if (extraCardsInHand > 0) { List <Card> cardsInHand = playerHand.GetCardsInHand(); configData.GetCardPicker().Initialize(cardsInHand, extraCardsInHand, "DiscardCardsFromHand"); return(false); } else { return(true); } }