public void DrawMinimap(SpriteBatch spriteBatch, int x, int y) { if (Icons.Contains(MiniMapView)) { MiniMapView.DrawMap(spriteBatch, x, y); } }
private void UpdateSelected() { if (Icons.Contains(Selected)) { return; } var brandLower = Car.Brand?.ToLower(CultureInfo.CurrentUICulture); Selected = Icons.FirstOrDefault(x => x.Name.ToLower() == brandLower) ?? (Icons.Count > 0 ? Icons[0] : null); }
private void toggleInfoTable() { if (Icons.Contains(InfoTable)) { Icons.RemoveChild(InfoTable); } else { Icons.AddChild(InfoTable); } }
private void toggleMinimap() { if (Icons.Contains(MiniMapView)) { Icons.RemoveChild(MiniMapView); } else { Icons.AddChild(MiniMapView); } }
private void toggleOptions() { if (Icons.Contains(OptionTable)) { Icons.RemoveChild(OptionTable); } else { Icons.AddChild(OptionTable); } }
protected override void OnInitialized() { base.OnInitialized(); if (Icons == null) { icons = allIcons; } else { icons = allIcons.Where(x => Icons.Contains(x.Key)).ToDictionary(x => x.Key, x => x.Value); } }