private static void CreateBuildMenuWindow() { Vector2 paneStartingLocation = new Vector2 { X = Engine.Engine.ScreenWidth - Textures.BuildMenuPane.Width - 10, Y = 10 }; BuildMenuWindow = new MoveablePane { Rectangle = new Rectangle((int)paneStartingLocation.X, (int)paneStartingLocation.Y, 200, 100), Texture = Textures.BuildMenuPane }; CloseMenuRec = new Rectangle { X = BuildMenuWindow.Rectangle.X + BuildMenuWindow.Rectangle.Width - 30, Y = BuildMenuWindow.Rectangle.Y + 10, Width = 20, Height = 20 }; BuildMenuWindow.Location.X = paneStartingLocation.X; BuildMenuWindow.Location.Y = paneStartingLocation.Y; foreach (var icon in EntityLists.MainIconList) { icon.Position.X = (BuildMenuWindow.Location.X + icon.XOffset); icon.Position.Y = (BuildMenuWindow.Location.Y + icon.YOffset); icon.BRec.X = (int)BuildMenuWindow.Location.X + icon.XOffset; icon.BRec.Y = (int)BuildMenuWindow.Location.Y + icon.YOffset; } }
public static void CreateDetailsPane(Vector2 location, string description) { detailsPane = new MoveablePane() { Location = location, Description = "", Rectangle = new Rectangle(0, 0, Textures.BlankWindowPane.Width, Textures.BlankWindowPane.Height) }; detailsPane.TextCoordinates.X = detailsPane.Location.X + 20; detailsPane.TextCoordinates.Y = detailsPane.Location.Y + 20; }