Inheritance: UnityEngine.ScriptableObject
Exemplo n.º 1
0
    public override void DebugRender()
    {
        if (!Enabled)
        {
            return;
        }
        Vector2 sz = Camera.main.pixelRect.size;

        lock (_objectsLock) {
            foreach (var o in _detectedObjects)
            {
                Rect r = new Rect(o.x * sz.x, o.y * sz.y, o.width * sz.x, o.height * sz.y);
                GUITools.DrawScreenRectBorder(r, 4, ColorCode);
            }
        }
    }
Exemplo n.º 2
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            EditorGUI.BeginProperty(pos, label, prop);

            float origX     = pos.x;
            float origWidth = pos.width;

            SerializedProperty runTargetProp = DrawRunTargetAndCallMethod(ref pos, prop, origWidth - (65 + GUITools.toolbarDividerSize + GUITools.iconButtonWidth));

            GUITools.DrawToolbarDivider(pos.x, pos.y);
            pos.x += GUITools.toolbarDividerSize;

            DrawEnd(ref pos, prop, origX, origWidth, runTargetProp);

            EditorGUI.EndProperty();
        }
Exemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            GUITools.Space(2);
            EditorGUILayout.LabelField("Debug:", GUITools.boldLabel);
            title        = EditorGUILayout.TextField(title);
            debugMessage = EditorGUILayout.TextArea(debugMessage);

            if (GUILayout.Button("Start Debug"))
            {
                UITextPanel panel = target as UITextPanel;
                panel.SetTexts(title, debugMessage, true);
                EditorUtility.SetDirty(panel);
            }
        }
        void DrawInputManagerSettings()
        {
            if (Application.isPlaying)
            {
                EditorGUILayout.Space();
                EditorGUILayout.HelpBox("Scene already initialized... any changes will take place the next time you enter play mode.", MessageType.Info);
            }

            GUITools.Space(2);
            for (int i = 0; i < props.Length; i++)
            {
                GUI.enabled = i > 0 || !Application.isPlaying;
                EditorGUILayout.PropertyField(serializedObject.FindProperty(props[i]), true);
            }
            GUI.enabled = true;
        }
 // Token: 0x06000989 RID: 2441 RVA: 0x0003BF2C File Offset: 0x0003A12C
 public void Draw(Rect rect)
 {
     GUI.Label(new Rect(8f, rect.y + 1f, 160f, 14f), this.Date, BlueStonez.label_interparkmed_11pt_left);
     if (this.View.Priority == 0)
     {
         GUI.color = Color.red;
     }
     GUI.Label(new Rect(80f, rect.y, this.Length, 14f), this.View.Description, BlueStonez.label_interparkbold_11pt_left);
     GUI.color        = Color.white;
     GUI.contentColor = ((this.View.Priority != 0) ? ColorScheme.UberStrikeYellow : Color.red);
     if (!string.IsNullOrEmpty(this.View.Url) && GUITools.Button(new Rect(90f + this.Length, rect.y, 78f, 16f), new GUIContent(LocalizedStrings.MoreInfo, LocalizedStrings.OpenThisLinkInANewBrowserWindow), BlueStonez.buttondark_medium))
     {
         ScreenResolutionManager.IsFullScreen = false;
         ApplicationDataManager.OpenUrl(this.View.Description, this.View.Url);
     }
     GUI.contentColor = Color.white;
 }
Exemplo n.º 6
0
    void OnGUI()
    {
        GUI.skin = skin;

        float dpiScaling = GUITools.DpiScaling;

        GUITools.SetFontSizes();

        GUILayout.BeginArea(new Rect(10, Screen.height - 60 * dpiScaling, 200 * dpiScaling, 50 * dpiScaling));

        if (GUILayout.Button("Back To Menu", GUILayout.Height(50 * dpiScaling), GUILayout.Width(200 * dpiScaling)))
        {
            GoBack();
        }

        GUILayout.EndArea();
    }
 // Token: 0x06000C51 RID: 3153 RVA: 0x0005307C File Offset: 0x0005127C
 private void DrawPointsTableContent(Rect scrollViewRect)
 {
     GUI.Box(scrollViewRect, GUIContent.none, BlueStonez.window_standard_grey38);
     if (this._pointTransactions.CurrentPage != null)
     {
         this._scrollControls = GUITools.BeginScrollView(scrollViewRect.Expand(0, -1), this._scrollControls, new Rect(0f, 0f, scrollViewRect.width - 17f, (float)this._pointTransactions.CurrentPage.PointDeposits.Count * 23f), false, false, true);
         float num = 0f;
         foreach (PointDepositView pointDepositView in this._pointTransactions.CurrentPage.PointDeposits)
         {
             GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Points, 0, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Points, 0, scrollViewRect.width), 23f), pointDepositView.DepositDate.ToString(TransactionHistory.DATE_FORMAT), BlueStonez.label_interparkmed_11pt);
             GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Points, 1, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Points, 1, scrollViewRect.width), 23f), pointDepositView.Points.ToString(), BlueStonez.label_interparkmed_11pt);
             GUI.Label(new Rect(this.GetColumnOffset(TransactionHistory.AccountArea.Points, 2, scrollViewRect.width), num, this.GetColumnWidth(TransactionHistory.AccountArea.Points, 2, scrollViewRect.width), 23f), pointDepositView.DepositType.ToString(), BlueStonez.label_interparkmed_11pt);
             num += 23f;
         }
         GUITools.EndScrollView();
     }
 }
