Ejemplo n.º 1
0
            private void CenterButton(_IButton button, float largest, float title_padding)
            {
                float size_x = button.GetAABB().GetSize().X;
                float shift  = (largest - size_x) * 0.5f;

                button.Translate(new Vector2(shift, title_padding));
            }
Ejemplo n.º 2
0
            private void Translate(Vector2 t)
            {
                mAABB.Translate(t);
                mPos = mAABB.GetMin();

                // translate each button the same amount, and account for title
                for (int i = 0; i < mSelections.Length; ++i)
                {
                    mSelections[i].Translate(t);
                }

                mTitleButton.Translate(t);
            }