Exemple #1
0
        private void setChooserOption(PreciseManeuverDropdownItem item)
        {
            if (!(item is PreciseManeuverPagerItem))
            {
                return;
            }
            var pageritem = item as PreciseManeuverPagerItem;

            m_pagerControl.replaceTextComponentWithTMPro(pageritem.nodeidx.GetComponent <Text> ())?.
            Invoke(m_pagerControl.getManeuverNodeLocalized() + "\n" + (pageritem.index + 1).ToString());
            m_pagerControl.replaceTextComponentWithTMPro(pageritem.nodetime.GetComponent <Text> ())?.
            Invoke(m_pagerControl.getManeuverTime(pageritem.index));
            m_pagerControl.replaceTextComponentWithTMPro(pageritem.nodedv.GetComponent <Text> ())?.
            Invoke(m_pagerControl.getManeuverDV(pageritem.index));
            m_pagerControl.replaceTextComponentWithTMPro(pageritem.dvlabel.GetComponent <Text> ());
        }
Exemple #2
0
        public void SetPagerControl(IPagerControl pagerControl)
        {
            m_pagerControl = pagerControl;

            m_Chooser.updateDropdownCaption = setChooserText;
            m_Chooser.updateDropdownOption  = setChooserOption;
            m_Chooser.setRootCanvas(pagerControl.Canvas);
            chooserText = pagerControl.replaceTextComponentWithTMPro(m_Chooser.captionArea.GetComponent <Text> ());
            updatePagerValues();
            m_pagerControl.registerUpdateAction(updatePagerValues);
        }