Exemplo n.º 8
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            SerializedProperty clipsProp = prop.FindPropertyRelative("clips");

            SerializedProperty is2D    = prop.FindPropertyRelative("is2D");
            SerializedProperty oneShot = prop.FindPropertyRelative("oneShot");

            if (string.IsNullOrEmpty(label.text))
            {
                label = new GUIContent("Clip");
            }

            pos.height = EditorGUIUtility.singleLineHeight;

            EditorGUI.LabelField(pos, label, GUITools.boldLabel);

            DrawToolbar(pos.x + pos.width - GUITools.iconButtonWidth * 5, pos.y, prop, oneShot, is2D);

            GUITools.Box(new Rect(pos.x, pos.y, pos.width, CalculateHeight(clipsProp, is2D, prop.isExpanded) - EditorGUIUtility.singleLineHeight * .25f), GUITools.shade);

            pos.y     += GUITools.singleLineHeight;
            pos.x     += GUITools.iconButtonWidth * .5f;
            pos.width -= GUITools.iconButtonWidth * .5f;

            EditorGUI.PropertyField(pos, clipsProp, true);
            pos.y += EditorGUI.GetPropertyHeight(clipsProp, true);

            DrawProp(prop, ref pos, "volume");
            DrawProp(prop, ref pos, "pitchRange");

            if (!is2D.boolValue)
            {
                DrawProp(prop, ref pos, "minMaxDistance");
            }

            if (prop.isExpanded)
            {
                if (!is2D.boolValue)
                {
                    DrawProp(prop, ref pos, "spread");
                    DrawProp(prop, ref pos, "doppler");
                }
                DrawProp(prop, ref pos, "priority");
                DrawProp(prop, ref pos, "stereoPan");
            }
        }
Exemplo n.º 9
0
		protected override bool DrawUniqueDetectorProperties()
		{
			if (!ACTkSettings.Instance.InjectionDetectorEnabled)
			{
				using (GUITools.Vertical(GUITools.PanelWithBackground))
				{
					EditorGUILayout.Separator();
					EditorGUILayout.HelpBox("Injection Detector support is not enabled! Injection Detector will not work properly", 
						MessageType.Error, true);

					using (new GUILayout.HorizontalScope())
					{
						if (GUILayout.Button("Enable Now"))
						{
							ACTkSettings.Instance.InjectionDetectorEnabled = true;
						}
						if (GUILayout.Button("Enable In settings..."))
						{
							ACTkSettings.Show();
						}
					}

					EditorGUILayout.Separator();
				}

				return true;
			}

			if (SettingsUtils.IsIL2CPPEnabled())
			{
				EditorGUILayout.HelpBox("Mono Injections are not possible in IL2CPP, this detector is not needed in IL2CPP builds", 
					MessageType.Info, true);

				return true;
			}

			if (!InjectionRoutines.IsTargetPlatformCompatible())
			{
				EditorGUILayout.HelpBox("Injection Detection is only supported in Standalone and Android builds", 
					MessageType.Warning, true); 

				return true;
			}

			return false;
		}
    void OnGUI()
    {
        if (message == "")
        {
            message = CheckForErrors();
        }

        GUI.color = guiColor;

        GUILayout.BeginArea(GUITools.Scale(new Rect(10, 10, Screen.width - 20, 200)));
        if (sceneDescription != "")
        {
            GUILayout.Label(sceneDescription);
        }
        GUILayout.Label(message);
        GUILayout.EndArea();
    }
