Exemple #1
0
 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);
        }
Exemple #3
0
 private void toggleInfoTable()
 {
     if (Icons.Contains(InfoTable))
     {
         Icons.RemoveChild(InfoTable);
     }
     else
     {
         Icons.AddChild(InfoTable);
     }
 }
Exemple #4
0
 private void toggleMinimap()
 {
     if (Icons.Contains(MiniMapView))
     {
         Icons.RemoveChild(MiniMapView);
     }
     else
     {
         Icons.AddChild(MiniMapView);
     }
 }
Exemple #5
0
 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);
     }
 }