/// <summary> /// Calcule la largeur et la hauteur du menu /// </summary> private void CalculateWidthAndHeight() { _Height = (int)VO_GUI.BackT.Height + (int)VO_GUI.BackT.Height; _Width = 0; if (_MenuBack != null) { _MenuBack.Dispose(); } if (LimitView == 0) { _NbrPages = 1; } else { CalculatePageNumber(); MakePreviousNext(); } //Cas simple if (_NbrPages == 1) { foreach (VO_String2D message in _Messages) { float messageWidth = message.Width; if (_Width < (int)messageWidth) { _Width = (int)messageWidth; } _Height += PaddingBetweenChoices + (int)message.Height; } } //Cas complexe else { int index = 0; foreach (VO_String2D message in _Messages) { float messageWidth = message.Width; if (_Width < (int)messageWidth) { _Width = (int)messageWidth; } _Height += PaddingBetweenChoices + (int)message.Height; index++; if (LimitView == index) { break; } } } _Width += (int)VO_GUI.BackL.Width + (int)VO_GUI.BackL.Width; _Height -= PaddingBetweenChoices; }
/// <summary> /// Détruire l'objet /// </summary> public void Dispose() { Clear(); if (_MenuBack != null) { _MenuBack.Dispose(); } if (_MenuSelector != null) { _MenuSelector.Dispose(); } }