Пример #1
0
 override protected void OnButtonPressed()
 {
     if (m_RequiresPopup)
     {
         if (m_Manager)
         {
             BasePanel panel = m_Manager.GetPanelForPopUps();
             if (panel != null)
             {
                 panel.CreatePopUp(m_Command, m_CommandParam, m_CommandParam2, m_PopupOffset,
                                   m_PopupText);
                 if (m_CenterPopupOnButton)
                 {
                     panel.PositionPopUp(transform.position +
                                         transform.forward * panel.PopUpOffset +
                                         panel.transform.TransformVector(m_PopupOffset));
                 }
                 ResetState();
             }
         }
     }
     else
     {
         SketchControlsScript.m_Instance.IssueGlobalCommand(m_Command, m_CommandParam,
                                                            m_CommandParam2);
     }
 }
Пример #2
0
        override protected void OnButtonPressed()
        {
            BasePanel panel = m_Manager.GetPanelForPopUps();

            panel.CreatePopUp(SketchControlsScript.GlobalCommands.SketchbookMenu,
                              m_SketchIndex, (int)m_SketchSetType);

            // Position popup next to button.
            panel.PositionPopUp(transform.position);
        }
Пример #3
0
 override protected void OnButtonPressed() {
   if (m_Manager) {
     BasePanel panel = m_Manager.GetPanelForPopUps();
     // If we haven't requested visuals, show the popup.
     if (!App.Instance.RequestingAudioReactiveMode) {
       panel.CreatePopUp(m_Command, m_CommandParam, -1, m_PopupText);
       ResetState();
     }
     App.Instance.ToggleAudioReactiveBrushesRequest();
   }
 }
Пример #4
0
 void OnLongPress()
 {
     if (m_Manager)
     {
         BasePanel panel = m_Manager.GetPanelForPopUps();
         panel.CreatePopUp(m_Command, m_CommandParam, -1, m_PopupText);
         panel.PositionPopUp(transform.position +
                             transform.forward * panel.PopUpOffset +
                             panel.transform.TransformVector(m_PopupOffset));
         ResetState();
     }
 }
Пример #5
0
        override protected void OnButtonPressed()
        {
            for (int i = 0; i < m_ObjectsToHideBehindPopups.Length; ++i)
            {
                m_ObjectsToHideBehindPopups[i].SetActive(false);
            }

            var       popupText = m_ColorMode == ColorMode.Fog ? "Fog" : "Skybox Color";
            BasePanel panel     = m_Manager.GetPanelForPopUps();

            panel.CreatePopUp(SketchControlsScript.GlobalCommands.LightingLdr, -1, -1, popupText, OnPopUpClose);

            var popup = (panel.PanelPopUp as ColorPickerPopUpWindow);

            switch (m_ColorMode)
            {
            case ColorMode.SkyColorA:
                // Init must be called after all popup.ColorPicked actions have been assigned.
                popup.ColorPicker.ColorPicked            += OnSkyAColorPicked;
                popup.ColorPicker.Controller.CurrentColor = SceneSettings.m_Instance.SkyColorA;
                popup.ColorPicker.ColorFinalized         += SkyColorFinalized;
                popup.CustomColorPalette.ColorPicked     += OnSkyColorAPickedAsFinal;
                break;

            case ColorMode.SkyColorB:
                popup.ColorPicker.ColorPicked            += OnSkyBColorPicked;
                popup.ColorPicker.Controller.CurrentColor = SceneSettings.m_Instance.SkyColorB;
                popup.ColorPicker.ColorFinalized         += SkyColorFinalized;
                popup.CustomColorPalette.ColorPicked     += OnSkyColorBPickedAsFinal;
                break;

            case ColorMode.Fog:
                popup.ColorPicker.ColorPicked            += OnFogColorPicked;
                popup.ColorPicker.Controller.CurrentColor = SceneSettings.m_Instance.FogColor;
                popup.ColorPicker.ColorFinalized         += FogColorFinalized;
                popup.CustomColorPalette.ColorPicked     += OnFogColorPickedAsFinal;
                break;
            }
        }