//!---CONSTRUCTORS---! public Help(ContentManager Content) : base() { sPixel = new AnimatedSprite(Content, "pixel"); sPixel.Colour = Color.Black; sPixel.FrameHeight = 544; sPixel.FrameWidth = 960; sPixel.Alpha = 0.7f; bBackground = new GUIItems.Background(Content); bBack = new Neuroleptic.States.GUIItems.Button(Content, new Vector2(64, 544 - 128), "Back", "Menus/Button"); }
//!---CONSTRUCTORS---! public PopQuestion(ContentManager Content, Neuroleptic.Control.Questions.PopQuestion pq_Question) : base() { pQuestion = pq_Question; sPixel = new AnimatedSprite(Content, "pixel"); sPixel.Colour = new Color(Color.Black, 1.0f); sPixel.FrameHeight = 544; sPixel.FrameWidth = 960; sPixel.Alpha = 0.7f; bNo = new Neuroleptic.States.GUIItems.Button(Content, new Vector2(128, 544 - 256), "No", "Menus/Button"); bYes = new Neuroleptic.States.GUIItems.Button(Content, new Vector2(960 - 128 - 256, 544 - 256), "Yes", "Menus/Button"); }
//!---CONSTRUCTORS---! public EditorLoad(ContentManager Content) : base() { sPixel = new AnimatedSprite(Content, "pixel"); sPixel.Colour = new Color(Color.Black, 1.0f); sPixel.FrameHeight = 544; sPixel.FrameWidth = 960; sPixel.Alpha = 0.7f; bReturn = new Neuroleptic.States.GUIItems.Button(Content, new Vector2(64, 544 - 128), "Return", "Menus/Button"); lBarListRooms = new List<GUIItems.BarList>(); String sPath; #if PSM sPath = "/Documents/"; #elif DESKTOP sPath = "Rooms/"; #endif if (Directory.Exists(sPath)) { int iY = 64; String[] files = Directory.GetFiles(sPath, @"*.rmfile", SearchOption.TopDirectoryOnly); if (files != null) { foreach (string s in files) { XmlReaderSettings settings = new XmlReaderSettings(); settings.ConformanceLevel = ConformanceLevel.Fragment; settings.IgnoreWhitespace = true; settings.IgnoreComments = true; String attrib; bool bP = false; int iE = 0, iO = 0, iI = 0; using (XmlReader XMLReader = XmlReader.Create(s, settings)) { while (XMLReader.Read()) { if (XMLReader.IsStartElement()) { switch (XMLReader.Name) { case "Room": attrib = XMLReader["Player"]; if (attrib != null) { bP = bool.Parse(attrib); } attrib = XMLReader["Items"]; if (attrib != null) { iI = int.Parse(attrib); } attrib = XMLReader["Entities"]; if (attrib != null) { iE = int.Parse(attrib); } attrib = XMLReader["Obstacles"]; if (attrib != null) { iO = int.Parse(attrib); } break; } } } } lBarListRooms.Add(new GUIItems.BarList(Content, s, iY, bP, iI, iE, iO)); iY += 32; } } } }