/// <summary> /// Allows the screen to create the hit bounds for a particular menu entry. /// </summary> protected virtual Rectangle GetMenuEntryHitBounds(MenuEntry entry) { // the hit bounds are the entire width of the screen, and the height of the entry // with some additional padding above and below. return new Rectangle( 0, (int)entry.Position.Y - menuEntryPadding, ScreenManager.GraphicsDevice.Viewport.Width, entry.GetHeight(this) + (menuEntryPadding * 2)); }
/// <summary> /// Allows the screen to create the hit bounds for a particular menu entry. /// </summary> Rectangle GetMenuEntryHitBounds(MenuEntry entry) { // the hit bounds are the entire width of the screen, and the height of the entry // with some additional padding above and below. return new Rectangle( (int)entry.Position.X, (int)entry.Position.Y - menuEntryPadding, entry.GetWidth(this) + (menuEntryPadding *2), entry.GetHeight(this) + (menuEntryPadding * 2)); }