/*this is used when player exists the game, want to close all panels, and not allow player to "pause" during the load*/
    public void closeAllPanels()
    {
        SwitchToPanel.closeAllPanels(this.allHackingGamePanels);

        Time.timeScale = 1;
        allowPauseKey  = false;
    }
    public void continueButton()
    {
        SwitchToPanel.closeAllPanels(this.allHackingGamePanels);
        Time.timeScale = 1;

        blurScript.enabled = false;
    }
 public void inventoryTutorial()
 {
     if (playerDataScript.hasDoneCampInventoryTutorial == false)
     {
         playerDataScript.hasDoneCampInventoryTutorial = true;
         SwitchToPanel.activatePanel(campInventoryTutorialPanel, allTutorialPanels);
     }
 }
        public override bool PrepareSave(SwitchToPanel switchToPanel)
        {
            // validate that we have a post api url
            if (WeblogName == String.Empty)
            {
                switchToPanel();
                DisplayMessage.Show(MessageId.RequiredFieldOmitted, FindForm(), TextHelper.StripAmpersands(Res.Get(StringId.WeblogName)));
                textBoxWeblogName.Focus();
                return(false);
            }

            return(true);
        }
    IEnumerator clickToPanelWait(GameObject panel)
    {
        if (firstTime == true)
        {
            firstTime = false;

            yield return(new WaitForSeconds(DELAY_B4_NEXT_TUT));

            SwitchToPanel.activatePanel(panel, this.allTutorialPanels);


            firstTime = true;
        }
    }
