private void miFont_Click(object sender, System.EventArgs e) { if (m_lbl == null) { Endogine.Text.FontGenerator fg = new Endogine.Text.FontGenerator(); fg.Font = new Font("Verdana", 24); fg.PensAndBrushes.Add(new LinearGradientBrush(new Rectangle(0, 0, 20, 20), Color.FromArgb(255, 0, 0), Color.FromArgb(0, 0, 255), 45, false)); fg.PensAndBrushes.Add(new System.Drawing.Pen(System.Drawing.Color.FromArgb(255, 255, 255), 1.8f)); fg.DefinedCharacters = Endogine.Text.FontGenerator.GetCharSet(Endogine.Text.FontGenerator.CharSet.Default, false, false); //fg.UseStyleTemplate("Test1"); //fg.FontSize = 36; //fg.DefinedCharacters = Endogine.Text.FontGenerator.GetCharSet(Endogine.Text.FontGenerator.CharSet.Default, false, false); m_lbl = new Endogine.Forms.Label(); m_lbl.FontGenerator = fg; m_lbl.CharacterSpacing = 2; m_lbl.Text = "Kerning: VA"; m_lbl.Loc = new EPointF(40, 40); ////Add a swing behavior to each sprite. Behaviors can be added to any sprite. for (int i = 0; i < m_lbl.Sprites.Count; i++) { Sprite sp = m_lbl.Sprites[i]; sp.TextureFilter = Sprite.TextureFilters.High; sp.AddBehavior(new BhSwing(i * 5)); } } else { m_lbl.Dispose(); m_lbl = null; } }
public override void Start() { //this.DisappearDurationMsecs = 0; _cnt++; this.MemberName = "BallRed"; this.Blend = this.Strength * 2; this.LocX += (this.Note - 40) * 5; this.Velocity = new EPointF(0, 6); this._lbl = new Endogine.Forms.Label(); this._lbl.Parent = this; this._lbl.FontGenerator = Main.Instance.FontGenerator; this._lbl.Text = (_cnt % 2 + 1).ToString(); this._lbl.Tag = "D" + this._lbl.Text; EH.Instance.KeyEvent += new KeyEventHandler(Instance_KeyEvent); }
public override void Start() { //this.DisappearDurationMsecs = 0; _cnt++; this.MemberName = "BallRed"; this.Blend = this.Strength*2; this.LocX+= (this.Note-40)*5; this.Velocity = new EPointF(0,6); this._lbl = new Endogine.Forms.Label(); this._lbl.Parent = this; this._lbl.FontGenerator = Main.Instance.FontGenerator; this._lbl.Text = (_cnt % 2 +1).ToString(); this._lbl.Tag = "D"+this._lbl.Text; EH.Instance.KeyEvent+=new KeyEventHandler(Instance_KeyEvent); }