Beispiel #1
0
 /// <summary>
 /// Init with Custom TextPara
 /// </summary>
 /// <param name="gd"></param>
 /// <param name="service"></param>
 /// <param name="path"></param>
 /// <param name="textpara"></param>
 public Text(GraphicsDevice gd, IServiceProvider service, string path, TextPara textpara)
     : base(gd)
 {
     Para = textpara;
     LoadContent(service, path, textpara.BasePara.contentname);
     Init(gd);
 }
Beispiel #2
0
 /// <summary>
 /// Init with Default TextPara and Custom SpriteFont
 /// </summary>
 /// <param name="gd"></param>
 /// <param name="service"></param>
 /// <param name="path"></param>
 /// <param name="spritefont"></param>
 public Text(GraphicsDevice gd, IServiceProvider service, string path, string spritefont)
     : base(gd)
 {
     Para = new TextPara(spritefont);
     Para.BasePara.color = Color.PeachPuff;
     LoadContent(service, path, spritefont);
     Init(gd);
 }
Beispiel #3
0
 /// <summary>
 /// Init with Custom TextPara and Configuration
 /// </summary>
 /// <param name="distance2display"></param>
 /// <param name="displayratio"></param>
 /// <param name="displaysize"></param>
 /// <param name="camera"></param>
 /// <param name="unit"></param>
 /// <param name="gd"></param>
 /// <param name="service"></param>
 /// <param name="path"></param>
 /// <param name="textpara"></param>
 public Text(float distance2display, float displayratio, float displaysize, SLCamera camera, Unit unit, GraphicsDevice gd, IServiceProvider service, string path, TextPara textpara)
     : base(distance2display, displayratio, displaysize, gd, camera, unit)
 {
     Para = textpara;
     LoadContent(service, path, textpara.BasePara.contentname);
     Init(gd);
 }
Beispiel #4
0
 /// <summary>
 /// Sets Default TextPara -- Color: PeachPuff, need LoadContent() and Init()
 /// </summary>
 public Text()
 {
     Para = new TextPara("");
     Para.BasePara.color = Color.PeachPuff;
 }
Beispiel #5
0
 /// <summary>
 /// Init according to custom text parameters
 /// </summary>
 /// <param name="gd"></param>
 /// <param name="textpara"></param>
 public void Init(GraphicsDevice gd, TextPara textpara)
 {
     textpara.BasePara.contentname = Para.BasePara.contentname;
     Para = textpara;
     Init(gd);
 }
Beispiel #6
0
 /// <summary>
 /// Init with Custom TextPara and SpriteFont
 /// </summary>
 /// <param name="gd"></param>
 /// <param name="service"></param>
 /// <param name="path"></param>
 /// <param name="spritefont"></param>
 /// <param name="textpara"></param>
 public Text(GraphicsDevice gd, IServiceProvider service, string path, string spritefont, TextPara textpara)
     : base(gd)
 {
     Para = textpara;
     LoadContent(service, path, spritefont);
     Init(gd);
 }