예제 #1
0
		public void Print(PrintData data, Vector2 location, String text, Rectangle? scissor)
		{
			if (text == null) throw new ArgumentNullException("text");

			if (data.IsValid == false) return;

			Font font;
			if (m_fonts.TryGetValue(data.Index, out font) == false) return;

			font.Print(location, data.ColorIndex, data.Justification, text, scissor);
		}
예제 #2
0
        public VersusData(String prefix, TextSection textsection)
        {
            if (prefix == null) throw new ArgumentNullException("prefix");
            if (textsection == null) throw new ArgumentNullException("textsection");

            m_profile = null;
            m_portraitlocation = textsection.GetAttribute<Point>(prefix + "pos");
            m_portraitscale = textsection.GetAttribute<Vector2>(prefix + "scale");
            m_portraitflip = (textsection.GetAttribute<Int32>(prefix + "facing") < 0) ? SpriteEffects.FlipHorizontally : SpriteEffects.None;
            m_namelocation = textsection.GetAttribute<Point>(prefix + "name.pos");
            m_printdata = textsection.GetAttribute<PrintData>(prefix + "name.font");
        }
예제 #3
0
        public void Print(PrintData data, Vector2 location, string text, Rectangle?scissor)
        {
            if (text == null)
            {
                throw new ArgumentNullException(nameof(text));
            }

            if (data.IsValid == false)
            {
                return;
            }

            if (m_fonts.TryGetValue(data.Index, out var font) == false)
            {
                return;
            }

            font.Print(location, data.ColorIndex, data.Justification, text, scissor);
        }
예제 #4
0
        public void Print(PrintData printdata, Vector2 location, String text, Rectangle? scissorrect)
        {
            if (text == null) throw new ArgumentNullException("text");

            MenuSystem.FontMap.Print(printdata, location, text, scissorrect);
        }