public CustomAdventure(MogwaiController mogwaiController, MogwaiKeys mogwaiKeys, int width, int height) : base("Adventure", "", width, height)
        {
            _controller = mogwaiController;
            _mogwaiKeys = mogwaiKeys;
            _mogwai     = _mogwaiKeys.Mogwai;

            _adventureFont = Global.LoadFont("Phoebus16.font").GetFont(Font.FontSizes.One);

            //_mapConsole = new Console(75, 75) { Position = new Point(17, 2) };
            _mapConsole = new Console(100, 100)
            {
                Position  = new Point(-24, 0),
                Font      = _adventureFont,
                IsVisible = false
            };
            Children.Add(_mapConsole);

            _entityManager = new SadConsole.Entities.EntityManager {
                Parent = _mapConsole
            };

            _statsConsole = new MogwaiConsole("stats", "", 21, 6)
            {
                Position = new Point(70, 16)
            };
            _statsConsole.Fill(DefaultForeground, new Color(10, 10, 10, 230), null);
            Children.Add(_statsConsole);
        }
Example #2
0
        public SelectionScreen(MogwaiController mogwaiController, int width, int height) : base(width, height)
        {
            borderSurface = new Basic(width + 2, height + 2, base.Font);
            borderSurface.DrawBox(new Rectangle(0, 0, borderSurface.Width, borderSurface.Height),
                                  new Cell(Color.DarkCyan, Color.Black), null, SurfaceBase.ConnectedLineThick);
            borderSurface.Position = new Point(-1, -1);
            Children.Add(borderSurface);

            controlsConsole          = new ControlsConsole(110, 1);
            controlsConsole.Position = new Point(0, 24);
            controlsConsole.Fill(Color.DarkCyan, Color.Black, null);
            Children.Add(controlsConsole);

            infoConsole          = new MogwaiConsole("Info", "", 24, 38);
            infoConsole.Position = new Point(113, -8);
            Children.Add(infoConsole);

            logConsole          = new MogwaiConsole("Log", "", 110, 3);
            logConsole.Position = new Point(0, 27);
            Children.Add(logConsole);

            headerPosition  = 1;
            trailerPosition = height - 2;

            CreateHeader();
            CreateTrailer();

            controller = mogwaiController;
        }
Example #3
0
        private static void Init()
        {
            _controller = new MogwaiController();

            //SelectionScreen();
            SplashScreen();
            _state = SadGuiState.START;
        }
Example #4
0
 public WalletConsole(MogwaiController mogwaiController, int width, int height) : base(width, height)
 {
     borderSurface = new Basic(width + 2, height + 2, base.Font);
     borderSurface.DrawBox(new Rectangle(0, 0, borderSurface.Width, borderSurface.Height),
                           new Cell(Color.DarkCyan, Color.Black), null, SurfaceBase.ConnectedLineThick);
     borderSurface.Position = new Point(-1, -1);
     Children.Add(borderSurface);
     controller = mogwaiController;
 }
Example #5
0
 private static void Init()
 {
     _controller = new MogwaiController();
     if (!DEBUG)
     {
         SplashScreen();
         _state = SadGuiState.Start;
     }
     else
     {
         _state = SadGuiState.Play;
         PlayScreen();
     }
 }
        public SelectionScreen(MogwaiController mogwaiController, int width, int height) : base(width, height)
        {
            _borderSurface = new Basic(width + 2, height + 2, Font);
            _borderSurface.DrawBox(new Rectangle(0, 0, _borderSurface.Width, _borderSurface.Height),
                                   new Cell(Color.DarkCyan, Color.Black), null, ConnectedLineThick);
            _borderSurface.Position = new Point(-1, -1);
            Children.Add(_borderSurface);

            _controlsConsole = new ControlsConsole(110, 1)
            {
                Position = new Point(0, 24)
            };
            _controlsConsole.Fill(Color.DarkCyan, Color.Black, null);
            Children.Add(_controlsConsole);

            _infoConsole = new MogwaiConsole("Info", "", 24, 38)
            {
                Position = new Point(113, -8)
            };
            Children.Add(_infoConsole);

            _debugConsole = new Console(24, 38)
            {
                Position = new Point(113, 22)
            };
            _debugConsole.Fill(Color.Beige, Color.TransparentBlack, null);
            _debugConsole.Print(1, 1, $"Debug Console [{Coloring.Gold("     ")}]:");
            _debugConsole.Print(1, 2, $"..armors: {Armors.Instance.AllBuilders().Count}");
            _debugConsole.Print(1, 3, $"..weapns: {Weapons.Instance.AllBuilders().Count}");
            _debugConsole.Print(1, 4, $"..mnstrs: {Monsters.Instance.AllBuilders().Count}");
            Children.Add(_debugConsole);


            _logConsole = new MogwaiConsole("Log", "", 110, 3)
            {
                Position = new Point(0, 27)
            };
            Children.Add(_logConsole);

            HeaderPosition  = 1;
            TrailerPosition = height - 2;

            CreateHeader();
            CreateTrailer();

            _controller    = mogwaiController;
            _transferFunds = 2;

            Init();
        }