Exemplo n.º 11
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            pos.height = GUITools.singleLineHeight;

            if (!string.IsNullOrEmpty(label.text))
            {
                GUITools.Label(pos, label, GUITools.black, GUITools.boldLabel);
                pos.y += GUITools.singleLineHeight;
            }

            SerializedProperty objProp = prop.FindPropertyRelative("collection");

            EditorGUI.PropertyField(pos, objProp, new GUIContent("Collection"), true);
            pos.y += GUITools.singleLineHeight;

            if (!string.IsNullOrEmpty(objProp.stringValue))
            {
                SerializedProperty nameProp = prop.FindPropertyRelative("name");

                GUITools.Label(new Rect(pos.x, pos.y, EditorGUIUtility.labelWidth, pos.height), new GUIContent("Prefab"), GUITools.black, GUITools.label);
                if (GUITools.Button(pos.x + EditorGUIUtility.labelWidth, pos.y, pos.width - EditorGUIUtility.labelWidth, pos.height, new GUIContent(nameProp.stringValue), GUITools.white, GUITools.popup, GUITools.black))
                {
                    PrefabReferenceCollection refObject = GameSettings.GetSettings <PrefabReferenceCollection>(objProp.stringValue);
                    if (refObject != null)
                    {
                        GenericMenu menu = new GenericMenu();

                        for (int i = 0; i < refObject.prefabs.Length; i++)
                        {
                            if (refObject.prefabs[i] != null)
                            {
                                string name = refObject.prefabs[i].name;
                                menu.AddItem(
                                    new GUIContent(name), name == nameProp.stringValue,
                                    () => {
                                    nameProp.stringValue = name;
                                    nameProp.serializedObject.ApplyModifiedProperties();
                                }
                                    );
                            }
                        }
                        menu.ShowAsContext();
                    }
                }
            }
        }
Exemplo n.º 12
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);
            position.height = EditorGUIUtility.singleLineHeight;

            property.isExpanded = GUITools.DrawToggleButton(property.isExpanded, new GUIContent(property.isExpanded ? "V" : ">"), position.x, position.y, GUITools.blue, GUITools.white);
            position.x         += GUITools.iconButtonWidth;
            position.width     -= GUITools.iconButtonWidth;
            EditorGUI.LabelField(position, label, GUITools.boldLabel);

            if (property.isExpanded)
            {
                position.y += GUITools.singleLineHeight;
                DrawParams(position, property);
            }
            EditorGUI.EndProperty();
        }
Exemplo n.º 13
0
    /// <summary>
    /// Draw the split settings
    /// </summary>
    private void DrawSplittingSettings()
    {
        if (IsEnemyUnfolded)
        {
            EditorGUILayout.Space();

            EditorGUILayout.BeginVertical("Box");

            //Draw a header for the enemy spinning settings
            if (TDS_EditorUtility.Button("Splitting Enemies", "Wrap / unwrap splitting enemies", TDS_EditorUtility.HeaderStyle))
            {
                AreSplittingSettingsUnfolded = !areSplittingSettingsUnfolded;
            }
            if (areSplittingSettingsUnfolded)
            {
                EditorGUILayout.Space();
                for (int i = 0; i < splitingEnemiesNames.arraySize; i++)
                {
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.LabelField(splitingEnemiesNames.GetArrayElementAtIndex(i).stringValue, TDS_EditorUtility.HeaderStyle);
                    GUITools.ActionButton("X", RemoveSettingsAtIndex, i, Color.white, Color.black, "Remove this spliting enemy");
                    Repaint();
                    serializedObject.ApplyModifiedProperties();
                    EditorGUILayout.EndHorizontal();
                }
                EditorGUILayout.Space();

                TDS_Enemy _e = null;
                _e = EditorGUILayout.ObjectField("Add Splitting Enemy", _e, typeof(TDS_Enemy), false) as TDS_Enemy;
                if (_e != null)
                {
                    splitingEnemiesNames.InsertArrayElementAtIndex(0);
                    splitingEnemiesNames.GetArrayElementAtIndex(0).stringValue = _e.EnemyName;
                    splitingPosition.InsertArrayElementAtIndex(0);
                    splitingPosition.GetArrayElementAtIndex(0).vector3Value = Vector3.forward;
                    Repaint();
                }
                EditorGUILayout.Space();

                TDS_EditorUtility.ObjectField("Splitting Portrait", "Portrait of the splitting enemies", splittingPortrait, typeof(GameObject));
                serializedObject.ApplyModifiedProperties();
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.Space();
        }
    }
Exemplo n.º 14
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            GUITools.Space(2);
            EditorGUILayout.LabelField("Debug:", GUITools.boldLabel);
            value = EditorGUILayout.Slider(value, 0, 1);
            text  = EditorGUILayout.TextField(text);

            if (GUILayout.Button("Start Debug"))
            {
                (target as UIValueTracker).SetValue(value, UIColorScheme.Normal);
                (target as UIValueTracker).text.SetText(text);
                (target as UIValueTracker).UpdateElementLayout();//true, true);

                EditorUtility.SetDirty(target);
            }
        }
