Beispiel #1
0
 internal static void InitStudio(Harmony hi, PregnancyPlusPlugin instance)
 {
     if (StudioAPI.InsideStudio)
     {
         RegisterStudioControls();
     }
 }
Beispiel #2
0
        internal static void InitMaker(Harmony hi, PregnancyPlusPlugin instance)
        {
            _pluginInstance = instance;

            if (!StudioAPI.InsideStudio)
            {
                MakerAPI.RegisterCustomSubCategories += MakerAPI_MakerBaseLoaded;
                // MakerAPI.MakerFinishedLoading += MakerAPI_MakerFinishedLoading;
            }
        }
        /// <summary>
        /// Triggered each tick by PPPlugin.OnGUI, will show the gui when blendShapeWindowShow = true
        /// </summary>
        internal void OnGUI(PregnancyPlusPlugin instance)
        {
            if (_pluginInstance == null && instance != null)
            {
                _pluginInstance = instance;
            }

            if (blendShapeWindowShow)
            {
                //Show GUI when true
                GUI.backgroundColor = Color.black;
                windowRect          = GUILayout.Window(guiWindowId, windowRect, new GUI.WindowFunction(WindowFunc), "Pregnancy+ Blendshapes", new GUILayoutOption[0]);

                // Prevent clicks from going through
                if (windowRect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
                {
                    Input.ResetInputAxes();
                }
            }
        }