示例#1
0
        private void updateAlignment()
        {
            var    blockSize = new CCSize(200, 160);
            CCSize s         = CCDirector.SharedDirector.WinSize;

            if (m_plabel != null)
            {
                m_plabel.RemoveFromParentAndCleanup(true);
            }

            m_plabel = new CCLabelTTF(getCurrentAlignment(), "Marker Felt", 32,
                                      blockSize, m_eHorizAlign, m_eVertAlign);

            m_plabel.AnchorPoint = new CCPoint(0, 0);
            m_plabel.Position    = new CCPoint((s.Width - blockSize.Width) / 2, (s.Height - blockSize.Height) / 2);

            AddChild(m_plabel);
        }