Exemple #1
0
        public void CounterWithSpriteFontText()
        {
            var font = ContentLoader.Load <Font>("Verdana12");
            var text = new FontText(font, "", Rectangle.FromCenter(0.5f, 0.5f, 0.05f, 0.05f))
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };

            text.Start <Count>();
        }
Exemple #2
0
        public void FontTextShouldFallBackToUsingVectorText()
        {
            var font = ContentLoader.Load <Font>("Verdana12");

            font.WasLoadedOk = false;
            var text = new FontText(font, "", Rectangle.FromCenter(0.5f, 0.5f, 0.05f, 0.05f))
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };

            text.Start <Count>();
        }
Exemple #3
0
        public void HandleInputVisually()
        {
            var text = new FontText(Font.Default, "Type some text", Rectangle.One);

            text.Start <ContinousInputHandler>();
        }
Exemple #4
0
		public void FontTextShouldFallBackToUsingVectorText()
		{
			var font = ContentLoader.Load<Font>("Verdana12");
			font.WasLoadedOk = false;
			var text = new FontText(font, "", Rectangle.FromCenter(0.5f, 0.5f, 0.05f, 0.05f))
			{
				HorizontalAlignment = HorizontalAlignment.Center,
				VerticalAlignment = VerticalAlignment.Center
			};
			text.Start<Count>();
		}
Exemple #5
0
		public void CounterWithSpriteFontText()
		{
			var font = ContentLoader.Load<Font>("Verdana12");
			var text = new FontText(font, "", Rectangle.FromCenter(0.5f, 0.5f, 0.05f, 0.05f))
			{
				HorizontalAlignment = HorizontalAlignment.Center,
				VerticalAlignment = VerticalAlignment.Center
			};
			text.Start<Count>();
		}