Exemplo n.º 1
0
        void OnGUIInterstitialRules()
        {
            EditorGUILayout.Space();

            AdGUIHelper.BeginSessionGroup();
            AdGUIHelper.Session("Interstitial");
            if (AdGUIHelper.HeaderButton(InforIcon))
            {
                AdGUIHelper.ShowMessage(AdString.interstitial_limit_infor);
            }
            AdGUIHelper.EndSessionGroup();

            AdGUIHelper.BeginGroupedControls();
            EditorGUI.indentLevel++;

            Settings.localConfig.IsTimeLimited = EditorGUILayout.Toggle(new GUIContent("Time Limit", AdString.interstitial_time_limit_tooltip.Text),
                                                                        Settings.localConfig.IsTimeLimited);

            if (Settings.localConfig.IsTimeLimited)
            {
                EditorGUILayout.BeginVertical();
                EditorGUI.indentLevel++;

                Settings.localConfig.DelayInterstitialFromFristOpen = EditorGUILayout.FloatField(new GUIContent("First Open Delay", AdString.first_open_delay_tooltip.Text),
                                                                                                 Settings.localConfig.DelayInterstitialFromFristOpen);

                Settings.localConfig.DelayInterstitialFromStartApp = EditorGUILayout.FloatField(new GUIContent("Start Delay", AdString.start_delay_tooltip.Text),
                                                                                                Settings.localConfig.DelayInterstitialFromStartApp);

                Settings.localConfig.BetweenInterstitialLimited = EditorGUILayout.FloatField(new GUIContent("Between 2 Ads", AdString.between_2ads_tooltip.Text),
                                                                                             Settings.localConfig.BetweenInterstitialLimited);
                EditorGUI.indentLevel--;
                EditorGUILayout.EndVertical();
            }

            Settings.localConfig.IsSkipInterstitial = EditorGUILayout.Toggle(new GUIContent("Skip Interstitial", AdString.skip_inerstitial_tooltip.Text),
                                                                             Settings.localConfig.IsSkipInterstitial);
            if (Settings.localConfig.IsSkipInterstitial)
            {
                EditorGUILayout.BeginVertical();
                EditorGUI.indentLevel++;
                Settings.localConfig.SkipInterstitialStep = EditorGUILayout.IntField(new GUIContent("Step", AdString.skip_inerstitial_tooltip.Text),
                                                                                     Settings.localConfig.SkipInterstitialStep);
                EditorGUI.indentLevel--;
                EditorGUILayout.EndVertical();
            }

            Settings.localConfig.RequiredInternetConnection = AdGUIHelper.Toggle(Settings.localConfig.RequiredInternetConnection, AdString.required_connection_label, AdString.required_connection_tooltip);

            EditorGUI.indentLevel--;
            AdGUIHelper.EndGroupedControls();
        }