//----------------------------------------------------------------------------
        public bool GetUIObject()
        {
            if (m_objUI != null)
            {
                GameObject temp   = m_uiTrans.Find(m_centerAnchorPath + "sumPanel/temp").gameObject;
                Transform  parent = m_uiTrans.Find(m_centerAnchorPath + "sumPanel");
                for (int i = 0; i <= MaxCount; i++)
                {
                    GameObject obj = UnityEngine.Object.Instantiate(temp, parent) as GameObject;
                    obj.name = i.ToString();
                    obj.transform.localScale    = Vector3.one;
                    obj.transform.localRotation = Quaternion.identity;
                    obj.transform.localPosition = temp.transform.localPosition + new Vector3(i * 100, 0, 0);
                    SumTemp sumTemp = new SumTemp(obj, this);
                    m_SumTemp.Add(sumTemp);
                }

                UnityEngine.Object.DestroyImmediate(temp);
                m_inputField        = GetUIComponent <InputField>(m_centerAnchorPath + "panel/inputField");
                m_populatLab        = GetUIComponent <Text>(m_centerAnchorPath + "panel/title2");
                m_populatLab.text   = string.Empty;
                afterLoopScrollView = GetUIComponent <LoopScrollerView>(m_centerAnchorPath + "afterFiltering/scrollView");
                m_totalAfter        = GetUIComponent <Text>(m_centerAnchorPath + "afterFiltering/after");
                m_totalAfter.text   = string.Empty;
                m_allToggle         = GetUIComponent <Toggle>(m_centerAnchorPath + "selectGroup/all");
                m_allToggle.onValueChanged.AddListener((bool isOn) => OnAllToggleChange(isOn));
                m_clearToggle = GetUIComponent <Toggle>(m_centerAnchorPath + "selectGroup/clear");
                m_clearToggle.onValueChanged.AddListener((bool isOn) => OnClearToggleChange(isOn));
                m_normalToggle = GetUIComponent <Toggle>(m_centerAnchorPath + "selectGroup/normal");
                m_normalToggle.onValueChanged.AddListener((bool isOn) => OnNormalToggleChange(isOn));
            }
            return(true);
        }
Esempio n. 2
0
 //----------------------------------------------------------------------------
 public bool GetUIObject()
 {
     if (m_objUI != null)
     {
         m_redRecommendedData       = m_uiTrans.Find(m_downAnchorPath + "redsmarego/title").GetComponent <Text>();
         m_redRecommendedData.text  = string.Empty;
         m_blueRecommendedData      = m_uiTrans.Find(m_downAnchorPath + "bluesmarego/title").GetComponent <Text>();
         m_blueRecommendedData.text = string.Empty;
         loopScrollView             = m_uiTrans.Find(m_centerAnchorPath + "pan_scroll").GetComponent <LoopScrollerView>();
     }
     return(true);
 }
