示例#1
0
        public static void RenderRecentToConsole(libtcodWrapper.Console Target)
        {
            Target.Clear();

            for (int i = (Lines.Count - 4 > 0 ? Lines.Count - 4 : 0), j = 0; i < Lines.Count; i++, j++)
            {
                Target.ForegroundColor = Lines[i].TextColor;
                Target.PrintLine(Lines[i].Text + "\n", 0, j, libtcodWrapper.LineAlignment.Left);
            }
        }
示例#2
0
        private void Render()
        {
            Root.Clear();
            Utilities.MessageLog.RenderRecentToConsole(MsgCons);
            MsgCons.Blit(0, 0, 90, 5, Root, 0, 0);

            CurrentLevel.RenderToConsole(MapCons);

            MapCons.Blit(0, 0, 90, 30, Root, 1, 5);

            StatusCons.Clear();
            StatusCons.PrintLine("Turn: " + TurnsPassed.ToString(), 0, 0, libtcodWrapper.LineAlignment.Left);
            StatusCons.PrintLine("Level " + LevelNumber.ToString(), 0, 1, libtcodWrapper.LineAlignment.Left);
            StatusCons.PrintLine("V:" + Player.BaseVigor.ToString() + " E:" + Player.BaseEnergy.ToString() + " Sp:" + Player.BaseSpeed.ToString() + " St:" + Player.BaseStrength.ToString() + " A:" + Player.BaseAim.ToString(), 0, 2, libtcodWrapper.LineAlignment.Left);

            StatusCons.PrintLine(MakeLimbStatusString(Player), 0, 3, libtcodWrapper.LineAlignment.Left);
            StatusCons.Blit(0, 0, 90, 5, Root, 0, 35);

            Root.Flush();
        }
示例#3
0
        /// <summary>
        /// Renders the full message log to a console.
        /// </summary>
        /// <param name="Target">Target console.</param>
        /// <param name="Scroll">How much to scroll down.</param>
        /// <returns>Which way can be scrolled.</returns>
        public static MessageLogScrollPossibilities RenderFullToConsole(libtcodWrapper.Console Target, int Scroll)
        {
            Target.Clear();

            bool canscrollup, canscrolldown;

            canscrollup = canscrolldown = false;
            if (Scroll > 0)
            {
                canscrollup = true;
            }
            for (int i = Scroll, j = 0; i < Lines.Count; i++, j++)
            {
                Target.ForegroundColor = Lines[i].TextColor;
                Target.PrintLine(Lines[i].Text, 0, j, libtcodWrapper.LineAlignment.Left);
                if (j > 30)
                {
                    canscrolldown = true;
                    break;
                }
            }
            if (canscrolldown && canscrollup)
            {
                return(MessageLogScrollPossibilities.Both);
            }
            else if (canscrolldown)
            {
                return(MessageLogScrollPossibilities.Down);
            }
            else if (canscrollup)
            {
                return(MessageLogScrollPossibilities.Up);
            }
            else
            {
                return(MessageLogScrollPossibilities.None);
            }
        }