示例#6
0
 public override bool PrepareSave(SwitchToPanel switchToPanel)
 {
     try
     {
         ValidateConfig();
     }
     catch (StaticSiteConfigValidationException ex)
     {
         MessageBox.Show(ex.Text, ex.Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         switchToPanel();
         return(false);
     }
     return(true);
 }
示例#7
0
        public override bool PrepareSave(SwitchToPanel switchToPanel)
        {
            if (FileUploadSupport == FileUploadSupport.FTP)
            {
                FtpUploaderSettings ftpUploaderSettings = new FtpUploaderSettings(TemporaryBlogSettings.FileUploadSettings);
                if (ftpUploaderSettings.FtpServer == String.Empty)
                {
                    switchToPanel();
                    DisplayMessage.Show(MessageId.FtpSettingsRequired, FindForm());
                    buttonConfigureFtp.Focus();
                    return(false);
                }
            }

            return(true);
        }
示例#8
0
        public override bool PrepareSave(SwitchToPanel switchToPanel)
        {
            string urls = txtUrls.Text;

            if (urls.Trim().Length == 0 && chkPing.Checked)
            {
                switchToPanel();
                txtUrls.Focus();
                DisplayMessage.Show(MessageId.PingUrlRequired);
                return(false);
            }

            int insertedCharacters = 0;

            for (Match m = Regex.Match(urls, "([^\r\n]+)"); m.Success; m = m.NextMatch())
            {
                string url = m.Value.Trim();
                if (url.Length == 0)
                {
                    continue;
                }
                if (!UrlHelper.IsUrl(url))
                {
                    int realIndex = m.Index + insertedCharacters;

                    const string DEFAULT_SCHEME = "http://";

                    if (UrlHelper.IsUrl(DEFAULT_SCHEME + url))
                    {
                        txtUrls.Text        = txtUrls.Text.Substring(0, realIndex) + DEFAULT_SCHEME + txtUrls.Text.Substring(realIndex);
                        insertedCharacters += DEFAULT_SCHEME.Length;
                    }
                    else
                    {
                        switchToPanel();
                        txtUrls.Select(realIndex, m.Length);
                        txtUrls.Focus();
                        txtUrls.HideSelection = false;
                        DisplayMessage.Show(MessageId.InvalidPingUrl);
                        txtUrls.HideSelection = true;
                        return(false);
                    }
                }
            }
            return(true);
        }
    // Use this for initialization
    void Start()
    {
        playerDataScript = GameObject.Find("Player Data Manager").GetComponent <PlayerDataScript> ();

        allTutorialPanels.Add(campTutorialPanel);
        allTutorialPanels.Add(campShopTutorialPanel);
        allTutorialPanels.Add(campInventoryTutorialPanel);

        closeTutorialPanels();

        if (playerDataScript.hasDoneCampTutorial == false)
        {
            SwitchToPanel.activatePanel(campTutorialPanel, allTutorialPanels);
            playerDataScript.hasDoneCampTutorial = true;
        }

        //set on click listener for shop and inventory button to show tutorial
        shopButton.onClick.AddListener(() => shopTutorial());
        inventoryButton.onClick.AddListener(() => inventoryTutorial());
        inventoryButton2.onClick.AddListener(() => inventoryTutorial());
    }
示例#10
0
    //public SwitchToPanel switchToPanelScript;

    // Use this for initialization
    void Start()
    {
        //initialise the game panels here into the arraylist
        allCampPanels.Add(campPanel);
        allCampPanels.Add(vendMachinePanel);
        allCampPanels.Add(shopPanel);
        allCampPanels.Add(savePanel);
        allCampPanels.Add(mainMenuPanel);
        allCampPanels.Add(inventoryPanel);
        allCampPanels.Add(quitPanel);


        //always want campPanel to be on
        SwitchToPanel.activatePanel(campPanel, allCampPanels);


        //dont allow player to shoot or rotate in the camp scene
        PlayerController player = GameObject.Find("Player").GetComponent <PlayerController>();

        player.allowMouseLeftClick = false;
        player.allowMouseRotation  = false;
    }
示例#11
0
        public override bool PrepareSave(SwitchToPanel switchToPanel)
        {
            // validate that we have a post api url
            if (WeblogName == String.Empty)
            {
                switchToPanel();
                DisplayMessage.Show(MessageId.RequiredFieldOmitted, FindForm(), TextHelper.StripAmpersands(Res.Get(StringId.WeblogName)));
                textBoxWeblogName.Focus();
                return false;
            }

            return true;
        }
示例#12
0
 public void clickToPanel(GameObject panel)
 {
     blurScript.enabled = true;
     SwitchToPanel.activatePanel(panel, this.allHackingGamePanels);
 }
示例#13
0
 /*closes all item info panels, and then opens the specified panel*/
 void SwitchToItemContent(GameObject content)
 {
     SwitchToPanel.activatePanel(content, itemContentsArray);
 }
示例#14
0
 /*closes all the item info panels*/
 void closeAllItemContent()
 {
     SwitchToPanel.closeAllPanels(itemContentsArray);
 }
 public override bool PrepareSave(SwitchToPanel switchToPanel)
 {
     return true;
 }
 public void closeTutorialPanels()
 {
     SwitchToPanel.closeAllPanels(allTutorialPanels);
 }
        public override bool PrepareSave(SwitchToPanel switchToPanel)
        {
            string urls = txtUrls.Text;

            if (urls.Trim().Length == 0 && chkPing.Checked)
            {
                switchToPanel();
                txtUrls.Focus();
                DisplayMessage.Show(MessageId.PingUrlRequired);
                return false;
            }

            int insertedCharacters = 0;
            for (Match m = Regex.Match(urls, "([^\r\n]+)"); m.Success; m = m.NextMatch())
            {
                string url = m.Value.Trim();
                if (url.Length == 0)
                    continue;
                if (!UrlHelper.IsUrl(url))
                {
                    int realIndex = m.Index + insertedCharacters;

                    const string DEFAULT_SCHEME = "http://";

                    if (UrlHelper.IsUrl(DEFAULT_SCHEME + url))
                    {
                        txtUrls.Text = txtUrls.Text.Substring(0, realIndex) + DEFAULT_SCHEME + txtUrls.Text.Substring(realIndex);
                        insertedCharacters += DEFAULT_SCHEME.Length;
                    }
                    else
                    {
                        switchToPanel();
                        txtUrls.Select(realIndex, m.Length);
                        txtUrls.Focus();
                        txtUrls.HideSelection = false;
                        DisplayMessage.Show(MessageId.InvalidPingUrl);
                        txtUrls.HideSelection = true;
                        return false;
                    }
                }
            }
            return true;
        }
示例#18
0
        public override bool PrepareSave(SwitchToPanel switchToPanel)
        {
            if (FileUploadSupport == FileUploadSupport.FTP)
            {
                FtpUploaderSettings ftpUploaderSettings = new FtpUploaderSettings(TemporaryBlogSettings.FileUploadSettings);
                if (ftpUploaderSettings.FtpServer == String.Empty)
                {
                    switchToPanel();
                    DisplayMessage.Show(MessageId.FtpSettingsRequired, FindForm());
                    buttonConfigureFtp.Focus();
                    return false;
                }
            }

            return true;

        }
示例#19
0
 public void closeAllPanels()
 {
     SwitchToPanel.closeAllPanels(allStartUIPanels);
 }
 /// <summary>
 /// Tells the preferences panel to prepare for save.
 /// Any values should be validated, and an error message
 /// displayed to the user if necessary.
 ///
 /// The SwitchToPanel delegate can be called to force
 /// the containing control to display the panel.
 ///
 /// Returns true if validation was successful, false if
 /// not (i.e. the save operation should be aborted).
 /// </summary>
 public virtual bool PrepareSave(SwitchToPanel switchToPanel)
 {
     return(true);
 }
示例#21
0
    /*generic function for OnClick() button calls. attach this to a button and type in the
     * parameter to switch to the specified panel. Always keeps the camp panel active*/

    public void clickToPanel(GameObject panel)
    {
        SwitchToPanel.activatePanel(panel, allCampPanels);
        //we always want camp Panel to be active
        campPanel.SetActive(true);
    }
 /// <summary>
 /// Tells the preferences panel to prepare for save.
 /// Any values should be validated, and an error message
 /// displayed to the user if necessary.
 ///
 /// The SwitchToPanel delegate can be called to force
 /// the containing control to display the panel.
 ///
 /// Returns true if validation was successful, false if
 /// not (i.e. the save operation should be aborted).
 /// </summary>
 public virtual bool PrepareSave(SwitchToPanel switchToPanel)
 {
     return true;
 }
 public void clickToTutorialPanel(GameObject panel)
 {
     SwitchToPanel.activatePanel(panel, allTutorialPanels);
 }
 public override bool PrepareSave(SwitchToPanel switchToPanel)
 {
     return(true);
 }
示例#25
0
 void switchPanelTab(GameObject panel)
 {
     //SwitchToPanel.closeAllPanels (allTabPanels);
     SwitchToPanel.activatePanel(panel, allTabPanels);
 }