コード例 #1
0
        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();
        }
コード例 #2
0
        void RefreshView()
        {
            m_LibraryContentContainer.Clear();
            m_HeaderButtonStrip.SetValueWithoutNotify(m_ActiveTab.ToString());
            switch (m_ActiveTab)
            {
            case BuilderLibraryTab.Controls:
                if (m_ViewMode == LibraryViewMode.TreeView)
                {
                    SetActiveView(ControlsTreeView);
                }
                else
                {
                    SetActiveView(ControlsPlainView);
                }
                break;

            case BuilderLibraryTab.Project:
                SetActiveView(ProjectTreeView);
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        public override void SetValueWithoutNotify(string newValue)
        {
            base.SetValueWithoutNotify(newValue);

            var values = newValue.Split('-');

            m_VerticalButtonStrip.SetValueWithoutNotify(values[0]);
            m_HorizontalButtonStrip.SetValueWithoutNotify(values[1]);
        }