Ejemplo n.º 1
0
        void OnEditClick(MyGuiControlButton sender)
        {
            var row = m_sessionsTable.SelectedRow;

            if (row == null)
            {
                return;
            }
            var save = FindSave(row);

            if (save != null)
            {
                ulong dummySizeInBytes;
                var   checkpoint = MyLocalCache.LoadCheckpoint(save.Item1, out dummySizeInBytes);
                MySession.FixIncorrectSettings(checkpoint.Settings);
                var worldSettingsScreen = MyGuiSandbox.CreateScreen(MyPerGameSettings.GUI.EditWorldSettingsScreen, checkpoint, save.Item1);
                MyGuiSandbox.AddScreen(worldSettingsScreen);
                worldSettingsScreen.Closed += (source) => { m_state = StateEnum.ListNeedsReload; };
            }
        }
Ejemplo n.º 2
0
        void OnEditClick(MyGuiControlButton sender)
        {
            var row = m_saveBrowser.SelectedRow;

            if (row == null)
            {
                return;
            }
            var save = m_saveBrowser.GetSave(row);

            if (save != null)
            {
                ulong dummySizeInBytes;
                var   checkpoint = MyLocalCache.LoadCheckpoint(save.Item1, out dummySizeInBytes);
                MySession.FixIncorrectSettings(checkpoint.Settings);
                var worldSettingsScreen = MyGuiSandbox.CreateScreen(MyPerGameSettings.GUI.EditWorldSettingsScreen, checkpoint, save.Item1);
                worldSettingsScreen.Closed += source => m_saveBrowser.ForceRefresh();

                MyGuiSandbox.AddScreen(worldSettingsScreen);
            }
        }