Example #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>   Default constructor. </summary>
        ///
        /// <remarks>   Darrellp, 8/26/2016. </remarks>
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public DungeonScreen()
        {
            StatsConsole = new CharacterConsole(24, 17);
            // ReSharper disable once RedundantArgumentDefaultValue
            DungeonConsole = new DungeonMapConsole(56, 16, 100, 100, Font.FontSizes.One);
            MessageConsole = new MessagesConsole(80, 6);

            // Setup the message header to be as wide as the screen but only 1 character high
            messageHeaderConsole = new Console(80, 1)
            {
                DoUpdate       = false,
                CanUseKeyboard = false,
                CanUseMouse    = false
            };

            // Draw the line for the header
            messageHeaderConsole.Fill(Color.White, Color.Black, 196, null);
            messageHeaderConsole.SetGlyph(56, 0, 193); // This makes the border match the character console's left-edge border

            // Print the header text
            messageHeaderConsole.Print(2, 0, " Messages ");

            // Move the rest of the consoles into position (DungeonConsole is already in position at 0,0)
            StatsConsole.Position         = new Point(56, 0);
            MessageConsole.Position       = new Point(0, 18);
            messageHeaderConsole.Position = new Point(0, 17);

            // Add all consoles to this console list.
            Add(messageHeaderConsole);
            Add(StatsConsole);
            Add(DungeonConsole);
            Add(MessageConsole);

            // Placeholder stuff for the stats screen
            StatsConsole.CharacterName = "Hydorn";
            StatsConsole.MaxHealth     = 200;
            StatsConsole.Health        = 100;

            Engine.ActiveConsole               = this;
            Engine.Keyboard.RepeatDelay        = 0.1f;
            Engine.Keyboard.InitialRepeatDelay = 0.1f;
        }
Example #2
0
        public DungeonScreen()
        {
            InventoryConsole = new InventoryConsole(_inventoryWidth, _inventoryHeight);
            InventoryConsole.FillWithRandomGarbage();
            StatsConsole = new StatConsole(_statWidth, _statHeight);
            MapConsole   = new MapConsole(_mapWidth, _mapHeight, dungeonWidth, dungeonHeight);
            //MapConsole.FillWithRandomGarbage(); // Temporary so we can see where the console is on the screen
            MessageConsole = new MessagesConsole(_messageWidth, _messageHeight);

            SadConsole.Engine.Keyboard.RepeatDelay        = 0.07f;
            SadConsole.Engine.Keyboard.InitialRepeatDelay = 0.07f;

            // Setup the message header to be as wide as the screen but only 1 character high
            messageHeaderConsole                = new Console(_messageWidth, 1);
            messageHeaderConsole.DoUpdate       = false;
            messageHeaderConsole.CanUseKeyboard = false;
            messageHeaderConsole.CanUseMouse    = false;

            // Draw the line for the header
            messageHeaderConsole.Fill(Color.White, Color.Black, 196, null);
            messageHeaderConsole.SetGlyph(56, 0, 193); // This makes the border match the character console's left-edge border

            // Print the header text
            messageHeaderConsole.Print(2, 0, " Messages ");

            MapConsole.Position           = new Point(0, 0);
            StatsConsole.Position         = new Point(_messageWidth, 0);
            InventoryConsole.Position     = new Point(_messageWidth, _statHeight);
            MessageConsole.Position       = new Point(0, _mapHeight + 1);
            messageHeaderConsole.Position = new Point(0, _mapHeight);

            // Add all consoles to this console list.
            Add(messageHeaderConsole);
            Add(StatsConsole);
            Add(MapConsole);
            Add(MessageConsole);
            Add(InventoryConsole);

            SadConsole.Engine.ActiveConsole = this;
        }
Example #3
0
        public DungeonScreen()
        {
            StatsConsole   = new CharacterStatusPanel(24, 41);
            ViewConsole    = new DungeonMapConsole(this, 56, 42, 80, 80);
            MessageConsole = MessagesConsole.Instance;             // = new MessagesConsole( ); // defaults to 80,6

            // Setup Input
            CanUseKeyboard = true;
            SadConsole.Engine.ActiveConsole = this;

            SadConsole.Engine.Keyboard.RepeatDelay        = 0.07f;
            SadConsole.Engine.Keyboard.InitialRepeatDelay = 0.1f;

            messageHeaderConsole                = new Console(80, 1);
            messageHeaderConsole.DoUpdate       = false;
            messageHeaderConsole.CanUseKeyboard = false;
            messageHeaderConsole.CanUseMouse    = false;

            // Draw the line for the header
            messageHeaderConsole.Fill(Color.White, Color.Black, 196, null);
            messageHeaderConsole.SetGlyph(56, 0, 193);               // This makes the border match the character console's left-edge border

            // Print the header text
            messageHeaderConsole.Print(2, 0, " Messages ");

            // Move the rest of the consoles into position (ViewConsole is already in position at 0,0)
            StatsConsole.Position         = new Point(56, 0);
            MessageConsole.Position       = new Point(0, 42);
            messageHeaderConsole.Position = new Point(0, 41);

            // Add all consoles to this console list.
            Add(messageHeaderConsole);
            Add(StatsConsole);
            Add(ViewConsole);
            Add(MessageConsole);
        }