예제 #1
0
        private Window_Confirmation FileConfirmWindow(
            FileSelectedCommandMenu fileCommandMenu,
            Window_Title_Start_Game startGameMenu,
            string caption)
        {
            var     confirmWindow = new Window_Confirmation();
            int     height        = 64;
            Vector2 loc           = fileCommandMenu.SelectedOptionLoc + new Vector2(-8, 0);

            if (loc.Y > Config.WINDOW_HEIGHT - height)
            {
                loc.Y -= height;
            }
            confirmWindow.loc = loc;
            confirmWindow.set_text(caption);
            confirmWindow.add_choice("Yes", new Vector2(16, 16));
            confirmWindow.add_choice("No", new Vector2(56, 16));
            int text_width = Font_Data.text_width(caption, Config.CONVO_FONT);

            text_width = text_width + 16 +
                         (text_width % 8 == 0 ? 0 : (8 - text_width % 8));
            confirmWindow.size         = new Vector2(Math.Max(88, text_width), 48);
            confirmWindow.index        = 1;
            confirmWindow.stereoscopic = Config.TITLE_CHOICE_DEPTH;

            return(confirmWindow);
        }
예제 #2
0
        private void AddStartGameMenu()
        {
            var startGameMenu =
                new Window_Title_Start_Game(Global.latest_save_id);

            startGameMenu.Selected += startGameMenu_Selected;
            startGameMenu.MoveFile += startGameMenu_MoveFile;
            startGameMenu.CopyFile += startGameMenu_CopyFile;
            startGameMenu.Canceled += startGameMenu_Canceled;
            AddMenu(startGameMenu);
        }