Exemplo n.º 1
0
 public void DrawMinimap(SpriteBatch spriteBatch, int x, int y)
 {
     if (Icons.Contains(MiniMapView))
     {
         MiniMapView.DrawMap(spriteBatch, x, y);
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 private void toggleInfoTable()
 {
     if (Icons.Contains(InfoTable))
     {
         Icons.RemoveChild(InfoTable);
     }
     else
     {
         Icons.AddChild(InfoTable);
     }
 }
Exemplo n.º 4
0
 private void toggleMinimap()
 {
     if (Icons.Contains(MiniMapView))
     {
         Icons.RemoveChild(MiniMapView);
     }
     else
     {
         Icons.AddChild(MiniMapView);
     }
 }
Exemplo n.º 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);
     }
 }