Exemple #1
0
        public CCMenu(params CCMenuItem[] items) : base()
        {
            alignmentState = new AlignmentState(Alignment.None, DefaultPadding);

            Enabled = true;

            SelectedMenuItem = null;
            MenuState        = CCMenuState.Waiting;

            IsColorCascaded   = true;
            IsOpacityCascaded = true;

            AnchorPoint = new CCPoint(0.5f, 0.5f);
            IgnoreAnchorPointForPosition = true;

            if (items != null)
            {
                int z = 0;
                foreach (CCMenuItem item in items)
                {
                    AddChild(item, z);
                    z++;
                }
            }

            // We will set the position as being not set
            Position = CCPoint.NegativeInfinity;
        }
Exemple #2
0
        public CCMenu(params CCMenuItem[] items) : base()
        {
            alignmentState = new AlignmentState(Alignment.None, DefaultPadding);

            Enabled = true;

            SelectedMenuItem = null;
            MenuState = CCMenuState.Waiting;

            IsColorCascaded = true;
            IsOpacityCascaded = true;

            AnchorPoint = new CCPoint(0.5f, 0.5f);
            IgnoreAnchorPointForPosition = true;

            if (items != null)
            {
                int z = 0;
                foreach (CCMenuItem item in items)
                {
                    AddChild(item, z);
                    z++;
                }
            }

            // We will set the position as being not set
            Position = CCPoint.NegativeInfinity;
        }