public Text(String _assetName, TextEnum _textName, int _size, int _height, int _width, bool _alpha, Type _textType) { assetName = _assetName; textName = _textName; size = _size; height = _height; width = _width; alpha = _alpha; textType = _textType; if (_textType == Type.Text_Sprite) { texture = new XNA_Text2D(); ((XNA_Text2D)texture).src = Game1.GameInstance.Content.Load<Texture2D>(assetName); } else if (_textType == Type.Text_Font) { texture = new XNA_Font(); ((XNA_Font)texture).src = Game1.GameInstance.Content.Load<SpriteFont>(assetName); } else if (_textType == Type.Text_Box) { texture = new XNA_Text2D(); ((XNA_Text2D)texture).src = new Texture2D(Game1.GameInstance.GraphicsDevice, 1, 1); ((XNA_Text2D)texture).src.SetData(new[] { Color.White }); } else { } }
public Text(String _assetName, TextEnum _textName, int _size, int _height, int _width, bool _alpha, Type _textType) { assetName = _assetName; textName = _textName; size = _size; height = _height; width = _width; alpha = _alpha; textType = _textType; if (_textType == Type.Text_Sprite) { texture = new XNA_Text2D(); ((XNA_Text2D)texture).src = Game1.GameInstance.Content.Load <Texture2D>(assetName); } else if (_textType == Type.Text_Font) { texture = new XNA_Font(); ((XNA_Font)texture).src = Game1.GameInstance.Content.Load <SpriteFont>(assetName); } else if (_textType == Type.Text_Box) { texture = new XNA_Text2D(); ((XNA_Text2D)texture).src = new Texture2D(Game1.GameInstance.GraphicsDevice, 1, 1); ((XNA_Text2D)texture).src.SetData(new[] { Color.White }); } else { } }