Exemplo n.º 15
0
 /// <summary>
 /// Show the point manager settings
 /// Edit its position
 /// Edit all waves in the manager
 /// </summary>
 void ShowPointManagerSettings()
 {
     GUI.color = Color.red;
     EditorGUILayout.HelpBox("Point Manager Settings", MessageType.None);
     GUI.color = Color.white;
     p_target.PointsManager.Position = EditorGUILayout.Vector3Field("Manager Position", p_target.PointsManager.Position);
     GUI.color = Color.cyan;
     EditorGUILayout.HelpBox("WAVES", MessageType.None);
     for (int i = 0; i < p_target.PointsManager.AllWavePoints.Count; i++)
     {
         ShowWaveSettings(p_target.PointsManager.AllWavePoints[i]);
         GUITools.ActionButton("Remove Wave point", RemoveWavePoint, i, Color.white, Color.black);
         EditorGUILayout.Space();
     }
     EditorGUILayout.Space();
     GUITools.ActionButton("Add Wave point", p_target.PointsManager.AddWavePoint, Color.white, Color.black);
 }
Exemplo n.º 16
0
        protected void DrawEnd(ref Rect pos, SerializedProperty prop, float origX, float origWidth, SerializedProperty runTargetProp)
        {
            prop.isExpanded = GUITools.DrawIconToggle(prop.isExpanded, new GUIContent("P", "Show Parameters"), pos.x, pos.y, GUITools.blue, GUITools.white);

            pos.x += GUITools.iconButtonWidth;

            if (runTargetProp.enumValueIndex == (int)RunTarget.Reference)
            {
                DrawReferenceTarget(ref pos, prop, origX, origWidth);
            }
            else if (runTargetProp.enumValueIndex == (int)RunTarget.Subject)
            {
                DrawRuntimeObjectName(ref pos, prop, origX, origWidth);
            }

            DrawParameters(ref pos, prop, prop.isExpanded, origX, origWidth);
        }
Exemplo n.º 17
0
    private void OnGUI()
    {
        switch (CurrentType)
        {
        case LogType.Local:
            UploadLogs();
            break;

        case LogType.OnServer:
            DownLoadLogs();
            break;

        default:
            break;
        }
        GUITools.ActionButton("Close", Close, Color.red, Color.black);
    }
Exemplo n.º 18
0
        public string Draw(string current, GUIContent gui)
        {
            EditorGUILayout.BeginHorizontal();

            //draw field
            int selected = EditorGUILayout.Popup(gui, GetActiveIndex(current), elements);

            // draw reset button
            if (GUITools.IconButton(resetButtonContent, GUITools.white))
            {
                UpdateAssetReferences();
            }

            EditorGUILayout.EndHorizontal();

            return(selected < 0 ? null : elements[selected]);
        }
        public void FocusOnDocument(PDFDocument pdf_document_to_focus_on)
        {
            // Nothing to do here
            if (null == pdf_document_to_focus_on)
            {
                return;
            }


            // Find the selected document
            int selected_index = -1;
            int count          = 0;
            List <AugmentedBindable <PDFDocument> > pdf_documents_bindable = (List <AugmentedBindable <PDFDocument> >)ListPDFDocuments.DataContext;

            foreach (AugmentedBindable <PDFDocument> pdf_document_bindable in pdf_documents_bindable)
            {
                PDFDocument pdf_document = pdf_document_bindable.Underlying;

                if (pdf_document == pdf_document_to_focus_on)
                {
                    selected_index = count;
                }
                ++count;
            }

            try
            {
                if (-1 == selected_index)
                {
                    GUITools.ScrollToTop(ListPDFDocuments);
                }
                else if (0 == selected_index)
                {
                    ListPDFDocuments.SelectedIndex = selected_index;
                    GUITools.ScrollToTop(ListPDFDocuments);
                }
                else
                {
                    ListPDFDocuments.SelectedIndex = selected_index;
                    ListPDFDocuments.UpdateLayout();
                    ListPDFDocuments.ScrollIntoView(pdf_documents_bindable[selected_index]);
                }
            }
            catch (Exception) {}
        }
