public BaseAnimation(string name, string from, string to, TimeSpan duration, LogicalTree.LogicalNode node, Target targetProperty) { this.sfrom = from; this.sto = to; this.duration = duration; this.node = node; this.targetProperty = targetProperty; this.name = name; }
public VisualNode(GraphicsDevice device, double width, double height, LogicalTree.LogicalNode lnode, Color backgroundColor, Color foregroundColor, Color borderColor, string text = "", int fontSize = 12, int borderSize = 0, VerticalAlignment verticalTextAlignment = VerticalAlignment.Center, HorizontalAlignment horizontalTextAlignment = HorizontalAlignment.Center, SpriteFont font = null) { graphicsDevice = device; this.LogicalNode = lnode; this.height = height; this.width = width; this.BackgroundColor = backgroundColor; this.ForegroundColor = foregroundColor; this.BorderColor = borderColor; this.text = text; this.fontSize = fontSize; this.borderSize = borderSize; this.verticalTextAlignment = verticalTextAlignment; this.horizontalTextAlignment = horizontalTextAlignment; renderTarget = new RenderTarget2D(device, (int)Math.Ceiling(width), (int)Math.Ceiling(height), false, SurfaceFormat.Color, DepthFormat.None, 0, RenderTargetUsage.PreserveContents); if (font != null) { this.font = font; } }
public ColorAnimation(string name, string from, string to, TimeSpan duration, LogicalTree.LogicalNode node, Target targetProperty) : base(name, from, to, duration, node, targetProperty) { this.from = MonoMenu.ColorFromString(from); this.to = MonoMenu.ColorFromString(to); }
public DoubleAnimation(string name, string from, string to, TimeSpan duration, LogicalTree.LogicalNode node, Target targetProperty) : base(name, from, to, duration, node, targetProperty) { this.from = double.Parse(from); this.to = double.Parse(to); }