Ejemplo n.º 1
0
        public void openSettings()
        {
            if (disableTrackingWhenPaused)
            {
                trinusProcessor.disableHeadTracking(true);
            }

            setCurrentPage(UI_PAGE.SETTINGS);

            populateLensCorrectionDropdown();

            getCurrentPageChildComponent <Toggle> ("FpsToggle").isOn = TrinusProcessor.getUserSettings().showFps;
            getCurrentPageChildComponent <Dropdown> ("HeadTrackingDropdown").value = TrinusProcessor.getUserSettings().yawScale - 1;
            updateSlider(getCurrentPageChild("FovSlider"), trinusProcessor.getFov());
            updateSlider(getCurrentPageChild("IpdSlider"), (int)(TrinusProcessor.getUserSettings().ipd * 100));
            //		getCurrentPageChildComponent<Dropdown>("QualityDropdown").GetComponent<Dropdown> ().value = Screen.currentResolution.height == 900? 1 :
            //			(Screen.currentResolution.height < 900? 0 : 2);
            int resolutionIndex = 0;

            if (Screen.height > 500)
            {
                resolutionIndex++;
            }
            if (Screen.height > 800)
            {
                resolutionIndex++;
            }
            if (Screen.height > 1000)
            {
                resolutionIndex++;
            }
            //Debug.Log ("RI " + resolutionIndex + " " + Screen.currentResolution.height + " " + Screen.height);
            getCurrentPageChildComponent <Dropdown> ("QualityDropdown").GetComponent <Dropdown> ().value = resolutionIndex;

            getCurrentPageChild("CustomButton").gameObject.SetActive(lensSettingsPage != null);

            getCurrentPageChildComponent <Toggle> ("MonoscopicToggle").isOn = trinusProcessor.getMonoscopic();
        }