Exemplo n.º 20
0
        bool DrawHiearchyItem(EditorWindow window, Rect pos, int i, int j, bool expandable, HieararchyGUIElement element, float indent)
        {
            bool clicked = false;

            if (Event.current.type == EventType.MouseDown && (Event.current.button == 0 || Event.current.button == 1))
            {
                if (pos.Contains(Event.current.mousePosition))
                {
                    selections[0] = i;
                    selections[1] = j;

                    clicked = true;

                    GUI.FocusControl(null);
                    window.Repaint();

                    if (Event.current.button == 1)
                    {
                        element.createContextMenu(new Rect(Event.current.mousePosition, Vector2.zero));
                    }
                }
            }

            float foldoutWidth = 10;

            if (expandable)
            {
                itemsExpanded[i] = !EditorGUI.Foldout(new Rect(pos.x + indent, pos.y, foldoutWidth, pos.height), Expanded(i), GUITools.noContent);
            }

            float offset   = expandable ? foldoutWidth + indent : indent;
            Rect  nameRect = new Rect(pos.x + offset, pos.y, pos.width - offset, pos.height);

            bool isSelected = selections[0] == i && selections[1] == j;

            if (isSelected)
            {
                GUI.DrawTexture(pos, m_highlightTexture, ScaleMode.StretchToFill);
            }

            GUITools.Label(nameRect, element.name, isSelected ? GUITools.white : GUITools.black, GUITools.label);


            return(clicked);
        }
Exemplo n.º 21
0
    // Token: 0x06000D13 RID: 3347 RVA: 0x0005A4C4 File Offset: 0x000586C4
    private void DoPlayerModeration(Rect position)
    {
        int num = this._moderations.Count * 100;

        GUI.BeginGroup(position);
        GUI.Label(new Rect(0f, 0f, position.width, position.height), GUIContent.none, BlueStonez.box_grey50);
        this._moderationScroll = GUITools.BeginScrollView(new Rect(0f, 0f, position.width, position.height), this._moderationScroll, new Rect(0f, 1f, position.width - 20f, (float)num), false, false, true);
        int i    = 0;
        int num2 = 0;

        while (i < this._moderations.Count)
        {
            this._moderations[i].Draw(this._moderations[i], new Rect(10f, (float)(num2++ *100), 360f, 100f));
            i++;
        }
        GUITools.EndScrollView();
        GUI.EndGroup();
    }
Exemplo n.º 22
0
        public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
        {
            GUITools.Box(new Rect(pos.x, pos.y, pos.width, EditorGUIUtility.singleLineHeight * 4.1f), GUITools.shade);

            pos.height = EditorGUIUtility.singleLineHeight;

            EditorGUI.LabelField(pos, label, GUITools.boldLabel);
            pos.y += EditorGUIUtility.singleLineHeight;

            pos.x     += GUITools.iconButtonWidth * .5f;
            pos.width -= GUITools.iconButtonWidth * .5f;

            EditorGUI.PropertyField(pos, prop.FindPropertyRelative("particle"), true);
            pos.y += EditorGUIUtility.singleLineHeight;
            EditorGUI.PropertyField(pos, prop.FindPropertyRelative("size"), true);
            pos.y += EditorGUIUtility.singleLineHeight;
            EditorGUI.PropertyField(pos, prop.FindPropertyRelative("playbackSpeed"), true);
        }
