Пример #1
0
        public static void DrawAddonRequestUI(UM_Addon addon)
        {
            EditorGUILayout.HelpBox("Ultimate Mobile " + addon + " Addon required", MessageType.Warning);
            using (new SA_GuiBeginHorizontal())
            {
                GUILayout.FlexibleSpace();
                var content = new GUIContent(" " + addon + " Addon", UM_Skin.GetPlatformIcon("unity_icon.png"));
                var click   = GUILayout.Button(content, EditorStyles.miniButton, GUILayout.Width(120), GUILayout.Height(18));
                if (!click)
                {
                    return;
                }

                string url;
                switch (addon)
                {
                case UM_Addon.AdMob:
                    url = k_AdMobAddon;
                    break;

                case UM_Addon.Playmaker:
                    url = k_PlaymakerAddon;
                    break;

                default:
                    throw new ArgumentOutOfRangeException("addon", addon, null);
                }
                SA_PackageManager.DownloadAndImport(addon + " Addon", url, interactive: false);
            }
        }
        protected override void OnCreate()
        {
            base.OnCreate();
            m_pluginsToolbar = new SA_HyperToolbar();
            m_pluginsToolbar.SetButtonsHeight(TOOLBAR_BUTTONS_HEIGHT);
            m_pluginsToolbar.SetItemsSapce(TOOLBAR_BUTTONS_SPACE);


            AddPlatform("Unified", UM_Skin.GetDefaultIcon("ultimate_icon_pro.png"));
            AddPlatform("Android", UM_Skin.GetPlatformIcon("android_icon.png"));
            AddPlatform("iOS", UM_Skin.GetPlatformIcon("ios_icon.png"));

            m_pluginsToolbar.SetSelectedIndex((int)UM_UIPlatform.Unified);
        }
Пример #3
0
        public override void OnLayoutEnable()
        {
            base.OnLayoutEnable();
            var content = new GUIContent("iOS Build Requirements", UM_Skin.GetPlatformIcon("ios_icon.png"));

            m_IOSRequirements = new SA_CollapsableWindowBlockLayout(content, () => { XCodeRequirements(); });

            content = new GUIContent("Android Build Requirements", UM_Skin.GetPlatformIcon("android_icon.png"));
            m_AndroidRequirements = new SA_CollapsableWindowBlockLayout(content, () => { AndroidRequirements(); });

            content             = new GUIContent("Unity Project Requirements ", UM_Skin.GetPlatformIcon("unity_icon.png"));
            m_UnityRequirements = new SA_CollapsableWindowBlockLayout(content, () => { DefineSymbols(); });

            m_LearnMoreLink = new SA_PluginActiveTextLink("[?] Learn More");
        }
Пример #4
0
        public UM_ServicePlatfromInfo(UM_UIPlatform platform, UM_NativeServiceSettings settings)
        {
            this.platform = platform;
            m_settings    = settings;

            switch (platform)
            {
            case UM_UIPlatform.IOS:
                m_content = new GUIContent(" iOS (" + m_settings.ServiceName + ")", UM_Skin.GetPlatformIcon("ios_icon.png"));
                break;

            case UM_UIPlatform.Android:
                m_content = new GUIContent(" Android (" + m_settings.ServiceName + ")", UM_Skin.GetPlatformIcon("android_icon.png"));
                break;
            }
            m_layout = new UM_PlatfromStateLayout(m_content);
        }
Пример #5
0
 private void DefineSymbols()
 {
     using (new SA_H2WindowBlockWithSpace(new GUIContent("SCRIPTING DEFINE SYMBOLS")))
     {
         var defines = SA_EditorDefines.GetScriptingDefines();
         if (defines.Length > 0)
         {
             foreach (var define in defines)
             {
                 var icon = UM_Skin.GetDefaultIcon("hash_tag_icon.png");
                 SA_EditorGUILayout.SelectableLabel(new GUIContent(define, icon));
             }
         }
         else
         {
             EditorGUILayout.HelpBox("No additional scripting defines required.", MessageType.Info);
         }
     }
 }
        public static void DrawAddonRequestUI(UM_Addon addon)
        {
            EditorGUILayout.HelpBox("Ultimate Mobile " + addon + " Addon required", MessageType.Warning);
            using (new SA_GuiBeginHorizontal()) {
                GUILayout.FlexibleSpace();
                var content = new GUIContent(" " + addon + " Addon", UM_Skin.GetPlatformIcon("unity_icon.png"));
                var click   = GUILayout.Button(content, EditorStyles.miniButton, GUILayout.Width(120), GUILayout.Height(18));
                if (click)
                {
                    string url = null;
                    switch (addon)
                    {
                    case UM_Addon.AdMob:
                        url = ADMOB_ADDON;
                        break;

                    case UM_Addon.Playmaker:
                        url = PLAYMAKER_ADDON;
                        break;
                    }
                    SA_PackageManager.DownloadAndImport(addon + " Addon", url, interactive: false);
                }
            }
        }
Пример #7
0
        public UM_AdvertisementPlatfromUI(string name, string image, SA_iAPIResolver resolver, Action onGUI) : base(new GUIContent(name, UM_Skin.GetPlatformIcon(image)), onGUI)
        {
            m_on         = new GUIContent("ON");
            m_off        = new GUIContent("OFF");
            m_stateLabel = new SA_HyperLabel(m_on, EditorStyles.boldLabel);
            m_stateLabel.SetMouseOverColor(SA_PluginSettingsWindowStyles.SelectedElementColor);

            m_resolver = resolver;
        }