public static void SpriteBatchDrawStringCallback(SpriteBatch batch, SpriteFont spriteFont, string text, Vector2 position, Color color) { var @event = new SpriteBatchDrawStringEvent(text); FireEvent(@event); if (string.IsNullOrEmpty((string)@event.ReturnValue)) { batch.DrawString(spriteFont, text, position, color); } else { batch.DrawString(spriteFont, (string)@event.ReturnValue, position, color); } }
public static void SpriteBatchDrawStringCallback(SpriteBatch batch, SpriteFont spriteFont, string text, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth) { var @event = new SpriteBatchDrawStringEvent(text); FireEvent(@event); if (string.IsNullOrEmpty((string)@event.ReturnValue)) { batch.DrawString(spriteFont, text, position, color, rotation, origin, scale, effects, layerDepth); } else { batch.DrawString(spriteFont, (string)@event.ReturnValue, position, color, rotation, origin, scale, effects, layerDepth); } }