Exemplo n.º 23
0
    // Token: 0x06000CDB RID: 3291 RVA: 0x00058350 File Offset: 0x00056550
    private void DrawRuleGroup()
    {
        GUI.skin = BlueStonez.Skin;
        int num = 550;

        this._scrollItems = GUITools.BeginScrollView(new Rect(1f, 2f, this._rect.width - 33f, this._rect.height - 54f - 50f), this._scrollItems, new Rect(0f, 0f, 560f, (float)num), false, false, true);
        Rect rect = new Rect(14f, 16f, 530f, (float)(num - 30));

        this.DrawGroupControl(rect, "In-game Rules", BlueStonez.label_group_interparkbold_18pt);
        GUI.BeginGroup(rect);
        float yOffset = 10f;

        yOffset = this.DrawGroupLabel(yOffset, "Introduction", "Before we let you loose into the wild world of UberStrike, we've written a few simple guidelines that are in place to make your gaming experience as fun and fair as possible. Having a good time in a multiplayer game is a team effort! So do your part to help our community enjoy themselves;)\n\nWe hope that you have a pleasant stay in Uberstrike!", false);
        yOffset = this.DrawGroupLabel(yOffset, "Chatting", "1: No swearing or inappropriate content. Every time an inappropriate word is typed, three puppies and a kitten get caught in a revolving door.\n2: No \"Caps lock\" (using it for emphasis is okay). Please only emphazise with discretion and tact.\n3: No spamming. This includes baloney, rubbish, prattle, balderdash, hogwash, fatuity, drivel, mumbo jumbo, and canned precooked meat products. \n4: Do not personally attack any person(s). If you happen to be a hata, don't be hatin,' becasue the mods gonna be moderatin.' \n5: No backseat moderating. Believe it or not, we didn't add the convenient little 'Report Button' just because it looks pretty up there in the corner of the screen, although it does go nicely with that cute little gear symbol.\n6: Do not discuss topics that involve race, color, creed, religion, sex, or politics. It's not like we play games to get extra exposure to the many issues we face constantly in our daily lives.", false);
        yOffset = this.DrawGroupLabel(yOffset, "General", "1: Alternate or \"Second\" Accounts in-game ARE allowed, although we all love you just the way you are.\n2: No account sharing! Your account is yours, and if another player is caught using it, all parties will get banned. Sharing definitely isn't caring round these parts.\n3: Exploiting of glitches will not be tolerated. Cheating of any kind will result in a permanent ban, which may or may not include eternal banishment to the land of angry ankle-biting woodchucks.\n4: Be respectful to the Administrators/Moderators/QAs. These people work hard for you, so please show them respect. If you do, you might even get a cookie!\n5: Advertising of any content unrelated to UberStrike is not permitted.\n6: Please do not try to cleverly circumvent the rules listed here. Although some of these rules are flexible, they are here for a reason, and will be enforced.\n7: Join a server in your area. You will not get banned for lagging, although you may get kicked from the current game.\n8: Above all, use common sense. Studies have shown it works 87% better than no sense at all!\n9: Have fun!", false);
        GUI.EndGroup();
        GUITools.EndScrollView();
    }
Exemplo n.º 24
0
    // Token: 0x06000C93 RID: 3219 RVA: 0x00054CA0 File Offset: 0x00052EA0
    private void DrawBuyButton(Rect rect)
    {
        GUI.BeginGroup(rect);
        Rect position = new Rect((rect.width - 120f) / 2f, (rect.height - 30f) / 2f, 120f, 30f);

        GUITools.PushGUIState();
        GUI.enabled = (!BuyPanelGUI._isBuyingItem && this._price.SelectedPriceOption != null);
        if (GUI.Button(position, GUIContent.none, BlueStonez.buttongold_large) && !BuyPanelGUI._isBuyingItem)
        {
            BuyPanelGUI._isBuyingItem = true;
            BuyPanelGUI.BuyItem(this._item, this._price.SelectedPriceOption, this._buyingLocation, this._buyingRecommendation, this._autoEquip);
        }
        GUITools.PopGUIState();
        Rect position2 = new Rect((rect.width - 120f) / 2f, (rect.height - 20f) / 2f, 120f, 20f);

        GUI.Label(position2, new GUIContent(this._priceTag, this._priceIcon), BlueStonez.label_interparkbold_13pt_black);
        GUI.EndGroup();
    }
Exemplo n.º 25
0
    private void OnGUI()
    {
        WavePoint.Position = EditorGUILayout.Vector3Field("Point Position", WavePoint.Position);

        WavePoint.Range = EditorGUILayout.Slider("Spawn Range", WavePoint.Range, 1, 10);

        WavePoint.WaveNumber = EditorGUILayout.IntField("Wave Number", WavePoint.WaveNumber);

        // STATIC WAVE ELEMENT
        ShowWaveElementSettings(WavePoint.StaticWaveElement);
        EditorGUILayout.Space();

        // RANDOM WAVE ELEMENT
        ShowWaveElementSettings(WavePoint.RandomWaveElement);
        EditorGUILayout.Space();

        GUITools.ActionButton("Close", Close, Color.red, Color.black);
    }
