public override void Update(GameTime gameTime) { foreach (IUIElement ActiveUIElement in ArrayUIElement) { ActiveUIElement.Update(gameTime); } int MenuWidth = (int)(Constants.Width * 0.45); int MenuHeight = (int)(Constants.Height * 0.45); float MenuX = Constants.Width / 2 - MenuWidth / 2; float MenuY = Constants.Height / 2 - MenuHeight / 2; float DrawY = MenuY + 45; for (int CurrentIndex = MapScrollbarValue; CurrentIndex < ListPlayerProfile.Count; CurrentIndex++) { if (InputHelper.InputConfirmPressed() && MouseHelper.MouseStateCurrent.X >= MenuX && MouseHelper.MouseStateCurrent.X < MenuX + MenuWidth && MouseHelper.MouseStateCurrent.Y >= DrawY && MouseHelper.MouseStateCurrent.Y < DrawY + 25) { SelectedProfileIndex = CurrentIndex; } DrawY += 25; } }
public override void Update(GameTime gameTime) { foreach (IUIElement ActiveUIElement in ArrayUIElement) { ActiveUIElement.Update(gameTime); } }