Exemplo n.º 1
0
        private void RenderName()
        {
            int textSize = _belief.Size / 2;

            Rectangle textBounds = Utils.GetTextBounds(ResoruceManger.GetFont(FONT_NAME, textSize), _belief.Name);

            RenderAdapter.DrawText
            (
                Colour.Black,
                new Point2D(Bounds.Center.X - textBounds.Width / 2, Bounds.Y - textBounds.Height),
                ResoruceManger.GetFont(FONT_NAME, textSize), _belief.Name
            );
        }
        public override void Render()
        {
            Rectangle boundsScreen = Utils.ToScreen(_bounds.HitBox);

            RenderAdapter.FillRectangle(Colour.White, boundsScreen);
            RenderAdapter.DrawRectangle(Colour.Black, boundsScreen);

            _subject.RenderPortrait(boundsScreen);

            RenderAdapter.DrawText
            (
                Colour.Black,
                new Point2D(boundsScreen.X, boundsScreen.Y2 - Convert.ToInt32(boundsScreen.Width / 6)),
                ResoruceManger.GetFont(Settings.DEFUALT_FONT_NAME, Convert.ToInt32(boundsScreen.Width / 6)),
                _subject.Title
            );
        }
Exemplo n.º 3
0
        private void RenderAge()
        {
            int textSize = _belief.Size / 2;

            Rectangle textBounds = Utils.GetTextBounds
                                   (
                ResoruceManger.GetFont(FONT_NAME, textSize),
                _belief.Age.ToString()
                                   );

            RenderAdapter.DrawText
            (
                Colour.Black,
                new Point2D(Center.X - textBounds.Width / 2, Center.Y - textBounds.Height / 2),
                ResoruceManger.GetFont(FONT_NAME, textSize),
                _belief.Age.ToString()
            );
        }