/** * Returns a scroll view object * * @param size view size * @param container parent object * @return scroll view object */ protected virtual bool InitWithViewSize(CCSize size, CCNode container) { if (base.Init()) { m_pContainer = container; if (m_pContainer == null) { m_pContainer = new CCLayer(); m_pContainer.IgnoreAnchorPointForPosition = false; m_pContainer.AnchorPoint = CCPoint.Zero; } ViewSize = size; TouchEnabled = true; m_pTouches = new List <CCTouch>(); m_pDelegate = null; m_bBounceable = true; m_bClippingToBounds = true; //m_pContainer->setContentSize(CCSizeZero); m_eDirection = CCScrollViewDirection.Both; m_pContainer.Position = new CCPoint(0.0f, 0.0f); m_fTouchLength = 0.0f; AddChild(m_pContainer); m_fMinScale = m_fMaxScale = 1.0f; return(true); } return(false); }
/** * Returns a scroll view object * * @param size view size * @param container parent object * @return scroll view object */ protected virtual bool InitWithViewSize(CCSize size, CCNode container) { if (base.Init()) { _container = container; if (_container == null) { _container = new CCLayer(); _container.IgnoreAnchorPointForPosition = false; _container.AnchorPoint = CCPoint.Zero; } ViewSize = size; TouchEnabled = true; _touches = new List <CCTouch>(); _delegate = null; _bounceable = true; _clippingToBounds = true; _direction = CCScrollViewDirection.Both; _container.Position = new CCPoint(0.0f, 0.0f); _touchLength = 0.0f; AddChild(_container); _minScale = _maxScale = 1.0f; return(true); } return(false); }
/** * Returns a scroll view object * * @param size view size * @param container parent object * @return scroll view object */ protected virtual bool InitWithViewSize(CCSize size, CCNode container) { if (base.Init()) { _container = container; if (_container == null) { _container = new CCLayer(); _container.IgnoreAnchorPointForPosition = false; _container.AnchorPoint = CCPoint.Zero; } ViewSize = size; TouchEnabled = true; _touches = new List<CCTouch>(); _delegate = null; _bounceable = true; _clippingToBounds = true; _direction = CCScrollViewDirection.Both; _container.Position = new CCPoint(0.0f, 0.0f); _touchLength = 0.0f; AddChild(_container); _minScale = _maxScale = 1.0f; return true; } return false; }
/** * Returns a scroll view object * * @param size view size * @param container parent object * @return scroll view object */ protected virtual bool InitWithViewSize(CCSize size, CCNode container) { if (base.Init()) { m_pContainer = container; if (m_pContainer == null) { m_pContainer = new CCLayer(); m_pContainer.IgnoreAnchorPointForPosition = false; m_pContainer.AnchorPoint = CCPoint.Zero; } ViewSize = size; TouchEnabled = true; m_pTouches = new List<CCTouch>(); m_pDelegate = null; m_bBounceable = true; m_bClippingToBounds = true; //m_pContainer->setContentSize(CCSizeZero); m_eDirection = CCScrollViewDirection.Both; m_pContainer.Position = new CCPoint(0.0f, 0.0f); m_fTouchLength = 0.0f; AddChild(m_pContainer); m_fMinScale = m_fMaxScale = 1.0f; return true; } return false; }