Example #1
0
        private void HandleLoadedGlux()
        {
            // When the project loads, immediately set the ATI so
            // that Glue behaves properly
            if (GlueState.Self.CurrentGlueProject?.DisplaySettings != null)
            {
                respondToViewModelChanges = false;
                {
                    viewModel.SetFrom(GlueState.Self.CurrentGlueProject.DisplaySettings);
                }
                respondToViewModelChanges = true;

                CameraAtiUpdateLogic.UpdateAtiTo(viewModel);
            }
        }
Example #2
0
        private void HandleDisplaySettingsChanged(object sender, PropertyChangedEventArgs e)
        {
            if (respondToViewModelChanges)
            {
                var glueProject = GlueState.Self.CurrentGlueProject;

                if (glueProject != null)
                {
                    glueProject.DisplaySettings = viewModel.ToDisplaySettings();

                    GlueCommands.Self.GluxCommands.SaveGlux();

                    if (CameraSetupCodeGenerator.ShouldGenerateCodeWhenPropertyChanged(e.PropertyName))
                    {
                        CameraSetupCodeGenerator.UpdateOrAddCameraSetup();
                    }

                    CameraSetupCodeGenerator.AddCameraSetupCall(ProjectManager.GameClassFileName, true);

                    CameraAtiUpdateLogic.UpdateAtiTo(viewModel);
                }
            }
        }