public void SetData(DataAccess dataAccess, CollageEditData editData) { this.dataAccess = dataAccess; this.editData = editData; lastMouseDownPosition = dataAccess.Input.MousePositionVector; }
public CollageEditState(DataAccess dataAccess) { this.dataAccess = dataAccess; // create CollageEditData. Inside you find all the information about the collage and how it is drawn CollageObject collage = new CollageObject(); int width = dataAccess.GraphicsDevice.Viewport.Bounds.Width - 100; int height = (int)Math.Round(width / collage.AspectRatio); MoveableRectangle drawRectangle = new MoveableRectangle(new FloatRectangle(50, 50, width, height)); UndoManager undoManager = new UndoManager(); editData = new CollageEditData(collage, drawRectangle, undoManager); // create the Preview Renderer previewRenderer = new CollagePreviewRenderer(dataAccess); previewRenderer.SetEditData(editData); RegisterCollageOperators(); // create activators activators = new List<IOperatorActivator>(); activators.Add(new SpecialOperatorActivator(dataAccess, collageOperators)); activators.Add(new KeymapActivator(dataAccess, collageOperators)); activators.Add(new ToolbarActivator(dataAccess, collageOperators)); }
public void SetData(DataAccess dataAccess, CollageEditData editData) { this.dataAccess = dataAccess; this.editData = editData; font = dataAccess.Content.GetSpriteFont("normal font"); emptyTexture = dataAccess.Content.GetImageSource("empty").Texture; }
public void SetData(DataAccess dataAccess, CollageEditData editData) { this.dataAccess = dataAccess; this.editData = editData; okButton = new TexturedButton(dataAccess, dataAccess.Content.GetImageSource("check icon")); cancelButton = new TexturedButton(dataAccess, dataAccess.Content.GetImageSource("delete icon")); rightMoveButton = new TexturedButton(dataAccess, dataAccess.Content.GetImageSource("right icon")); downMoveButton = new TexturedButton(dataAccess, dataAccess.Content.GetImageSource("down icon")); }
public void SetData(DataAccess dataAccess, CollageEditData editData) { this.dataAccess = dataAccess; this.editData = editData; tex = new Texture2D(dataAccess.GraphicsDevice, 1, 1); tex.SetData<Color>(new Color[] { Color.White }); imageEffect = dataAccess.Content.GetEffect("image effect"); dropShadowEffect = dataAccess.Content.GetEffect("drop shadow effect"); }
public void SetEditData(CollageEditData editData) { this.editData = editData; }
public void SetData(DataAccess dataAccess, CollageEditData editData) { this.dataAccess = dataAccess; this.editData = editData; }