Example #1
0
        /// Trys to close this screen, opens confirmation
        /// dialog if any configuration has changed
        public void close()
        {
            if (!Config.Equals(GameManager.Configuration))
            {
                ConfirmDialog dialog = new ConfirmDialog(this, (answer) => {
                    if (answer == 0)
                    {
                        GameManager.Configuration = Config;
                        Thread thread             = new Thread(() => {
                            GameManager.save();
                            ((Besmash)ScreenManager.Game).ConfigChanged = true;
                        });

                        thread.Start();
                    }

                    if (answer != 2)
                    {
                        Alpha = 0;
                        ExitScreen();
                    }
                }, "Some settings have changed!", "Overwrite them?");
                ScreenManager.AddScreen(dialog, null);
            }
            else
            {
                Alpha = 0;
                ExitScreen();
            }
        }
Example #2
0
        public TeamFormationPane(Team team, int width, int height)
        {
            ConfirmDialog cd = new ConfirmDialog(ParentScreen as BesmashScreen, (a) => {
            }, "No Leader assigned", "Omit changes?");

            Team        = team;
            this.width  = width;
            this.height = height;
            initGrid();
            hide();
        }