public ToolbarActivator(DataAccess dataAccess, List<ICollageOperator> operators) { this.dataAccess = dataAccess; this.operators = operators; dataAccess.GuiThread.Invoke(OpenWindow); }
public TexturedButton(DataAccess dataAccess, string fileName, Point position) { this.dataAccess = dataAccess; this.source = new ImageSource(dataAccess.GraphicsDevice, fileName); this.source.Load(); rectangle = new Rectangle(position.X, position.Y, source.Width, source.Height); }
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 SpecialOperatorActivator(DataAccess dataAccess, List<ICollageOperator> operators) { this.dataAccess = dataAccess; this.operators = new List<ISpecialOperatorStart>(); foreach(ICollageOperator op in operators) { if (op is ISpecialOperatorStart) this.operators.Add((ISpecialOperatorStart)op); } }
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 CollagePreviewRenderer(DataAccess dataAccess) { this.dataAccess = dataAccess; tex = new Texture2D(dataAccess.GraphicsDevice, 1, 1); tex.SetData<Color>(new Color[] { Color.White }); border = new Border(dataAccess.GraphicsDevice, Color.FromNonPremultiplied(182, 195, 205, 200)); imageEffect = dataAccess.Content.GetEffect("image effect"); dropShadowEffect = dataAccess.Content.GetEffect("drop shadow effect"); }
protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); contentHelper = new ContentHelper(GraphicsDevice, Content); LoadContentHelperData(); Keymap keymap = new Keymap(); RegisterKeyCombinations(keymap); dataAccess = new DataAccess(GraphicsDevice, spriteBatch, input, stateManager, keymap, guiThread, contentHelper); CollageEditState editState = new CollageEditState(dataAccess); stateManager.SetCurrentState(editState); }
public TexturedButton(DataAccess dataAccess, ImageSource source) { this.dataAccess = dataAccess; this.source = source; rectangle = new Rectangle(0, 0, 100, 100); }
public TexturedButton(DataAccess dataAccess, ImageSource source, Point position) { this.dataAccess = dataAccess; this.source = source; rectangle = new Rectangle(position.X, position.Y, source.Width, source.Height); }
public Image(DataAccess dataAccess, string fileName) { this.source = new ImageSource(dataAccess.GraphicsDevice, fileName); SetDefaultData(); }
public void SetData(DataAccess dataAccess, CollageEditData editData) { this.dataAccess = dataAccess; this.editData = editData; }
public AsyncImageSourcesLoader(DataAccess dataAccess, List<ImageSource> sourcesToLoad) { this.dataAccess = dataAccess; imageSources = sourcesToLoad; }