public MissionInterface(Mission[] missions, ExtendedTimer[] cooldowns) { this.background = AssetManager.TextureAsset("monitor_focused"); this.Transparent = true; this.opacity = 1f; bounds = new Rectangle(Game1.camera.Viewport.Width / 2 - 780 / 2, Game1.camera.Viewport.Height / 2 - 580 / 2, 780, 580); CreateButtons(missions, cooldowns); selected = buttons[0]; buttons[0].IsSelected = true; }
public override void Update(GameTime gameTime) { foreach (MissionInterfaceButton button in buttons) { button.Update(gameTime); if (button.IsSelected && button != selected) { selected.IsSelected = false; selected = button; } } acceptMissionButton.Update(gameTime); denyMissionButton.Update(gameTime); HandleInput(); }