////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public PanelState(ItemPanel pItemPanel, InteractionSettings pSettings)
        {
            ItemPanel = pItemPanel;
            vSettings = pSettings;
            DisplayStrength = 1;

            RefreshLayouts();
        }
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public LayoutState(IItemLayout pItemLayout, InteractionSettings pSettings) {
			ItemLayout = pItemLayout;
			vSettings = pSettings;
			DisplayStrength = 1;
			FullItems = new BaseItemState[ItemLayout.Items.Length];

			for ( int i = 0 ; i < ItemLayout.Items.Length ; i++ ) {
				var item = new BaseItemState(ItemLayout.Items[i], vSettings);
				FullItems[i] = item;
			}

			Items = new ReadOnlyCollection<IBaseItemState>(FullItems);
		}
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public PanelState(ItemPanel pItemPanel, InteractionSettings pSettings) {
			ItemPanel = pItemPanel;
			vSettings = pSettings;
			DisplayStrength = 1;
			FullLayouts = new LayoutState[ItemPanel.Layouts.Length];

			for ( int i = 0 ; i < ItemPanel.Layouts.Length ; i++ ) {
				var layout = new LayoutState(ItemPanel.Layouts[i], vSettings);
				FullLayouts[i] = layout;
			}

			Layouts = new ReadOnlyCollection<IHoverboardLayoutState>(FullLayouts);
		}
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public virtual InteractionSettings GetSettings()
        {
            if ( vSettings == null ) {
                vSettings = new InteractionSettings();
                vSettings.ApplyScaleMultiplier = ApplyScaleMultipler;
                vSettings.HighlightDistanceMin = HighlightDistanceMin;
                vSettings.HighlightDistanceMax = HighlightDistanceMax;
                vSettings.StickyReleaseDistance = StickyReleaseDistance;
                vSettings.SelectionMilliseconds = SelectionMilliseconds;
                vSettings.Cursors = Cursors;
            }

            return vSettings;
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public virtual InteractionSettings GetSettings()
        {
            if (vSettings == null)
            {
                vSettings = new InteractionSettings();
                vSettings.ApplyScaleMultiplier  = ApplyScaleMultipler;
                vSettings.HighlightDistanceMin  = HighlightDistanceMin;
                vSettings.HighlightDistanceMax  = HighlightDistanceMax;
                vSettings.StickyReleaseDistance = StickyReleaseDistance;
                vSettings.SelectionMilliseconds = SelectionMilliseconds;
                vSettings.Cursors = Cursors;
            }

            return(vSettings);
        }
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public HoverboardState(ItemPanel[] pItemPanels, HovercursorSetup pHovercusorSetup,
													InteractionSettings pInterSett, Transform pBaseTx) {
			vInteractSett = pInterSett;
			vHovercusorSetup = pHovercusorSetup;
			vBaseTx = pBaseTx;
			vProjectionMap = new ListMap<CursorType, ProjectionState>(EnumIntKeyComparer.CursorType);

			////

			var panels = new List<PanelState>();
			var allItems = new List<ItemTree>();

			foreach ( ItemPanel itemPanel in pItemPanels ) {
				var panel = new PanelState(itemPanel, vInteractSett);
				panel.InteractionPlane = new PlaneData("Hoverboard.Panel-"+panels.Count, 
					((GameObject)panel.ItemPanel.DisplayContainer).transform, Vector3.up);
				panels.Add(panel);

				foreach ( LayoutState layout in panel.FullLayouts ) {
					layout.ItemLayout.SetRadioSiblingsFunc(GetRadioSiblings);

					foreach ( BaseItemState item in layout.FullItems ) {
						var tree = new ItemTree {
							Panel = panel,
							Layout = layout,
							Item = item
						};

						allItems.Add(tree);
					}
				}
			}

			vAllItems = allItems.ToArray();
			vActiveItems = new List<ItemTree>();
			vActiveCursorInteractions = new ReadList<IBaseItemInteractionState>();
			vActiveCursorPlanes = new ReadList<PlaneData>();

			FullPanels = panels.ToArray();
			Panels = new ReadOnlyCollection<IHoverboardPanelState>(FullPanels);
			ActiveCursorTypes = new ReadOnlyCollection<CursorType>(vInteractSett.Cursors);
		}
		////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public ProjectionState(ICursorState pCursor, InteractionSettings pSettings, Transform pBaseTx) {
			Cursor = pCursor;
			vSettings = pSettings;
			vBaseTx = pBaseTx;
			IsActive = true;
		}