Ejemplo n.º 1
0
    public static void InitAndShowStartupPanel()
    {
        if (EditorApplication.isPlayingOrWillChangePlaymode)
        {
            return;
        }

        InitMonKey();
        GettingStartedPanel.OpenPanelFirstTime();
    }
Ejemplo n.º 2
0
    private static void OpenStartupPanel()
    {
        GettingStartedPanel panel = GetWindow <GettingStartedPanel>();

        InitGraphics(panel);
        panel.name         = "Getting Started With MonKey";
        panel.titleContent = new GUIContent("Getting Started With MonKey", MonkeyStyle.Instance.MonkeyHead);
        panel.minSize      = new Vector2(600, Mathf.Min(Screen.currentResolution.height, 862));
        panel.maxSize      = new Vector2(600, Mathf.Min(Screen.currentResolution.height, 862));
        panel.ShowUtility();
    }
Ejemplo n.º 3
0
    private static void InitGraphics(GettingStartedPanel panel)
    {
        MonkeyStyle.Instance.PostInstanceCreation();
        panel.monKeyBanner      = MonkeyStyle.Instance.GetTextureFromName("MonKeyBanner");
        panel.monKeyBannerStyle = new GUIStyle()
        {
            fixedWidth  = 601,
            fixedHeight = 260,
            normal      = { background = panel.monKeyBanner }
        };
        panel.welcomeTitleStyle = new GUIStyle()
        {
            fontSize     = 28,
            stretchWidth = true,
            alignment    = TextAnchor.MiddleCenter,
            padding      = new RectOffset(10, 10, 10, 5),
            normal       = { background = MonkeyStyle.Instance.WindowBackgroundTex }
        };

        panel.rateUsSectionStyle = new GUIStyle(panel.welcomeTitleStyle)
        {
            padding = new RectOffset(15, 10, 10, 5),
            normal  = { background = MonkeyStyle.Instance.TopPanelGradientTexture }
        };

        panel.sectionTitleStyle = new GUIStyle()
        {
            fontSize     = 20,
            stretchWidth = true,
            alignment    = TextAnchor.MiddleLeft,
            padding      = new RectOffset(5, 5, 5, 0),
            margin       = new RectOffset(30, 0, 0, 0)
        };

        panel.welcomeTextStyle = new GUIStyle(MonkeyStyle.Instance.CommandNameStyle)
        {
            fontSize     = 12,
            stretchWidth = true,
            alignment    = TextAnchor.MiddleCenter,
            padding      = new RectOffset(5, 5, 5, 5),
            //  normal = { background = MonkeyStyle.Instance.SelectedResultFieldTex }
        };

        panel.sectionSubtitleStyle = new GUIStyle(panel.welcomeTextStyle)
        {
            alignment = TextAnchor.MiddleLeft,
            margin    = new RectOffset(30, 0, 0, 0)
        };

        panel.sectionBackgroundStyle = new GUIStyle()
        {
            normal = { background = MonkeyStyle.ColorTexture(1, 1, ColorExt.HTMLColor("3a3a3a")) }
        };

        panel.titleColor           = ColorExt.HTMLColor("cbcbcb");
        panel.sectionSubtitleColor = ColorExt.HTMLColor("ae8d4d");

        panel.buttonStyle = new GUIStyle()
        {
            fixedHeight = 50,
            fixedWidth  = 250,
            fontSize    = 12,
            alignment   = TextAnchor.MiddleCenter,
            normal      = { background = MonkeyStyle.ColorTexture(1, 1, ColorExt.HTMLColor("4d4d4d")) },
            hover       = { background = MonkeyStyle.ColorTexture(1, 1,
                                                                  ColorExt.HTMLColor("4d4d4d").DarkerBrighter(-.1f)) },
        };

        panel.newVersionButtonStyle = new GUIStyle()

        {
            fixedHeight  = 30,
            stretchWidth = true,
            fontSize     = 12,
            alignment    = TextAnchor.MiddleCenter,
            normal       = { background = MonkeyStyle.ColorTexture(1, 1, ColorExt.HTMLColor("4d4d4d")) },
            hover        = { background = MonkeyStyle.ColorTexture(1, 1,
                                                                   ColorExt.HTMLColor("4d4d4d").DarkerBrighter(-.05f)) },
        };


        panel.rateUsButtonBoxStyle = new GUIStyle()
        {
            margin       = new RectOffset(1, 1, 1, 1),
            stretchWidth = true,
        };

        panel.newVersionButtonBoxStyle = new GUIStyle()
        {
            margin       = new RectOffset(1, 1, 1, 1),
            padding      = new RectOffset(5, 5, 0, 0),
            stretchWidth = true,
        };

        panel.buttonTop = new GUIStyle()
        {
            fixedHeight  = 2,
            stretchWidth = true,
            normal       = { background = MonkeyStyle.ColorTexture(1, 1, ColorExt.HTMLColor("616161")) },
            hover        = { background = MonkeyStyle.ColorTexture(1, 1,
                                                                   ColorExt.HTMLColor("616161").DarkerBrighter(-.1f)) }
        };

        panel.buttonBottom = new GUIStyle()
        {
            fixedHeight  = 2,
            stretchWidth = true,
            normal       = { background = MonkeyStyle.ColorTexture(1, 1, ColorExt.HTMLColor("2d2d2d")) },
            hover        = { background = MonkeyStyle.ColorTexture(1, 1,
                                                                   ColorExt.HTMLColor("2d2d2d").DarkerBrighter(-.1f)) }
        };

        panel.buttonHighlightStyle = new GUIStyle()
        {
            margin = new RectOffset(10, 10, 10, 10),
            normal =
            {
                background = MonkeyStyle.ColorTexture(1, 1, ColorExt.HTMLColor("8FC225"))
            }
        };
    }