Ejemplo n.º 1
0
        /*--------------------------------------------------------------------------------------------*/
        private void FillCustomItems <T>(T[] pComponentList, Action <CustomItem, T> pFillAction)
            where T : Component
        {
            foreach (T comp in pComponentList)
            {
                HovercastNavItem hni = comp.gameObject.GetComponent <HovercastNavItem>();

                if (hni == null)
                {
                    continue;
                }

                int        key = hni.GetItem().AutoId;
                CustomItem cust;

                if (vCustomMap.ContainsKey(key))
                {
                    cust = vCustomMap[key];
                }
                else
                {
                    cust = new CustomItem();
                    vCustomMap.Add(key, cust);
                }

                pFillAction(cust, comp);
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void HandleValueChanged(NavItem <bool> pNavItem)
        {
            if (!pNavItem.Value)
            {
                return;
            }

            NavItemSlider hue = (NavItemSlider)HueSlider.GetItem();

            hue.IsEnabled = (Mode == DemoEnvironment.ColorMode.Custom);
            Enviro.SetColorMode(Mode, hue.RangeValue);
        }
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 private void HandleValueChanged(NavItem <bool> pNavItem)
 {
     ItemToHide.GetItem().IsVisible = !pNavItem.Value;
 }