Ejemplo n.º 1
0
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 public override void Update()
 {
     for (int x = 0; x < m_ChildCount; ++x)
     {
         IUIBase currentChild = m_Children[x];
         currentChild.Update();
     }
 }
Ejemplo n.º 2
0
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 public override void Draw(SpriteBatch spriteBatch)
 {
     for (int x = 0; x < m_ChildCount; ++x)
     {
         IUIBase currentChild = m_Children[x];
         currentChild.Draw(spriteBatch);
     }
 }
Ejemplo n.º 3
0
        // ---------------------------------------------------------------------
        // ---------------------------------------------------------------------
        public void AddChild(IUIBase child)
        {
            child.SetPosition(m_EndingPosition);

            m_Children.Add(child);
            m_ChildCount++;

            if (m_Horizontal)
            {
                m_EndingPosition += new Vector2(child.GetWidth() + m_Padding, 0);
            }
            else
            {
                m_EndingPosition += new Vector2(0, child.GetHeight() + m_Padding);
            }
        }
Ejemplo n.º 4
0
        // ---------------------------------------------------------------------
        // ---------------------------------------------------------------------
        private void UpdateChildPositions()
        {
            for (int x = 0; x < m_ChildCount; ++x)
            {
                IUIBase child = m_Children[x];
                child.SetPosition(m_EndingPosition);

                if (m_Horizontal)
                {
                    m_EndingPosition += new Vector2(child.GetWidth() + m_Padding, 0);
                }
                else
                {
                    m_EndingPosition += new Vector2(0, child.GetHeight() + m_Padding);
                }
            }
        }