Esempio n. 1
0
    public void Init()
    {
        STBIndex     = 0;
        PTBIndex     = 0;
        IsEnter      = false;
        IsShow       = false;
        IsAllowEvent = true;

        TensileBtnImage = TensileBtn.GetComponent <Image>();
        TensileBtnText  = TensileBtn.GetComponentInChildren <Text>();

        foreach (MixedButton btn in StereoTypeBtns)
        {
            btn.SelectBtnCallback = SelectSTB;
        }

        foreach (MixedButton btn in ProjectionTypeBtns)
        {
            btn.SelectBtnCallback = SelectPTB;
        }

        EventTriggerListener.Get(this.gameObject).OnPtEnter = OnPointerEnter;
        EventTriggerListener.Get(this.gameObject).OnPtExit  = OnPointerExit;

        TensileBtn.SelectBtnCallback       = ClickTensileBtn;
        TensileBtn.PointerEnterBtnCallback = OnPointerEnterBtn;
        TensileBtn.PointerExitBtnCallback  = OnPointerExitBtn;
    }
Esempio n. 2
0
    public void Show()
    {
        if (IsShow)
        {
            return;
        }

        IsShow = true;

        if (PlayerDataControl.GetInstance().CurPlayingMode == PlayingURLMode.Local ||
            PlayerDataControl.GetInstance().CurPlayingMode == PlayingURLMode.LiveUrl)
        {
            if (VideoPlayManage.CurLoopType == LoopType.SinglePlay)
            {
                SingleCycleBtn.SetSelected(true);
            }
            else
            {
                SingleCycleBtn.SetSelected(false);
            }
        }
        else if (PlayerDataControl.GetInstance().CurPlayingMode == PlayingURLMode.KTTV)
        {
            SingleCycleBtn.SetSelected(false);
            SingleCycleBtnIsDisable = true;
            Image SingleCycleBtnImage = SingleCycleBtn.GetComponent <Image>();
            SingleCycleBtnImage.raycastTarget = false;
            SingleCycleBtnImage.color         = new Color(SingleCycleBtnImage.color.r, SingleCycleBtnImage.color.g, SingleCycleBtnImage.color.b, 0.3f);
            Text SingleCycleBtnText = SingleCycleBtn.GetComponentInChildren <Text>();
            SingleCycleBtnText.color = new Color(SingleCycleBtnText.color.r, SingleCycleBtnText.color.g, SingleCycleBtnText.color.b, 0.3f);
        }

        if (CinemaPanel.IsPlayLoop)
        {
            AutoPlayBtn.SetSelected(true);
        }
        else
        {
            AutoPlayBtn.SetSelected(false);
        }

        this.gameObject.SetActive(true);
    }
Esempio n. 3
0
    private void SetUIState()
    {
        if (FourKBtnIsDisable)
        {
            FourKBtn.enabled = false;
            FourKBtn.GetComponent <Image>().raycastTarget = false;
            Text FourKBtnText = FourKBtn.GetComponentInChildren <Text>();
            FourKBtnText.color = new Color(FourKBtnText.color.r, FourKBtnText.color.g, FourKBtnText.color.b, 0.3f);
        }
        else
        {
            FourKBtn.enabled = true;
            FourKBtn.GetComponent <Image>().raycastTarget = true;
            Text FourKBtnText = FourKBtn.GetComponentInChildren <Text>();
            FourKBtnText.color = new Color(FourKBtnText.color.r, FourKBtnText.color.g, FourKBtnText.color.b, 1);
        }
        if (FHDBtnIsDisable)
        {
            FHDBtn.enabled = false;
            FHDBtn.GetComponent <Image>().raycastTarget = false;
            Text FHDBtnText = FHDBtn.GetComponentInChildren <Text>();
            FHDBtnText.color = new Color(FHDBtnText.color.r, FHDBtnText.color.g, FHDBtnText.color.b, 0.3f);
        }
        else
        {
            FHDBtn.enabled = true;
            FHDBtn.GetComponent <Image>().raycastTarget = true;
            Text FHDBtnText = FHDBtn.GetComponentInChildren <Text>();
            FHDBtnText.color = new Color(FHDBtnText.color.r, FHDBtnText.color.g, FHDBtnText.color.b, 1);
        }
        if (SHDBtnIsDisable)
        {
            SHDBtn.enabled = false;
            SHDBtn.GetComponent <Image>().raycastTarget = false;
            Text SHDBtnText = SHDBtn.GetComponentInChildren <Text>();
            SHDBtnText.color = new Color(SHDBtnText.color.r, SHDBtnText.color.g, SHDBtnText.color.b, 0.3f);
        }
        else
        {
            SHDBtn.enabled = true;
            SHDBtn.GetComponent <Image>().raycastTarget = true;
            Text SHDBtnText = SHDBtn.GetComponentInChildren <Text>();
            SHDBtnText.color = new Color(SHDBtnText.color.r, SHDBtnText.color.g, SHDBtnText.color.b, 1);
        }
        if (AutoBtnIsDisable)
        {
            AutoBtn.enabled = false;
            AutoBtn.GetComponent <Image>().raycastTarget = false;
            Text AutoBtnText = AutoBtn.GetComponentInChildren <Text>();
            AutoBtnText.color = new Color(AutoBtnText.color.r, AutoBtnText.color.g, AutoBtnText.color.b, 0.3f);
        }
        else
        {
            AutoBtn.enabled = true;
            AutoBtn.GetComponent <Image>().raycastTarget = true;
            Text AutoBtnText = AutoBtn.GetComponentInChildren <Text>();
            AutoBtnText.color = new Color(AutoBtnText.color.r, AutoBtnText.color.g, AutoBtnText.color.b, 1);
        }

        OldDefnBtn.SetSelected(false);
        switch (CurDefinitionModel)
        {
        case DefinitionModel.UNKOWN:
            AutoBtn.SetSelected(true);
            OldDefnBtn = AutoBtn;
            break;

        case DefinitionModel.DEFINITION_1080P:
            FHDBtn.SetSelected(true);
            OldDefnBtn = FHDBtn;
            break;

        case DefinitionModel.DEFINITION_720P:
            SHDBtn.SetSelected(true);
            OldDefnBtn = SHDBtn;
            break;

        case DefinitionModel.DEFINITION_4K:
            FourKBtn.SetSelected(true);
            OldDefnBtn = FourKBtn;
            break;

        default:
            break;
        }

        //switch (AutoDefinitionModel)
        //{
        //case DefinitionModel.DEFINITION_4K:
        //    AutoBtn.GetComponentInChildren<Text>().SetTextByKey("Cinema.VideoPlayerPanel.VariablePanel.DefinitionPanel.AutoBtn.Text", "4K");
        //    break;
        //case DefinitionModel.DEFINITION_1080P:
        //    AutoBtn.GetComponentInChildren<Text>().SetTextByKey("Cinema.VideoPlayerPanel.VariablePanel.DefinitionPanel.AutoBtn.Text", "1080P");
        //    break;
        //case DefinitionModel.DEFINITION_720P:
        //    AutoBtn.GetComponentInChildren<Text>().SetTextByKey("Cinema.VideoPlayerPanel.VariablePanel.DefinitionPanel.AutoBtn.Text", "720P");
        //    break;
        //default:
        //    AutoBtn.GetComponentInChildren<Text>().SetTextByKey("Cinema.VideoPlayerPanel.VariablePanel.DefinitionPanel.AutoBtn.Text", "720P");
        //    break;
        //}
    }