Exemplo n.º 26
0
    // Token: 0x06000D39 RID: 3385 RVA: 0x0005B980 File Offset: 0x00059B80
    private void DoAudioGroup()
    {
        float num   = 130f;
        float width = (this._rect.height - 55f - 46f >= num) ? (this._rect.width - 50f) : (this._rect.width - 65f);

        this._scrollControls = GUITools.BeginScrollView(new Rect(1f, 1f, this._rect.width - 33f, this._rect.height - 55f - 46f), this._scrollControls, new Rect(0f, 0f, this._rect.width - 50f, num), false, false, true);
        this.DrawGroupControl(new Rect(8f, 20f, width, 130f), LocalizedStrings.Volume, BlueStonez.label_group_interparkbold_18pt);
        GUI.BeginGroup(new Rect(8f, 20f, width, 130f));
        ApplicationDataManager.ApplicationOptions.AudioEnabled = !GUI.Toggle(new Rect(15f, 105f, 100f, 30f), !ApplicationDataManager.ApplicationOptions.AudioEnabled, LocalizedStrings.Mute, BlueStonez.toggle);
        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.EnableAudio(ApplicationDataManager.ApplicationOptions.AudioEnabled);
        }
        GUITools.PushGUIState();
        GUI.enabled = ApplicationDataManager.ApplicationOptions.AudioEnabled;
        GUI.Label(new Rect(15f, 10f, 110f, 30f), LocalizedStrings.MasterVolume, BlueStonez.label_interparkbold_11pt_left);
        ApplicationDataManager.ApplicationOptions.AudioMasterVolume = GUI.HorizontalSlider(new Rect(145f, 17f, 200f, 30f), Mathf.Clamp01(ApplicationDataManager.ApplicationOptions.AudioMasterVolume), 0f, 1f, BlueStonez.horizontalSlider, BlueStonez.horizontalSliderThumb);
        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.UpdateMasterVolume();
        }
        GUI.Label(new Rect(350f, 10f, 100f, 30f), (ApplicationDataManager.ApplicationOptions.AudioMasterVolume * 100f).ToString("f0") + " %", BlueStonez.label_interparkbold_11pt_left);
        GUI.Label(new Rect(15f, 40f, 110f, 30f), LocalizedStrings.MusicVolume, BlueStonez.label_interparkbold_11pt_left);
        ApplicationDataManager.ApplicationOptions.AudioMusicVolume = GUI.HorizontalSlider(new Rect(145f, 47f, 200f, 30f), Mathf.Clamp01(ApplicationDataManager.ApplicationOptions.AudioMusicVolume), 0f, 1f, BlueStonez.horizontalSlider, BlueStonez.horizontalSliderThumb);
        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.UpdateMusicVolume();
        }
        GUI.Label(new Rect(350f, 40f, 100f, 30f), (ApplicationDataManager.ApplicationOptions.AudioMusicVolume * 100f).ToString("f0") + " %", BlueStonez.label_interparkbold_11pt_left);
        GUI.Label(new Rect(15f, 70f, 110f, 30f), LocalizedStrings.EffectsVolume, BlueStonez.label_interparkbold_11pt_left);
        ApplicationDataManager.ApplicationOptions.AudioEffectsVolume = GUI.HorizontalSlider(new Rect(145f, 77f, 200f, 30f), Mathf.Clamp01(ApplicationDataManager.ApplicationOptions.AudioEffectsVolume), 0f, 1f, BlueStonez.horizontalSlider, BlueStonez.horizontalSliderThumb);
        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.UpdateEffectsVolume();
        }
        GUI.Label(new Rect(350f, 70f, 100f, 30f), (ApplicationDataManager.ApplicationOptions.AudioEffectsVolume * 100f).ToString("f0") + " %", BlueStonez.label_interparkbold_11pt_left);
        GUITools.PopGUIState();
        GUI.EndGroup();
        GUITools.EndScrollView();
    }
Exemplo n.º 27
0
 // Token: 0x06000D00 RID: 3328 RVA: 0x000597CC File Offset: 0x000579CC
 private void DrawLoginPanel()
 {
     GUI.BeginGroup(this._rect, GUIContent.none, BlueStonez.window);
     GUI.depth = 3;
     GUI.Label(new Rect(0f, 0f, this._rect.width, 23f), "Add an existing UberStrike Account to Steam", BlueStonez.tab_strip);
     GUI.Label(new Rect(0f, 48f, this._rect.width - 10f, 48f), "Your UberStrike account will be permanently associated with your Steam account", BlueStonez.label_interparkbold_11pt);
     GUI.Label(new Rect(20f, 108f, 100f, 24f), "Email:");
     this._emailAddress = GUI.TextField(new Rect(128f, 108f, this._rect.width - 164f, 24f), this._emailAddress, 100, BlueStonez.textField);
     if (string.IsNullOrEmpty(this._emailAddress))
     {
         GUI.color = Color.white.SetAlpha(0.3f);
         GUI.color = Color.white;
     }
     GUI.Label(new Rect(20f, 144f, 100f, 24f), "Password:"******"Cancel"), BlueStonez.buttondark_medium))
     {
         this.Hide();
         Singleton <AuthenticationManager> .Instance.LoginByChannel();
     }
     if (GUITools.Button(new Rect(210f, 190f, 100f, 52f), new GUIContent("Add"), BlueStonez.button_green))
     {
         this.HideKeyboard();
         this.Login(this._emailAddress, this._password);
     }
     GUI.Label(new Rect(8f, 256f, this._rect.width - 16f, 8f), GUIContent.none, BlueStonez.horizontal_line_grey95);
     if (GUITools.Button(new Rect(20f, 264f, 100f, 40f), new GUIContent("Forgot password?"), BlueStonez.label_interparkbold_11pt_url))
     {
         this.HideKeyboard();
         ApplicationDataManager.OpenUrl(string.Empty, "http://www.uberstrike.com/#forgot_password");
     }
     if (GUITools.Button(new Rect(this._rect.width - 118f, 264f, 98f, 40f), new GUIContent("Facebook player?"), BlueStonez.label_interparkbold_11pt_url))
     {
         this.HideKeyboard();
         ApplicationDataManager.OpenUrl(string.Empty, "http://www.uberstrike.com/steam");
     }
     GUI.enabled = true;
     GUI.EndGroup();
 }
