public override void Update(GameTime gameTime) { MapScrollbar.Update(gameTime); float DrawY = PanelY + 5; int CurrentIndex = 0; foreach (MapInfo ActiveMap in DicMapInfoByPath.Values) { if (CurrentIndex >= MapScrollbarValue) { if (MouseHelper.MouseStateCurrent.X >= LeftPanelX && MouseHelper.MouseStateCurrent.X < LeftPanelX + PanelWidth && MouseHelper.MouseStateCurrent.Y >= DrawY && MouseHelper.MouseStateCurrent.Y < DrawY + 20 && InputHelper.InputConfirmPressed()) { SelectMap(ActiveMap); } DrawY += 20; } ++CurrentIndex; } }
public override void Update(GameTime gameTime) { GametypeScrollbar.Update(gameTime); SelectGametype(); }