Beispiel #1
0
 private void open_preview(IO.Suspend_Info info)
 {
     Suspend_Panel     = new Suspend_Info_Panel(false, info);
     Suspend_Panel.loc = MenuLoc +
                         new Vector2(0, -8 + PanelNodes.ActiveNodeIndex * 24);
     Suspend_Panel.stereoscopic = Config.TITLE_MENU_DEPTH;
 }
Beispiel #2
0
        internal void RefreshMenuChoices()
        {
            SuspendExists = Global.suspend_file_info != null;
            MenuChoices[(int)Main_Menu_Selections.Resume].Visible = SuspendExists;
            MenuChoices[(int)Main_Menu_Selections.Extras].Visible = Global.progress.ExtrasAccessible;

            if (SuspendExists)
            {
                SuspendPanel              = new Suspend_Info_Panel(true);
                SuspendPanel.loc          = new Vector2(-16, 8);
                SuspendPanel.stereoscopic = Config.TITLE_MENU_DEPTH;
            }
            else
            {
                SuspendPanel = null;
            }

            StartGamePanel = new StartGame_Info_Panel(
                Global.latest_save_id, MainMenuChoicePanel.PANEL_WIDTH, true);
            // Show preview of the latest save, if there is one
            StartGamePanel.active       = Global.latest_save_id != -1;
            StartGamePanel.loc          = new Vector2(-16, 8);
            StartGamePanel.stereoscopic = Config.TITLE_MENU_DEPTH;

            RefreshLocs();

            IEnumerable <MainMenuChoicePanel> nodes = new List <MainMenuChoicePanel>(MenuChoices);

            nodes       = nodes.Where(x => x.Visible);
            ChoiceNodes = new UINodeSet <MainMenuChoicePanel>(nodes);
            ChoiceNodes.CursorMoveSound  = System_Sounds.Menu_Move1;
            ChoiceNodes.SoundOnMouseMove = true;

            ChoiceNodes.set_active_node(MenuChoices[(int)Selection]);
            RefreshLocs();
        }
Beispiel #3
0
 internal void close_preview()
 {
     Suspend_Panel = null;
 }