CCMenu positioning seems wrong

It may be a lack of understanding with how CCMenu works, but I don't think it positions properly on the screen for different anchor points.

I am dynamically building a menu of icons to list down the left side of the display. Various icons will be available depending on the level. Sometimes there will only be one, other times there will be up to 12.

This is how I'm placing the menu:

        seqListMenu.AlignItemsVertically (72f);

        seqListMenu.AnchorPoint = CCPoint.AnchorUpperLeft;
        seqListMenu.PositionX = 30f;
        seqListMenu.PositionY = 1800f;
        seqListMenu.IgnoreAnchorPointForPosition = false;
        AddChild (seqListMenu);

I have also placed one of the icons as a reference to compare to, just offset to the right a little:

        s01LinearStd.AnchorPoint = CCPoint.AnchorUpperLeft;
        s01LinearStd.PositionX = 60f;
        s01LinearStd.PositionY = 1800f;
        AddChild (s01LinearStd);

I would expect that the top of the menu would be aligned to the top of the offset sprite. This isn't the case.

Am I doing something wrong here or is this a bug?

Sign In or Register to comment.