Esempio n. 1
0
        private void SupportPartnerMenu_Selected(object sender, EventArgs e)
        {
            var supportPartnerMenu = (sender as SupportCommandMenu);
            var supportMenu        = (Menus.ElementAt(1) as Window_Base_Support);
            int targetId           = supportPartnerMenu.TargetId;

            if (supportMenu.TrySelectPartner(targetId))
            {
                Global.game_system.play_se(System_Sounds.Confirm);

                var supportConfirmWindow = new Preparations_Confirm_Window();
                supportConfirmWindow.set_text(string.Format("Speak to {0}?",
                                                            Global.game_actors[targetId].name));
                supportConfirmWindow.add_choice("Yes", new Vector2(16, 12));
                supportConfirmWindow.add_choice("No", new Vector2(64, 12));
                supportConfirmWindow.size  = new Vector2(112, 40);
                supportConfirmWindow.loc   = new Vector2(32, 24);
                supportConfirmWindow.index = 1;

                var supportConfirmMenu = new ConfirmationMenu(supportConfirmWindow);
                supportConfirmMenu.Confirmed += SupportConfirmMenu_Confirmed;
                supportConfirmMenu.Canceled  += menu_Closed;
                AddMenu(supportConfirmMenu);
            }
            else
            {
                Global.game_system.play_se(System_Sounds.Buzzer);
            }
        }
Esempio n. 2
0
        private Preparations_Confirm_Window UseConfirmMenu(Vector2 cursorLoc)
        {
            var useConfirmWindow = new Preparations_Confirm_Window();

            useConfirmWindow.set_text("Will you really use it?");
            useConfirmWindow.add_choice("Yes", new Vector2(24, 12));
            useConfirmWindow.add_choice("No", new Vector2(64, 12));
            useConfirmWindow.size  = new Vector2(136, 40);
            useConfirmWindow.loc   = new Vector2(Config.WINDOW_WIDTH - 156, Config.WINDOW_HEIGHT - 60);
            useConfirmWindow.index = 1;
            useConfirmWindow.current_cursor_loc = cursorLoc;

            return(useConfirmWindow);
        }