public LMessage(LTexture formImage, int x, int y, int width, int height) : base(x, y, width, height) { this.animation = new Animation(); if (formImage == null) { this.SetBackground(new LTexture(width, height, true)); this.SetAlpha(0.3F); } else { this.SetBackground(formImage); if (width == -1) { width = formImage.GetWidth(); } if (height == -1) { height = formImage.GetHeight(); } } this.print = new Print(GetLocation(), messageFont, width, height); if (XNAConfig.IsActive()) { this.SetTipIcon(XNAConfig.LoadTex(LSystem.FRAMEWORK_IMG_NAME + "creese.png")); } this.totalDuration = 80; this.customRendering = true; this.SetWait(false); this.SetElastic(true); this.SetLocked(true); this.SetLayer(100); }
public override void Dispose() { base.Dispose(); if (print != null) { print.Dispose(); print = null; } if (animation != null) { animation.Dispose(); animation = null; } }