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)); }
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); }