public MaterialsView(BohemianArtifact bbshelf, Vector3 position, Vector3 size) { bookshelf = bbshelf; bookshelf.Library.SelectedArtifactChanged += new ArtifactLibrary.SelectedArtifactHandler(library_SelectedArtifactChanged); this.position = position; this.size = size; titleText = new SelectableText(XNA.Font, "Materials", new Vector3(0.4f, 0, 0), bookshelf.GlobalTextColor, Color.White); titleText.InverseScale(0.8f, size.X, size.Y); // the border circle that encases the centre and separates the tiers borderCircle = new SelectableBlob(circleCenter, (float)Math.PI, BORDER_RADIUS * 0.01f, BORDER_RADIUS, 0, Color.Black, Color.Black, Color.Black, null); // create the steam paths steamPaths = new SteamPath[numSteam]; steamSpeed = 5; Color steamColor = new Color(0.95f, 0.95f, 0.95f); float steamWidth = 0.03f; float steamFade = 0.025f; // start from the center and work outwards steamPaths[0] = new SteamPath(new Vector2(0.5f, circleCenter.Y), new Vector2(0.58f, 0.0f), -0.015f, steamWidth, steamFade, steamColor, steamColor, Color.White); steamPaths[1] = new SteamPath(new Vector2(0.6f, circleCenter.Y), new Vector2(0.75f, 0.025f), -0.03f, steamWidth, steamFade, steamColor, steamColor, Color.White); steamPaths[2] = new SteamPath(new Vector2(0.4f, circleCenter.Y), new Vector2(0.3f, 0.025f), 0.04f, steamWidth, steamFade, steamColor, steamColor, Color.White); steamPaths[3] = new SteamPath(new Vector2(0.3f, circleCenter.Y), new Vector2(0.1f, 0.1f), 0.07f, steamWidth, steamFade, steamColor, steamColor, Color.White); steamPaths[4] = new SteamPath(new Vector2(0.7f, circleCenter.Y), new Vector2(0.95f, 0.1f), -0.06f, steamWidth, steamFade, steamColor, steamColor, Color.White); steamPaths[5] = new SteamPath(new Vector2(0.8f, circleCenter.Y), new Vector2(1.0f, 0.35f), -0.05f, steamWidth, steamFade, steamColor, steamColor, Color.White); steamPaths[6] = new SteamPath(new Vector2(0.2f, circleCenter.Y), new Vector2(0.0f, 0.3f), 0.05f, steamWidth, steamFade, steamColor, steamColor, Color.White); animationTimer = new Timer(0.4f); animationTimer.FinishEvent += new TimerFinished(AnimationTimerFinished); //materialTexts = new Dictionary<string, SelectableText>(); //LoadMaterialTexts(); //materialTextures = new Dictionary<string, Texture2D>(); //LoadMaterialTextures(); materialColors = new Dictionary<Material, Color>(); LoadMaterialColors(); // a list of materials that are selected materialConstraints = new List<Material>(); artifactList = new List<ArtifactContainer>(); CreateArtifactList(); UpdateArtifactsFromConstraints(); RepositionArtifacts(); // create the list of materials materialList = new List<MaterialContainer>(); CreateMaterialBlobs(); RepositionBlobs(); animationTimer.Start(); }
public static IEnumerable <User2Json.SteamLoginUsers> GetLoginUsers() { if (SteamPath.SteamLocation == null) { SteamPath.Init(); } dynamic volvo = VdfConvert.Deserialize(File.ReadAllText(SteamPath.SteamLocation + @"\config\loginusers.vdf")); VToken v2 = volvo.Value; return(v2.Children().Select(child => new SteamLoginUsers((VProperty)child)).OrderByDescending(user => user.LastLoginTime).ToList()); }