Exemplo n.º 28
0
    /// <summary>
    /// 模型信息
    /// </summary>
    private void TransformBox()
    {
        EditorGUILayout.BeginHorizontal();
        //左
        EditorGUILayout.BeginVertical(GUILayout.Width(position.width * 0.6f), GUILayout.Height(250));
        {
            GUILayout.Space(5);
            GUILayout.Label("属性编辑", title3LabelStyle);
            GUILayout.Space(10);
            string str = "模型名称:";
            if (currentModel)
            {
                str += currentModel.name;
            }
            GUITools.Label(str, 30, 30);
            GUILayout.Space(10);
            if (currentModel)
            {
                modelPosition = currentModel.transform.position;
                modelRotation = currentModel.transform.eulerAngles;
                modelScale    = currentModel.transform.localScale;
            }
            modelPosition = GUITools.Vector3Field("位置", 30, 30, modelPosition, GUILayout.Height(20));
            modelRotation = GUITools.Vector3Field("旋转", 30, 30, modelRotation, GUILayout.Height(20));
            modelScale    = GUITools.Vector3Field("缩放", 30, 30, modelScale, GUILayout.Height(10));

            if (currentModel)
            {
                currentModel.transform.position    = modelPosition;
                currentModel.transform.eulerAngles = modelRotation;
                currentModel.transform.localScale  = modelScale;
                Repaint();
            }
            GUILayout.Space(5);
        }
        EditorGUILayout.EndVertical();
        //右
        EditorGUILayout.BeginVertical(GUILayout.Width(position.width * 0.4f - 25), GUILayout.Height(250));
        {
            ModelManagerWindowT1.Instance.OnGUI();
        }
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();
    }
Exemplo n.º 29
0
    void OnGUI()
    {
        #region 单例 格式 标题
        GetEditorController();
        InitGUIStyle();
        CheckScenePath();
        if (!gm)
        {
            return;
        }


        float h = 1200;
        float w = position.width;
        if (position.height < h)
        {
            w -= 15;
        }
        scrollPos = GUI.BeginScrollView(new Rect(0, 0, position.width, position.height), scrollPos,
                                        new Rect(0, 0, w, h));
        GUILayout.BeginArea(new Rect(5, 5, w - 10, h));
        GUILayout.Label("位置识别展示编辑器", subtitleLabelStyle);
        #endregion

        #region 开始
        isShowStartPart = GUITools.DrawBox(isShowStartPart, "开始", partTitleStyle, StartBox);
        #endregion

        #region 总体介绍
        isShowIntroducePart = GUITools.DrawBox(isShowIntroducePart, "总体介绍", partTitleStyle, IntroduceBox);
        #endregion

        #region 模型管理
        isShowTransformPart = GUITools.DrawBox(isShowTransformPart, "模型管理", partTitleStyle, TransformBox);
        #endregion

        #region 部件管理
        isShowUnitPart = GUITools.DrawBox(isShowUnitPart, "部件管理", partTitleStyle, UnitBox);
        #endregion

        GUILayout.EndArea();
        GUI.EndScrollView();
    }
Exemplo n.º 30
0
        private object GetDocumentDragData()
        {
            LibraryCatalogControl lcc = GUITools.GetParentControl <LibraryCatalogControl>(this);

            if (null != lcc)
            {
                List <PDFDocument> selected_pdf_documents = lcc.SelectedPDFDocuments;
                if (!selected_pdf_documents.Contains(PDFDocumentBindable.Underlying))
                {
                    selected_pdf_documents.Add(PDFDocumentBindable.Underlying);
                }

                return(selected_pdf_documents);
            }
            else
            {
                return(new List <PDFDocument>());
            }
        }