public void Refresh() { // HACK until fix goes in: SetDelayOnSizeFieldsEnabled(false); m_CanvasWidth.SetValueWithoutNotify(settings.CanvasWidth); m_CanvasHeight.SetValueWithoutNotify(settings.CanvasHeight); SetDelayOnSizeFieldsEnabled(true); m_BackgroundOptionsFoldout.SetCheckboxValueWithoutNotify(settings.EnableCanvasBackground); m_ColorOpacityField.SetValueWithoutNotify(settings.ColorModeBackgroundOpacity); m_ImageOpacityField.SetValueWithoutNotify(settings.ImageModeCanvasBackgroundOpacity); m_CameraOpacityField.SetValueWithoutNotify(settings.CameraModeCanvasBackgroundOpacity); m_BackgroundMode.SetValueWithoutNotify(settings.CanvasBackgroundMode.ToString()); m_ColorField.SetValueWithoutNotify(settings.CanvasBackgroundColor); var scaleModeStr = settings.CanvasBackgroundImageScaleMode.ToString(); scaleModeStr = BuilderNameUtilities.ConvertCamelToDash(scaleModeStr); m_ImageField.SetValueWithoutNotify(settings.CanvasBackgroundImage); m_ImageScaleModeField.SetValueWithoutNotify(scaleModeStr); m_CameraField.SetValueWithoutNotify(FindCameraByName()); m_EditorExtensionsModeToggle?.SetValueWithoutNotify(m_Document.fileSettings.editorExtensionMode); ApplyBackgroundOptions(); RefreshMatchGameViewToggle(); }
public void Refresh() { // HACK until fix goes in: m_CanvasWidth.isDelayed = false; m_CanvasHeight.isDelayed = false; m_CanvasWidth.SetValueWithoutNotify(settings.CanvasWidth); m_CanvasHeight.SetValueWithoutNotify(settings.CanvasHeight); m_CanvasWidth.isDelayed = true; m_CanvasHeight.isDelayed = true; m_OpacityField.SetValueWithoutNotify(settings.CanvasBackgroundOpacity); m_BackgroundMode.SetValueWithoutNotify(settings.CanvasBackgroundMode.ToString()); m_ColorField.SetValueWithoutNotify(settings.CanvasBackgroundColor); var scaleModeStr = settings.CanvasBackgroundImageScaleMode.ToString(); scaleModeStr = BuilderNameUtilities.ConvertCamelToDash(scaleModeStr); m_ImageField.SetValueWithoutNotify(settings.CanvasBackgroundImage); m_ImageScaleModeField.SetValueWithoutNotify(scaleModeStr); m_CameraField.SetValueWithoutNotify(FindCameraByName()); ApplyBackgroundOptions(); }