예제 #1
0
        private void ShowSplitWindow()
        {
            _viewModel.rootActiveSelf = true;
            inputFieldCom.ActivateInputField();
            int num     = splitUIAdapter.Info.Num;
            int halfNum = num / 2;

            //刷新titiel
            _viewModel.titleText = I2.Loc.ScriptLocalization.client_common.word19 + splitUIAdapter.Info.propName;

            ////刷新左值
            //_viewModel.leftText = (num / 2).ToString();

            //刷新右值
            _viewModel.rightText = num.ToString();

            //刷新输入框
            inputFieldCom.text = (halfNum).ToString();

            //刷新进度条
            sliderCom.value = (float)(halfNum) / num;

            //记录当前拆分的道具
            //this.minValue = 1;
            this.maxValue   = splitUIAdapter.Info.Num;
            this.categoryId = splitUIAdapter.Info.categoryId;
            this.propId     = splitUIAdapter.Info.propId;
            this.propName   = splitUIAdapter.Info.propName;
            this.itemKey    = splitUIAdapter.Info.key;
            lastInputValue  = halfNum;
            lastSliderValue = sliderCom.value;

            _viewModel.splitBtnInteractable = true;
            splitUIAdapter.RegisterKeyReceive(keyReveiver);
        }
예제 #2
0
 private void Show()
 {
     SetActive(true);
     Open();
     if (showTouchScreenKeyboard)
     {
         m_touchScreenKeyboard = TouchScreenKeyboard.Open(inputField.text);
     }
     inputField.ActivateInputField();
     EventSystem.current.SetSelectedGameObject(inputField.gameObject);
 }