UsePixelCoordinates
Introduction
Code Example
using FlatRedBall.Graphics;Layer layer = SpriteManager.AddLayer();
layer.UsePixelCoordinates();
Text text = TextManager.AddText("Hello I am text that sits on the top-left of the screen");
TextManager.AddToLayer(text, layer);
text.HorizontalAlignment = HorizontalAlignment.Left;
text.VerticalAlignment = VerticalAlignment.Top;
text.X = -SpriteManager.Camera.DestinationRectangle.Width / 2.0f;
text.Y = SpriteManager.Camera.DestinationRectangle.Height / 2.0f;
text.SetPixelPerfectScale(layer);
A note about attachments
Last updated
Was this helpful?