public LNLabel(string text, LNLabel.LabelType type, LFont spriteFont) : base() { this._spriteFont = spriteFont; this._type = type; SetString(text); this.SetNodeSize(_spriteFont.StringWidth(text), _spriteFont.GetHeight()); }
public void DrawString(LFont spriteFont, string text, Vector2f position, LColor color, float rotation, Vector2f origin, Vector2f scale) { LFont old = font; if (spriteFont != null) { SetFont(spriteFont); } int heigh = ((spriteFont.GetHeight() - 2)); if (rotation == 0f) { DrawString(text, position.x - (origin.x * scale.x), (position.y + heigh) - (origin.y * scale.y), scale.x, scale.y, origin.x, origin.y, rotation, color); } else { DrawString(text, position.x, (position.y + heigh), scale.x, scale.y, origin.x, origin.y, rotation, color); } SetFont(old); }
public void DrawString(LFont spriteFont, string text, Vector2f position, LColor color) { LFont old = font; if (spriteFont != null) { SetFont(spriteFont); } int heigh = (spriteFont.GetHeight() - 2); DrawString(text, position.x, (position.y + heigh), 1f, 1f, 0f, 0f, 0f, color); SetFont(old); }
public void DrawString(LFont spriteFont, string text, float x, float y, LColor color) { LFont old = font; if (spriteFont != null) { SetFont(spriteFont); } int heigh = (spriteFont.GetHeight() - 2); DrawString(text, x, (y + heigh), 1f, 1f, 0f, 0f, 0f, color); SetFont(old); }
public void DrawString(LFont spriteFont, string text, float px, float py, LColor color, float rotation, float originx, float originy, float scale) { LFont old = font; if (spriteFont != null) { SetFont(spriteFont); } int height = ((spriteFont.GetHeight() - 2)); if (rotation == 0f) { DrawString(text, px - (originx * scale), (py + height) - (originy * scale), scale, scale, originx, originy, rotation, color); } else { DrawString(text, px, (py + height), scale, scale, originx, originy, rotation, color); } SetFont(old); }