Esempio n. 3
0
 //----------------------------------------------------------------------------
 public bool GetUIObject()
 {
     if (m_objUI != null)
     {
         m_loopScrollView          = GetUIComponent <LoopScrollerView>(m_centerAnchorPath + "filterResult/scrollView");
         m_winResultScroll         = GetUIComponent <LoopScrollerView>(m_centerAnchorPath + "winningResult/scrollView");
         m_totalNum                = GetUIComponent <Text>(m_centerAnchorPath + "filterResult/after");
         m_totalNum.text           = string.Empty;
         m_curPeriod               = GetUIComponent <Text>(m_centerAnchorPath + "curPeriod");
         m_curPeriod.text          = string.Empty;
         m_dropdown                = GetUIComponent <GDropDown>(m_centerAnchorPath + "seePanel/periodSelection");
         m_dropdown.OnValueChanged = OnDropValueChanged;
         if (drawData.tcbStatiDataList != null && drawData.tcbStatiDataList.Count > 0)
         {
             List <string> str = new List <string>();
             for (int i = 0; i < drawData.tcbStatiDataList.Count; i++)
             {
                 str.Add(drawData.tcbStatiDataList[i].numperiods.ToString());
             }
             m_dropdown.AddOptions(str);
         }
         m_dropdown.RefreshShowValue();
         m_prizeNum      = GetUIComponent <Text>(m_centerAnchorPath + "seePanel/number");
         m_prizeNum.text = string.Empty;
         m_tempParent    = m_uiTrans.Find(m_centerAnchorPath + "seePanel/selectBall");
         temp            = m_tempParent.Find("Btn").gameObject;
         for (int i = 0; i < ballMaxNumber; i++)
         {
             var redToggle = Object.Instantiate(temp, m_tempParent) as GameObject;
             redToggle.name = (i + 1).ToString();
             redToggle.transform.localScale    = Vector3.one;
             redToggle.transform.localRotation = Quaternion.identity;
             redToggle.transform.Find("Label").GetComponent <Text>().text = (i + 1).ToString();
             var toggle = redToggle.GetComponent <Toggle>();
             toggle.onValueChanged.AddListener((bool isOn) => OnBallToggleChange(toggle, isOn));
             ballToggleList.Add(toggle);
         }
         Object.DestroyImmediate(temp);
         for (int i = 1; i <= maxRewardLevel; i++)
         {
             var text = GetUIComponent <Text>(string.Format(m_centerAnchorPath + "seePanel/result/{0}", i));
             text.text = string.Empty;
             m_winningResult.Add(text);
         }
     }
     return(true);
 }
 //----------------------------------------------------------------------------
 public bool GetUIObject()
 {
     if (m_objUI != null)
     {
         m_inputField        = GetUIComponent <InputField>(m_centerAnchorPath + "panel/inputField");
         afterLoopScrollView = GetUIComponent <LoopScrollerView>(m_centerAnchorPath + "afterFiltering/scrollView");
         m_totalAfter        = GetUIComponent <Text>(m_centerAnchorPath + "afterFiltering/after");
         m_totalAfter.text   = string.Empty;
         m_allToggle         = GetUIComponent <Toggle>(m_centerAnchorPath + "selectGroup/all");
         m_allToggle.onValueChanged.AddListener((bool isOn) => OnAllToggleChange(isOn));
         m_clearToggle = GetUIComponent <Toggle>(m_centerAnchorPath + "selectGroup/clear");
         m_clearToggle.onValueChanged.AddListener((bool isOn) => OnClearToggleChange(isOn));
         m_normalToggle = GetUIComponent <Toggle>(m_centerAnchorPath + "selectGroup/normal");
         m_normalToggle.onValueChanged.AddListener((bool isOn) => OnNormalToggleChange(isOn));
     }
     return(true);
 }
Esempio n. 5
0
 //----------------------------------------------------------------------------
 public bool GetUIObject()
 {
     if (m_objUI != null)
     {
         selectedRedBallParent  = GetUIComponent <Transform>(m_centerAnchorPath + "selectRedBallGroup");
         selectedRedBallTemp    = selectedRedBallParent.FindChildGO("Button");
         selectedBlueBallParent = GetUIComponent <Transform>(m_centerAnchorPath + "selectBlueBallGroup");
         selectedBlueBallTemp   = selectedBlueBallParent.FindChildGO("Button");
         loopScrollView         = GetUIComponent <LoopScrollerView>(m_centerAnchorPath + "scrollView");
         m_ballRotation         = GetUIComponent <Toggle>(m_downAnchorPath + "toggle");
         m_ballRotation.onValueChanged.AddListener((bool isOn) => IsToggleOn(isOn));
         m_redBallLab  = GetUIComponent <Text>(m_centerAnchorPath + "redBallNumber");
         m_blueBallLab = GetUIComponent <Text>(m_centerAnchorPath + "blueBallNumber");
         m_totalLab    = GetUIComponent <Text>(m_centerAnchorPath + "total");
     }
     return(true);
 }
Esempio n. 6
0
        //----------------------------------------------------------------------------
        protected virtual void UpdateLoopView(List <ResultData> list, LoopScrollerView scrollView)
        {
            scrollView.Init(list.Count, (index, item) =>
            {
                var tran = item.transform;
                list[index].redBallList.Sort(SortList);
                var list1    = list[index].redBallList;
                var blueBall = list[index].blueBall;
                for (int j = 0; j < list1.Count; j++)
                {
                    if (list1[j] < 10)
                    {
                        tran.Find(string.Format("{0}", j + 1)).GetComponent <Text>().text = string.Format(PromptData.GetPrompt("lessThanTen"), list1[j]);
                    }
                    else
                    {
                        tran.Find(string.Format("{0}", j + 1)).GetComponent <Text>().text = list1[j].ToString();
                    }
                }

                if (blueBall < 10)
                {
                    tran.Find("blue").GetComponent <Text>().text = string.Format(PromptData.GetPrompt("lessThanTen"), blueBall);
                }
                else
                {
                    tran.Find("blue").GetComponent <Text>().text = blueBall.ToString();
                }

                tran.Find("serial").GetComponent <Text>().text = (index + 1).ToString();

                var levelLab = tran.Find("level");
                if (levelLab != null)
                {
                    levelLab.GetComponent <Text>().text = string.Format(PromptData.GetPrompt("prizeLevel"), list[index].level);
                }
            });
        }
 //----------------------------------------------------------------------------
 protected override void UpdateLoopView(List <ResultData> list, LoopScrollerView scrollView)
 {
     base.UpdateLoopView(list, scrollView);
 }