Example #7
0
        public PlayInfoConsole(MogwaiController mogwaiController, MogwaiKeys mogwaiKeys, int width, int height) : base(width, height)
        {
            _controller = mogwaiController;
            _mogwaiKeys = mogwaiKeys;
            _mogwai     = mogwaiKeys.Mogwai;

            _borderSurface = new Basic(width + 2, height + 2, Font);
            _borderSurface.DrawBox(new Rectangle(0, 0, _borderSurface.Width, _borderSurface.Height),
                                   new Cell(Color.DarkCyan, Color.Black), null, ConnectedLineThick);
            _borderSurface.Position = new Point(-1, -1);
            Children.Add(_borderSurface);

            Init();
        }
        public CustomAdventureChoose(MogwaiController mogwaiController, int width, int height) : base("Adventure", "select your adventure", width, height)
        {
            _controller = mogwaiController;
            MogwaiKeys mogwaiKeys = _controller.CurrentMogwaiKeys ?? _controller.TestMogwaiKeys();

            _mogwai = mogwaiKeys.Mogwai;

            _consoleList = new List <MogwaiChooseButton>();

            _currentAdventureType  = AdventureType.Dungeon;
            _currentDifficultyType = DifficultyType.Easy;
            _currentCost           = 0;

            Init();
        }
Example #9
0
        public MogwaiProgressDialog(string title, string text, MogwaiController mogwaicontroller, int width, int height) : base(width, height)
        {
            Title = "[" + title + "]";
            base.Fill(Color.DarkCyan, Color.Black, null);

            var label1 = new DrawingSurface(Width - 4, height - 5)
            {
                Position = new Point(2, 2)
            };

            label1.Surface.Fill(Color.Cyan, Color.Black, null);
            label1.Surface.Print(0, 0, text, Color.DarkCyan);
            Add(label1);

            progressbar          = new ProgressBar(Width - 4, 1, HorizontalAlignment.Left);
            progressbar.Position = new Point(2, 4);
            Add(progressbar);
            Center();

            controller = mogwaicontroller;

            progressIndicator = new Progress <float>(UpdateProgressBar);
        }
Example #10
0
        public PlayScreen(MogwaiController mogwaiController, int width, int height) : base(width, height)
        {
            _controller = mogwaiController;
            var mogwaiKeys = _controller.CurrentMogwaiKeys ?? _controller.TestMogwaiKeys();

            _mogwai = mogwaiKeys.Mogwai;

            _playScreenButtons = new Dictionary <string, MogwaiButton>();

            var playStatsConsole = new PlayStatsConsole(_mogwai, 44, 22)
            {
                Position = new Point(0, 0)
            };

            Children.Add(playStatsConsole);

            _welcome = new CustomWelcome(91, 22)
            {
                Position = new Point(46, 0)
            };

            _adventureChoose = new CustomAdventureChoose(mogwaiController, 91, 22)
            {
                Position = new Point(46, 0)
            };


            _shop = new CustomShop(_mogwai, 91, 22)
            {
                Position = new Point(46, 0)
            };
            _adventure = new CustomAdventure(mogwaiController, mogwaiKeys, 91, 22)
            {
                Position = new Point(46, 0)
            };
            _adventureStats = new CustomAdventureStats(_mogwai, 91, 22)
            {
                Position = new Point(46, 0)
            };

            //var logFont = Global.LoadFont("Bakus8.font").GetFont(Font.FontSizes.One);
            _log = new ScrollingConsole(85, 13, 100, null)
            {
                Position = new Point(0, 25)
            };
            Children.Add(_log);

            var playInfoConsole = new PlayInfoConsole(mogwaiController, mogwaiKeys, 49, 14)
            {
                Position = new Point(88, 24)
            };

            Children.Add(playInfoConsole);

            _command1 = new TestControls(86, 1)
            {
                Position = new Point(0, 23)
            };
            _command1.Fill(Color.Transparent, Color.Black, null);
            Children.Add(_command1);

            _command2 = new ControlsConsole(8, 2)
            {
                Position = new Point(40, 2)
            };
            _command2.Fill(Color.Transparent, Color.DarkGray, null);
            playInfoConsole.Children.Add(_command2);

            State = SadGuiState.Play;

            SetCustomWindowState(PlayScreenState.Welcome);

            Init();
        }