Beispiel #1
0
        void launchGame(Game game)
        {
            if (game.GoodmergeFiles != null && game.GoodmergeFiles.Count > 0)
            {
                if (alwaysShowGoodmergeDialog || (showGoodmergeDialogOnce && string.IsNullOrEmpty(game.CurrentDisc.LaunchFile)))
                {
                    string launchFile = "";
                    if (!MenuPresenter.ShowGoodmergeSelect(ref launchFile, game.GoodmergeFiles, game.Filename, Plugin.WINDOW_ID))
                    {
                        return;
                    }
                    game.CurrentDisc.LaunchFile = launchFile;
                    game.CurrentDisc.Save();
                }
            }

            if (previewVidPlaying)
            {
                previewVidPlaying = false;
                if (OnPreviewVideoStatusChanged != null)
                {
                    OnPreviewVideoStatusChanged(null, false);
                }
            }

            LaunchHandler.Instance.StartLaunch(game);
        }
Beispiel #2
0
        public void ShowContextMenu()
        {
            ExtendedGUIListItem item = null;
            bool detailsUpdate       = false;

            if (currentView == ViewState.Details)
            {
                item          = detailsItem;
                detailsUpdate = true;
            }
            else if (facade.Focus)
            {
                item = (ExtendedGUIListItem)facade.SelectedListItem;
            }

            if (MenuPresenter.ShowContext(item, this))
            {
                if (detailsUpdate)
                {
                    gameSelected(item, true);
                }
                else
                {
                    onFacadeItemSelected(item, facade, detailsUpdate); //Update GUI
                }
            }
        }
Beispiel #3
0
        protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
        {
            base.OnClicked(controlId, control, actionType);

            if (facade != null && controlId == facade.GetID)
            {
                switch (actionType)
                {
                case Action.ActionType.ACTION_SELECT_ITEM:
                    newGUIHandler.ItemSelected();
                    break;

                case Action.ActionType.ACTION_NEXT_ITEM:
                    newGUIHandler.LaunchDocument();
                    break;
                }
            }
            else if (control == goodmergeList)
            {
                newGUIHandler.GoodMergeClicked(actionType);
            }
            //Layout button
            else if (buttonLayout != null && controlId == buttonLayout.GetID)
            {
                int view = MenuPresenter.ShowLayoutDialog(GetID);
                if (view < 0)
                {
                    return;
                }

                newGUIHandler.setLayout(view, true);
            }
            //Most played button
            else if (buttonSort == control)
            {
                ListItemProperty sortProperty = MenuPresenter.ShowSortDialog(GetID, newGUIHandler.SortEnabled);
                if (sortProperty != ListItemProperty.NONE && sortProperty != newGUIHandler.SortProperty)
                {
                    newGUIHandler.SortProperty = sortProperty;
                    newGUIHandler.Sort();
                }
            }
            else if (buttonViews == control)
            {
                newGUIHandler.SwitchView();
            }
            else if (details_play == control)
            {
                newGUIHandler.LaunchGame();
            }
            else if (buttonImport == control)
            {
                newGUIHandler.RestartImporter();
            }
        }
Beispiel #4
0
        public void SwitchView()
        {
            bool         showPC   = DB.Instance.GetGames(Emulator.GetPC()).Count > 0;
            StartupState newState = MenuPresenter.ShowViewsDialog(startupState, showPC);

            if (startupItem != null || newState != startupState)
            {
                startupState = newState;
                startupItem  = null;
                toggleDetails(null, true);
                loadStartupItems(0);
            }
        }