Esempio n. 1
0
        public void OnFullScreenBtnClick()
        {
            if (initingVedioData)
            {
                return;
            }
            if (FullScreen.isOn)
            {
                Resolution.interactable = false;

                int index = ImageSetting.GetResolutionIndex(ImageSetting.systemResolutions);
                if (index == Resolution.value)
                {
                    ImageSetting.SetResolution(ImageSetting.systemResolutions, true);
                }
                else
                {
                    Resolution.value = index;
                }

                if (!ImageSetting.isSupportFullScreen)
                {
                    if (notSupportFullSceen)
                    {
                        notSupportFullSceen.enabled = true;
                    }
                }
            }
            else
            {
                Resolution.interactable = true;

                int index = ImageSetting.GetResolutionIndex(ImageSetting.lastWindowResoultion);

                if (index == Resolution.value)
                {
                    ImageSetting.SetResolution(ImageSetting.lastWindowResoultion, false);
                }
                else
                {
                    Resolution.value = index;
                }

                if (!ImageSetting.isSupportFullScreen)
                {
                    if (notSupportFullSceen)
                    {
                        notSupportFullSceen.enabled = false;
                    }
                }
            }
        }
Esempio n. 2
0
        //设置分辨率
        public void SetResolutionData()
        {
            List <Dropdown.OptionData> dataList = new List <Dropdown.OptionData>();
            List <string> supportList           = ImageSetting.GetSupportResolutionList();

            foreach (string s in supportList)
            {
                Dropdown.OptionData data = new Dropdown.OptionData();
                data.text = s;
                dataList.Add(data);
            }
            if (notSupportFullSceen)
            {
                notSupportFullSceen.enabled = false;
            }
            initingVedioData        = true;
            Resolution.options      = dataList;
            Resolution.value        = ImageSetting.GetResolutionIndex(ImageSetting.GetData().currResolution);
            FullScreen.isOn         = ImageSetting.GetData().currWindowType == WindowType.FullScreen;
            Resolution.interactable = !FullScreen.isOn;
            initingVedioData        = false;
        }