示例#1
0
        static void DrawLocationSelect(Rect pos, SerializedProperty prop, string scene)
        {
            EditorGUI.LabelField(new Rect(pos.x, pos.y, EditorGUIUtility.labelWidth, pos.height), new GUIContent(prop.displayName));

            if (GUITools.Button(pos.x + EditorGUIUtility.labelWidth, pos.y, pos.width - (EditorGUIUtility.labelWidth + GUITools.iconButtonWidth), pos.height, new GUIContent(!string.IsNullOrEmpty(prop.stringValue) ? prop.stringValue : "[ Null ]"), GUITools.popup))
            {
                GenericMenu   menu = new GenericMenu();
                string        msg;
                List <string> locationNames = BuildLocationNames(scene, out msg);

                if (locationNames == null)
                {
                    menu.AddItem(new GUIContent(msg), false, () => { });
                }
                else
                {
                    for (int i = 0; i < locationNames.Count; i++)
                    {
                        string e = locationNames[i];
                        menu.AddItem(new GUIContent(e), e == prop.stringValue,
                                     () => {
                            prop.stringValue = e;
                            prop.serializedObject.ApplyModifiedProperties();
                        }
                                     );
                    }
                }
                menu.ShowAsContext();
            }
        }
示例#2
0
        static void DrawKeySelect(Rect pos, SerializedProperty prop)
        {
            if (prop.stringValue.EndsWith("@"))
            {
                return;
            }



            EditorGUI.LabelField(new Rect(pos.x, pos.y, EditorGUIUtility.labelWidth, pos.height), new GUIContent(prop.displayName));
            if (GUITools.Button(pos.x + EditorGUIUtility.labelWidth, pos.y, pos.width - (EditorGUIUtility.labelWidth + GUITools.iconButtonWidth), pos.height, new GUIContent(!string.IsNullOrEmpty(prop.stringValue) ? prop.stringValue : "[ Null ]"), GUITools.popup))
            {
                List <string> allKeys = LocationAliases.GetAliasList();
                if (!allKeys.Contains(prop.stringValue))
                {
                    prop.stringValue = string.Empty;
                }

                GenericMenu menu = new GenericMenu();

                for (int i = 0; i < allKeys.Count; i++)
                {
                    string e = allKeys[i];
                    menu.AddItem(new GUIContent(e), e == prop.stringValue,
                                 () => {
                        prop.stringValue = e;
                        prop.serializedObject.ApplyModifiedProperties();
                    }
                                 );
                }
                menu.ShowAsContext();
            }
        }
    // Token: 0x06000B60 RID: 2912 RVA: 0x0004924C File Offset: 0x0004744C
    private void DrawOutgoingClanInvitation(GroupInvitationView view, int y, int width)
    {
        Rect position = new Rect(4f, (float)(y + 4), (float)(width - 1), 50f);

        GUI.BeginGroup(position);
        Rect position2 = new Rect(0f, 0f, position.width, position.height - 1f);

        if (GUI.enabled && position2.Contains(Event.current.mousePosition))
        {
            GUI.Box(position2, GUIContent.none, BlueStonez.box_grey50);
        }
        GUI.Label(new Rect(80f, 5f, position.width - 250f, 20f), string.Format("You invited: {0}", view.InviteeName), BlueStonez.label_interparkbold_13pt_left);
        GUI.Label(new Rect(80f, 30f, position.width - 250f, 20f), "> " + view.Message, BlueStonez.label_interparkmed_11pt_left);
        if (GUITools.Button(new Rect(position.width - 140f, 5f, 120f, 20f), new GUIContent(LocalizedStrings.CancelInvite), BlueStonez.buttondark_medium))
        {
            int groupInvitationId = view.GroupInvitationId;
            if (Singleton <InboxManager> .Instance._outgoingClanRequests.Remove(view))
            {
                ClanWebServiceClient.CancelInvitation(groupInvitationId, PlayerDataManager.AuthToken, null, delegate(Exception ex)
                {
                });
            }
        }
        GUI.EndGroup();
        GUI.Label(new Rect(4f, (float)(y + 50 + 8), (float)width, 1f), GUIContent.none, BlueStonez.horizontal_line_grey95);
    }
    // Token: 0x06000B57 RID: 2903 RVA: 0x00048084 File Offset: 0x00046284
    private void DoToolbarMessage(Rect rect)
    {
        GUI.BeginGroup(rect);
        GUI.Label(new Rect(8f, 8f, 206f, 24f), string.Format(LocalizedStrings.YouHaveNNewMessages, Singleton <InboxManager> .Instance.UnreadMessageCount), BlueStonez.label_interparkbold_16pt_left);
        if (this._selectedTab == 0)
        {
            Rect position = new Rect(rect.width - 368f, 8f, 140f, 24f);
            GUI.SetNextControlName("SearchMessage");
            this._searchMessage = GUI.TextField(position, this._searchMessage, BlueStonez.textField);
            if (string.IsNullOrEmpty(this._searchMessage) && GUI.GetNameOfFocusedControl() != "SearchMessage")
            {
                GUI.color = new Color(1f, 1f, 1f, 0.3f);
                GUI.Label(position, " " + LocalizedStrings.SearchMessages, BlueStonez.label_interparkbold_11pt_left);
                GUI.color = Color.white;
            }
        }
        if (GUITools.Button(new Rect(rect.width - 224f, 8f, 106f, 24f), new GUIContent(LocalizedStrings.NewMessage), BlueStonez.buttondark_medium))
        {
            PanelManager.Instance.OpenPanel(PanelType.SendMessage);
        }
        float num = Mathf.Max(Singleton <InboxManager> .Instance.NextInboxRefresh - Time.time, 0f);

        GUITools.PushGUIState();
        GUI.enabled &= (num == 0f);
        if (GUITools.Button(new Rect(rect.width - 114f, 8f, 106f, 24f), new GUIContent(string.Format(LocalizedStrings.CheckMail + " {0}", (num <= 0f) ? string.Empty : ("(" + num.ToString("N0") + ")"))), BlueStonez.buttondark_medium))
        {
            Singleton <InboxManager> .Instance.LoadNextPageThreads();
        }
        GUITools.PopGUIState();
        GUI.EndGroup();
    }
    // Token: 0x06000962 RID: 2402 RVA: 0x0003B254 File Offset: 0x00039454
    private void DoMenuBar(Rect rect)
    {
        GUI.enabled = !Singleton <SceneLoader> .Instance.IsLoading;
        if (MenuPageManager.Instance == null)
        {
            if (GUI.Button(new Rect(rect.x + 9f, rect.y + 6f, 100f, 32f), "Back", BlueStonez.button_white))
            {
                Singleton <GameStateController> .Instance.LeaveGame(true);
            }
        }
        else if (!MenuPageManager.Instance.IsCurrentPage(PageType.Home) && GUITools.Button(new Rect(rect.x + 9f, rect.y + 6f, 100f, 32f), new GUIContent("Back"), BlueStonez.button_white))
        {
            if (MenuPageManager.Instance.IsCurrentPage(PageType.Play) && Singleton <GameServerController> .Instance.SelectedServer != null)
            {
                PlayPageGUI.Instance.ShowServerSelection();
            }
            else if (MenuPageManager.Instance.IsCurrentPage(PageType.Training))
            {
                MenuPageManager.Instance.LoadPage(PageType.Play, false);
            }
            else
            {
                Singleton <GameStateController> .Instance.Client.Disconnect();

                MenuPageManager.Instance.LoadPage(PageType.Home, false);
            }
        }
        int num = 0;

        if (ApplicationDataManager.IsMobile)
        {
            num = 44;
        }
        if (!GameState.Current.HasJoinedGame || GamePageManager.HasPage)
        {
            Rect       position = new Rect(rect.width - 420f + (float)num, 12f, 100f, 20f);
            GUIContent content  = new GUIContent(this.PointsValue.ToString("N0"), ShopIcons.IconPoints20x20);
            GUI.color = new Color(1f, 1f, 1f, this.PointsAlpha);
            GUI.Label(position, content, BlueStonez.label_interparkbold_13pt);
            Rect       position2 = new Rect(rect.width - 310f + (float)num, 12f, 100f, 20f);
            GUIContent content2  = new GUIContent(this.CreditsValue.ToString("N0"), ShopIcons.IconCredits20x20);
            GUI.color = new Color(1f, 1f, 1f, this.CreditsAlpha);
            GUI.Label(position2, content2, BlueStonez.label_interparkbold_13pt);
            GUI.color = Color.white;
            if (GUITools.Button(new Rect(rect.width - 200f + (float)num, rect.y + 9f, 100f, 26f), new GUIContent("Get Credits", LocalizedStrings.ClickHereBuyCreditsMsg), BlueStonez.buttongold_medium))
            {
                ApplicationDataManager.OpenBuyCredits();
            }
        }
        if (!ApplicationDataManager.IsMobile)
        {
            GUIContent content3 = (!Screen.fullScreen) ? new GUIContent(string.Empty, GlobalUiIcons.QuadpanelButtonFullscreen, "Enter Fullscreen mode.") : new GUIContent(string.Empty, GlobalUiIcons.QuadpanelButtonNormalize, "Return to windowed mode.");
            if (GUI.Button(new Rect((float)(Screen.width - 88), this._yOffset, 44f, 44f), content3, BlueStonez.buttondark_medium))
            {
                ScreenResolutionManager.IsFullScreen = !Screen.fullScreen;
            }
        }
        this._optionsDropdown.SetRect(new Rect((float)(Screen.width - 44), this._yOffset, 44f, 44f));
        this._optionsDropdown.Draw();
    }
示例#6
0
        void OnGUI()
        {
            GUITools.Space(3);

            if (refreshWindowGUI == null || string.IsNullOrEmpty(refreshWindowGUI.text))
            {
                refreshWindowGUI = new GUIContent("Refresh Modules Window");
            }

            if (GUITools.Button(refreshWindowGUI, GUITools.green, GUITools.button, GUITools.black))
            {
                Initialization();
            }

            GUITools.Space(2);

            chosenTab = GUILayout.Toolbar(chosenTab, new string[] { "Import", "Export" });

            GUITools.Space(2);

            if (chosenTab == 0)
            {
                if (importModules.OnGUI(exportModules.projectSpecifierModule))
                {
                    Initialization();
                }
            }
            else
            {
                if (exportModules.OnGUI())
                {
                    Initialization();
                }
            }
        }
示例#7
0
 static public void OnGUI()
 {
     if (GUITools.Button(new GUIContent((drawing ? "Exit " : "") + "Draw Mode"), drawing ? GUITools.red : GUITools.white, GUITools.button, GUITools.black))
     {
         drawing = !drawing;
     }
 }
    // Token: 0x06000ACD RID: 2765 RVA: 0x00044FC8 File Offset: 0x000431C8
    private void DrawClanRosterHeader(Rect rect)
    {
        int num = (int)rect.width;

        GUI.BeginGroup(rect, BlueStonez.box_grey31);
        GUI.Label(new Rect(10f, 5f, rect.width - 20f, 18f), string.Format("{0}: {1}", LocalizedStrings.YourClan, PlayerDataManager.ClanName), BlueStonez.label_interparkbold_16pt_left);
        float num2 = Mathf.Max(Singleton <ClanDataManager> .Instance.NextClanRefresh - Time.time, 0f);

        GUITools.PushGUIState();
        GUI.enabled &= (num2 == 0f);
        if (GUITools.Button(new Rect(rect.width - 130f, 5f, 120f, 19f), new GUIContent(string.Format(LocalizedStrings.Refresh + " {0}", (num2 <= 0f) ? string.Empty : ("(" + num2.ToString("N0") + ")"))), BlueStonez.buttondark_medium))
        {
            Singleton <ClanDataManager> .Instance.RefreshClanData(false);
        }
        GUITools.PopGUIState();
        GUI.Label(new Rect(rect.width - 340f, 5f, 200f, 18f), string.Format(LocalizedStrings.NMembersNOnline, Singleton <PlayerDataManager> .Instance.ClanMembersCount, PlayerDataManager.ClanMembersLimit, this._onlineMemberCount), BlueStonez.label_interparkmed_11pt_right);
        GUI.BeginGroup(new Rect(0f, 25f, rect.width, 50f), BlueStonez.box_grey50);
        GUI.Label(new Rect(10f, 7f, rect.width / 2f, 16f), string.Format("Tag: {0}", PlayerDataManager.ClanTag), BlueStonez.label_interparkmed_11pt_left);
        GUI.Label(new Rect(10f, 28f, rect.width / 2f, 16f), string.Format(LocalizedStrings.MottoN, PlayerDataManager.ClanMotto), BlueStonez.label_interparkmed_11pt_left);
        GUI.Label(new Rect(rect.width / 2f, 7f, rect.width / 2f, 16f), string.Format(LocalizedStrings.CreatedN, PlayerDataManager.ClanFoundingDate.ToShortDateString()), BlueStonez.label_interparkmed_11pt_left);
        GUI.Label(new Rect(rect.width / 2f, 28f, rect.width / 2f, 16f), string.Format(LocalizedStrings.LeaderN, PlayerDataManager.ClanOwnerName), BlueStonez.label_interparkmed_11pt_left);
        GUI.EndGroup();
        if (Singleton <PlayerDataManager> .Instance.RankInClan != GroupPosition.Member)
        {
            num = (int)(rect.width - 10f - 120f);
            if (GUITools.Button(new Rect((float)num, 40f, 120f, 20f), new GUIContent(LocalizedStrings.InvitePlayer), BlueStonez.buttondark_medium))
            {
                PanelManager.Instance.OpenPanel(PanelType.ClanRequest);
            }
        }
        GUI.EndGroup();
    }
 // Token: 0x06000E08 RID: 3592 RVA: 0x0000A480 File Offset: 0x00008680
 protected void DrawUseButton(Rect position)
 {
     if (GUITools.Button(position, new GUIContent("Use"), BlueStonez.buttondark_medium))
     {
         PanelManager.Instance.OpenPanel(PanelType.NameChange);
     }
 }
    // Token: 0x06000C33 RID: 3123 RVA: 0x00051D8C File Offset: 0x0004FF8C
    private void DoDropDownList(Rect position)
    {
        Rect rect      = new Rect(position.x, position.y, position.width - position.height, position.height);
        Rect position2 = new Rect(position.x + position.width - position.height - 2f, position.y - 1f, position.height, position.height);

        if (GUI.Button(position2, GUIContent.none, BlueStonez.dropdown_button))
        {
            this._isFilterDropDownOpen = !this._isFilterDropDownOpen;
        }
        if (this._isFilterDropDownOpen)
        {
            Rect position3 = new Rect(position.x, position.y + position.height, position.width - position.height, (float)(this._selectionsToShow.Length * 20 + 1));
            GUI.Box(position3, string.Empty, BlueStonez.window_standard_grey38);
            this._filterScroll = GUITools.BeginScrollView(position3, this._filterScroll, new Rect(0f, 0f, position3.width - 20f, (float)(this._selectionsToShow.Length * 20)), false, false, true);
            for (int i = 0; i < this._selectionsToShow.Length; i++)
            {
                GUI.Label(new Rect(4f, (float)(i * 20), position3.width, 20f), this._selectionsToShow[i], BlueStonez.label_interparkbold_11pt_left);
                if (GUI.Button(new Rect(2f, (float)(i * 20), position3.width, 20f), string.Empty, BlueStonez.dropdown_list))
                {
                    this._isFilterDropDownOpen = false;
                    this._selectedFilterIndex  = i;
                    this.UpdateWeaponStatList();
                }
            }
            GUITools.EndScrollView();
        }
        else if (GUITools.Button(rect, new GUIContent(this._selectionsToShow[this._selectedFilterIndex]), BlueStonez.label_dropdown))
        {
            this._isFilterDropDownOpen = !this._isFilterDropDownOpen;
        }
    }
示例#11
0
 // Token: 0x06000D10 RID: 3344 RVA: 0x00059D8C File Offset: 0x00057F8C
 private void DrawModerationPanel()
 {
     GUI.skin  = BlueStonez.Skin;
     GUI.depth = 3;
     GUI.Label(new Rect(0f, 0f, this._rect.width, 56f), "MODERATION DASHBOARD", BlueStonez.tab_strip);
     this.DoModerationDashboard(new Rect(10f, 55f, this._rect.width - 20f, this._rect.height - 55f - 52f));
     GUI.enabled = (this._nextUpdate < Time.time);
     if (!GameState.Current.IsMultiplayer && GUITools.Button(new Rect(10f, this._rect.height - 10f - 32f, 150f, 32f), new GUIContent((this._nextUpdate >= Time.time) ? string.Format("Next Update ({0:N0})", this._nextUpdate - Time.time) : "GET ALL PLAYERS"), BlueStonez.buttondark_medium))
     {
         ChatPageGUI.IsCompleteLobbyLoaded = true;
         this._selectedCommUser            = null;
         this._filterText = string.Empty;
         this._nextUpdate = Time.time + 10f;
         AutoMonoBehaviour <CommConnectionManager> .Instance.Client.Lobby.Operations.SendUpdateAllActors();
     }
     GUI.enabled = (this._selectedCommUser != null && this._moderationSelection != ModerationPanelGUI.Actions.NONE);
     if (GUITools.Button(new Rect(this._rect.width - 120f - 140f, this._rect.height - 10f - 32f, 140f, 32f), new GUIContent("APPLY ACTION!"), (!GUI.enabled) ? BlueStonez.button : BlueStonez.button_red))
     {
         this.ApplyModeration();
     }
     GUI.enabled = true;
     if (GUITools.Button(new Rect(this._rect.width - 10f - 100f, this._rect.height - 10f - 32f, 100f, 32f), new GUIContent("CLOSE"), BlueStonez.button))
     {
         PanelManager.Instance.ClosePanel(PanelType.Moderation);
     }
 }
示例#12
0
 // Token: 0x06000CA3 RID: 3235 RVA: 0x0005572C File Offset: 0x0005392C
 private void DrawCheckAvailabilityButton(Rect position)
 {
     GUI.enabled = (!string.IsNullOrEmpty(this._characterName) && !this._checkButtonClicked && !this._waitingForWsReturn);
     if (GUITools.Button(new Rect(225f, 60f, 110f, 24f), new GUIContent("Check Availability"), BlueStonez.buttondark_small))
     {
         this.HideKeyboard();
         this._availableNames.Clear();
         this._checkButtonClicked = true;
         this._targetHeight       = 260f;
         if (!ValidationUtilities.IsValidMemberName(this._characterName, ApplicationDataManager.CurrentLocale.ToString()))
         {
             this._feedbackMessageColor = Color.red;
             this._errorMessage         = "'" + this._characterName + "' is not a valid name!";
         }
         else
         {
             this._waitingForWsReturn = true;
             UserWebServiceClient.IsDuplicateMemberName(this._characterName, new Action <bool>(this.IsDuplicatedNameCallback), delegate(Exception ex)
             {
                 this._waitingForWsReturn   = false;
                 this._feedbackMessageColor = Color.red;
                 this._errorMessage         = "Our server had an error, please try again.";
             });
         }
     }
     GUI.enabled = true;
 }
示例#13
0
    // Token: 0x06000922 RID: 2338 RVA: 0x0003A28C File Offset: 0x0003848C
    public void Draw(Rect rect)
    {
        int num = 20;

        if (ApplicationDataManager.IsMobile)
        {
            num = 30;
        }
        if (!TabScreenPanelGUI.Enabled)
        {
            GUI.SetNextControlName(this._guiName);
            this.FilterText = GUI.TextField(new Rect(rect.x, rect.y, (!this.IsSearching) ? rect.width : (rect.width - (float)num - 2f), rect.height), this.FilterText, BlueStonez.textField);
        }
        if (string.IsNullOrEmpty(this.FilterText) && GUI.GetNameOfFocusedControl() != this._guiName)
        {
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Label(rect, " " + LocalizedStrings.Search, BlueStonez.label_interparkbold_11pt_left);
            GUI.color = Color.white;
        }
        if (this.IsSearching && GUITools.Button(new Rect(rect.x + rect.width - (float)num, 8f, (float)num, (float)num), new GUIContent("x"), BlueStonez.buttondark_medium))
        {
            this.ClearFilter();
            GUIUtility.hotControl = 1;
        }
    }
    // Token: 0x06000B55 RID: 2901 RVA: 0x00047D98 File Offset: 0x00045F98
    private void DrawInbox(Rect rect)
    {
        this.DoTitle(new Rect(1f, 0f, rect.width - 2f, 72f));
        int selectedTab = this._selectedTab;

        if (selectedTab != 0)
        {
            if (selectedTab == 1)
            {
                float num = Mathf.Max(Singleton <InboxManager> .Instance.NextRequestRefresh - Time.time, 0f);
                GUITools.PushGUIState();
                GUI.enabled &= (num == 0f);
                if (GUITools.Button(new Rect(rect.width - 131f, 80f, 123f, 24f), new GUIContent(string.Format(LocalizedStrings.Refresh + " {0}", (num <= 0f) ? string.Empty : ("(" + num.ToString("N0") + ")"))), BlueStonez.buttondark_medium))
                {
                    Singleton <InboxManager> .Instance.RefreshAllRequests();
                }
                GUITools.PopGUIState();
                this.DoRequests(new Rect(0f, 112f, rect.width, rect.height - 112f));
            }
        }
        else
        {
            this.DoToolbarMessage(new Rect(1f, 72f, rect.width - 2f, 40f));
            this.DoThreads(new Rect(1f, 112f, (float)this._threadWidth, rect.height - 112f));
            this.DoMessages(new Rect((float)this._threadWidth, 110f, rect.width - (float)this._threadWidth, rect.height - 112f));
        }
    }
    // Token: 0x06000B5F RID: 2911 RVA: 0x00049038 File Offset: 0x00047238
    private void DrawIncomingClanInvitation(GroupInvitationView view, int y, int width)
    {
        Rect position = new Rect(4f, (float)(y + 4), (float)(width - 1), 50f);

        GUI.BeginGroup(position);
        Rect position2 = new Rect(0f, 0f, position.width, position.height - 1f);

        if (GUI.enabled && position2.Contains(Event.current.mousePosition))
        {
            GUI.Box(position2, GUIContent.none, BlueStonez.box_grey50);
        }
        GUI.Label(new Rect(80f, 5f, position.width - 250f, 20f), string.Format("{0}: {1}", LocalizedStrings.ClanInvite, view.GroupName), BlueStonez.label_interparkbold_13pt_left);
        GUI.Label(new Rect(80f, 30f, position.width - 250f, 20f), "> " + view.Message, BlueStonez.label_interparkmed_11pt_left);
        if (GUITools.Button(new Rect(position.width - 120f - 18f, 5f, 60f, 20f), new GUIContent(LocalizedStrings.Accept), BlueStonez.buttondark_medium))
        {
            if (PlayerDataManager.IsPlayerInClan)
            {
                PopupSystem.ShowMessage(LocalizedStrings.Error, LocalizedStrings.YouAlreadyInClanMsg, PopupSystem.AlertType.OK);
            }
            else
            {
                int requestId = view.GroupInvitationId;
                PopupSystem.ShowMessage(LocalizedStrings.Accept, "Do you want to accept this clan invitation?", PopupSystem.AlertType.OKCancel, delegate()
                {
                    Singleton <InboxManager> .Instance.AcceptClanRequest(requestId);
                }, "Join", null, LocalizedStrings.Cancel, PopupSystem.ActionType.Positive);
            }
        }
        if (GUITools.Button(new Rect(position.width - 50f - 18f, 5f, 60f, 20f), new GUIContent(LocalizedStrings.Ignore), BlueStonez.buttondark_medium))
        {
            Singleton <InboxManager> .Instance.DeclineClanRequest(view.GroupInvitationId);
        }
        GUI.EndGroup();
        GUI.Label(new Rect(4f, (float)(y + 50 + 8), (float)width, 1f), GUIContent.none, BlueStonez.horizontal_line_grey95);
    }
    // Token: 0x06000AD4 RID: 2772 RVA: 0x00045CB8 File Offset: 0x00043EB8
    private void DrawNoClanMessage(Rect rect)
    {
        Rect position = new Rect((rect.width - 480f) / 2f, (rect.height - 240f) / 2f, 480f, 240f);

        GUI.BeginGroup(position, BlueStonez.window_standard_grey38);
        GUI.Label(new Rect(0f, 0f, position.width, 56f), LocalizedStrings.ClansCaps, BlueStonez.tab_strip);
        GUI.Box(new Rect(position.width / 2f - 82f, 60f, 48f, 48f), new GUIContent(this._level4Icon), BlueStonez.item_slot_large);
        if (Singleton <ClanDataManager> .Instance.HaveLevel)
        {
            GUI.Box(new Rect(position.width / 2f - 82f, 60f, 48f, 48f), new GUIContent(UberstrikeIcons.LevelMastered));
        }
        GUI.Box(new Rect(position.width / 2f - 24f, 60f, 48f, 48f), new GUIContent(this._licenseIcon), BlueStonez.item_slot_large);
        if (Singleton <ClanDataManager> .Instance.HaveLicense)
        {
            GUI.Box(new Rect(position.width / 2f - 24f, 60f, 48f, 48f), new GUIContent(UberstrikeIcons.LevelMastered));
        }
        GUI.Box(new Rect(position.width / 2f + 34f, 60f, 48f, 48f), new GUIContent(this._friendsIcon), BlueStonez.item_slot_large);
        if (Singleton <ClanDataManager> .Instance.HaveFriends)
        {
            GUI.Box(new Rect(position.width / 2f + 34f, 60f, 48f, 48f), new GUIContent(UberstrikeIcons.LevelMastered));
        }
        if (!Singleton <ClanDataManager> .Instance.HaveLevel || !Singleton <ClanDataManager> .Instance.HaveLicense || !Singleton <ClanDataManager> .Instance.HaveFriends)
        {
            bool enabled = GUI.enabled;
            GUI.Label(new Rect(position.width / 2f - 90f, 110f, 210f, 14f), LocalizedStrings.ToCreateAClanYouStillNeedTo, BlueStonez.label_interparkbold_11pt_left);
            GUI.enabled = (enabled && !Singleton <ClanDataManager> .Instance.HaveLevel);
            GUI.Label(new Rect(position.width / 2f - 90f, 124f, 200f, 14f), LocalizedStrings.ReachLevelFour + ((!Singleton <ClanDataManager> .Instance.HaveLevel) ? string.Empty : string.Format(" ({0})", LocalizedStrings.Done)), BlueStonez.label_interparkbold_11pt_left);
            GUI.enabled = (enabled && !Singleton <ClanDataManager> .Instance.HaveFriends);
            GUI.Label(new Rect(position.width / 2f - 90f, 138f, 200f, 14f), LocalizedStrings.HaveAtLeastOneFriend + ((!Singleton <ClanDataManager> .Instance.HaveFriends) ? string.Empty : string.Format(" ({0})", LocalizedStrings.Done)), BlueStonez.label_interparkbold_11pt_left);
            GUI.enabled = (enabled && !Singleton <ClanDataManager> .Instance.HaveLicense);
            GUI.Label(new Rect(position.width / 2f - 90f, 152f, 240f, 14f), LocalizedStrings.BuyAClanLicense + ((!Singleton <ClanDataManager> .Instance.HaveLicense) ? string.Empty : string.Format(" ({0})", LocalizedStrings.Done)), BlueStonez.label_interparkbold_11pt_left);
            GUI.enabled = enabled;
            if (!Singleton <ClanDataManager> .Instance.HaveLicense && GUITools.Button(new Rect((position.width - 200f) / 2f, 170f, 200f, 22f), new GUIContent(LocalizedStrings.BuyAClanLicense), BlueStonez.buttondark_medium))
            {
                IUnityItem itemInShop = Singleton <ItemManager> .Instance.GetItemInShop(1234);

                if (itemInShop != null && itemInShop.View != null)
                {
                    BuyPanelGUI buyPanelGUI = PanelManager.Instance.OpenPanel(PanelType.BuyItem) as BuyPanelGUI;
                    if (buyPanelGUI)
                    {
                        buyPanelGUI.SetItem(itemInShop, BuyingLocationType.Shop, BuyingRecommendationType.None, false);
                    }
                }
            }
        }
        else
        {
            GUI.Label(new Rect(0f, 140f, position.width, 14f), LocalizedStrings.CreateAClanAndInviteYourFriends, BlueStonez.label_interparkbold_11pt);
        }
        GUITools.PushGUIState();
        GUI.enabled &= (Singleton <ClanDataManager> .Instance.HaveLevel && Singleton <ClanDataManager> .Instance.HaveLicense && Singleton <ClanDataManager> .Instance.HaveFriends);
        if (GUITools.Button(new Rect((position.width - 200f) / 2f, 200f, 200f, 30f), new GUIContent(LocalizedStrings.CreateAClanCaps), BlueStonez.button_green))
        {
            this.createAClan = true;
        }
        GUITools.PopGUIState();
        GUI.EndGroup();
    }
    // Token: 0x06000D5B RID: 3419 RVA: 0x0005D148 File Offset: 0x0005B348
    private void DoCompose(Rect rect)
    {
        Rect position = new Rect(rect.x + (rect.width - 480f) / 2f, rect.y + (rect.height - 300f) / 2f, 480f, 290f);

        GUI.BeginGroup(position, BlueStonez.window);
        int num  = 35;
        int num2 = 120;
        int num3 = 320;
        int num4 = 70;
        int num5 = 100;

        GUI.Label(new Rect(0f, 0f, position.width, 0f), LocalizedStrings.NewMessage, BlueStonez.tab_strip);
        GUI.Box(new Rect(12f, 55f, position.width - 24f, position.height - 101f), GUIContent.none, BlueStonez.window_standard_grey38);
        GUI.Label(new Rect((float)num, (float)num4, 75f, 20f), LocalizedStrings.To, BlueStonez.label_interparkbold_18pt_right);
        GUI.Label(new Rect((float)num, (float)num5, 75f, 20f), LocalizedStrings.Message, BlueStonez.label_interparkbold_18pt_right);
        bool enabled = GUI.enabled;

        GUI.enabled = (enabled && !this._useFixedReceiver);
        GUI.SetNextControlName("Message Receiver");
        this._msgReceiver = GUI.TextField(new Rect((float)num2, (float)num4, (float)num3, 24f), this._msgReceiver, BlueStonez.textField);
        if (string.IsNullOrEmpty(this._msgReceiver) && !GUI.GetNameOfFocusedControl().Equals("Message Receiver"))
        {
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Label(new Rect((float)num2, (float)num4, (float)num3, 24f), " " + LocalizedStrings.StartTypingTheNameOfAFriend, BlueStonez.label_interparkbold_11pt_left);
            GUI.color = Color.white;
        }
        GUI.enabled = (enabled && !this._showReceiverDropdownList);
        GUI.SetNextControlName("Message Content");
        this._msgContent = GUI.TextArea(new Rect((float)num2, (float)num5, (float)num3, 108f), this._msgContent, 140, BlueStonez.textArea);
        GUI.color        = new Color(1f, 1f, 1f, 0.5f);
        GUI.Label(new Rect((float)num2, (float)(num5 + 110), (float)num3, 24f), (140 - this._msgContent.Length).ToString(), BlueStonez.label_interparkbold_11pt_right);
        GUI.color   = Color.white;
        GUI.enabled = (enabled && !this._showReceiverDropdownList && this._msgRcvCmid != 0 && !string.IsNullOrEmpty(this._msgContent));
        if (GUITools.Button(new Rect(position.width - 95f - 100f, position.height - 44f, 90f, 32f), new GUIContent(LocalizedStrings.SendCaps), BlueStonez.button_green))
        {
            Singleton <InboxManager> .Instance.SendPrivateMessage(this._msgRcvCmid, this._msgReceiver, this._msgContent);

            this._msgContent  = string.Empty;
            this._msgReceiver = string.Empty;
            this._msgRcvCmid  = 0;
            this.Hide();
        }
        GUI.enabled = enabled;
        if (GUITools.Button(new Rect(position.width - 100f, position.height - 44f, 90f, 32f), new GUIContent(LocalizedStrings.DiscardCaps), BlueStonez.button))
        {
            this.Hide();
        }
        if (!this._showReceiverDropdownList && GUI.GetNameOfFocusedControl().Equals("Message Receiver"))
        {
            this._showReceiverDropdownList = true;
            this._lastMsgRcvName           = this._msgReceiver;
            this._msgReceiver = string.Empty;
        }
        GUI.EndGroup();
        if (this._showReceiverDropdownList)
        {
            this.DoReceiverDropdownList(rect);
        }
    }
    // Token: 0x06000D82 RID: 3458 RVA: 0x0005E4C4 File Offset: 0x0005C6C4
    private void DoOKCancelButtons()
    {
        Rect       rect    = new Rect(this._size.x * 0.5f + 5f, this._size.y - 40f, 120f, 32f);
        GUIContent content = new GUIContent((!string.IsNullOrEmpty(this._cancelCaption)) ? this._cancelCaption : LocalizedStrings.CancelCaps);

        GUI.color = Color.white;
        bool flag;

        if (this._allowAudio)
        {
            flag = GUITools.Button(rect, content, PopupSkin.button);
        }
        else
        {
            flag = GUI.Button(rect, content, PopupSkin.button);
        }
        if (flag)
        {
            PopupSystem.HideMessage(this);
            if (this._callbackCancel != null)
            {
                this._callbackCancel();
            }
        }
        GUIStyle style = PopupSkin.button;

        PopupSystem.ActionType actionType = this._actionType;
        if (actionType != PopupSystem.ActionType.Negative)
        {
            if (actionType == PopupSystem.ActionType.Positive)
            {
                style = PopupSkin.button_green;
            }
        }
        else
        {
            style = PopupSkin.button_red;
        }
        rect        = new Rect(this._size.x * 0.5f - 125f, this._size.y - 40f, 120f, 32f);
        content     = new GUIContent((!string.IsNullOrEmpty(this._okCaption)) ? this._okCaption : LocalizedStrings.OkCaps);
        GUI.enabled = this.IsOkButtonEnabled;
        if (this._allowAudio)
        {
            flag = GUITools.Button(rect, content, style);
        }
        else
        {
            flag = GUI.Button(rect, content, style);
        }
        if (flag)
        {
            PopupSystem.HideMessage(this);
            if (this._callbackOk != null)
            {
                this._callbackOk();
            }
        }
    }
示例#19
0
    // Token: 0x06000CC9 RID: 3273 RVA: 0x00057114 File Offset: 0x00055314
    private void DrawFullPanel(Rect rect)
    {
        int num  = 6;
        int num2 = (int)rect.height - 50;

        GUI.BeginGroup(rect);
        GUI.Box(new Rect(6f, 0f, rect.width - 12f, (float)num2), GUIContent.none, BlueStonez.window_standard_grey38);
        this.DrawMapSelection(new Rect((float)num, 0f, 200f, (float)num2));
        num += 206;
        this.DrawVerticalLine((float)(num - 3), 2f, (float)num2);
        this.DrawGameModeSelection(new Rect((float)num, 0f, 160f, (float)num2));
        num += 166;
        this.DrawVerticalLine((float)(num - 3), 2f, (float)num2);
        this.DrawGameDescription(new Rect((float)num, 0f, 255f, (float)num2));
        num += 261;
        this.DrawVerticalLine((float)(num - 3), 2f, (float)num2);
        this.DrawGameConfiguration(new Rect((float)num, 0f, 360f, (float)num2));
        if (GUITools.Button(new Rect(rect.width - 138f, rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.CancelCaps), BlueStonez.button))
        {
            PanelManager.Instance.ClosePanel(PanelType.CreateGame);
        }
        GUITools.PushGUIState();
        string tooltip = string.Empty;

        if (this._mapSelected == null)
        {
            tooltip = "No map selected";
        }
        else if (this._modeSelection == null)
        {
            tooltip = "No mode selected";
        }
        else if (!this.IsModeSupported)
        {
            tooltip = "Unsupported game mode: " + this._modeSelection.Current;
        }
        else if (!Singleton <GameServerController> .Instance.SelectedServer.IsValid)
        {
            tooltip = "Game server not valid: " + Singleton <GameServerController> .Instance.SelectedServer.ConnectionString;
        }
        else if (!LocalizationHelper.ValidateMemberName(this._gameName, ApplicationDataManager.CurrentLocale))
        {
            tooltip = "Game name not valid: " + this._gameName;
        }
        GUI.enabled = (this.IsModeSupported && Singleton <GameServerController> .Instance.SelectedServer.IsValid && LocalizationHelper.ValidateMemberName(this._gameName, ApplicationDataManager.CurrentLocale) && (string.IsNullOrEmpty(this._password) || this.ValidateGamePassword(this._password)));
        if (GUITools.Button(new Rect(rect.width - 138f - 125f, rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.CreateCaps, tooltip), BlueStonez.button_green))
        {
            PanelManager.Instance.ClosePanel(PanelType.CreateGame);
            this._gameName = TextUtilities.Trim(this._gameName);
            MapSettings mapSettings      = this._mapSelected.View.Settings[this._modeSelection.Current];
            int         timeMinutes      = Mathf.RoundToInt((float)(mapSettings.TimeCurrent / 60)) * 60;
            string      connectionString = Singleton <GameServerController> .Instance.SelectedServer.ConnectionString;
            Singleton <GameStateController> .Instance.CreateNetworkGame(connectionString, this._mapSelected.Id, this._modeSelection.Current, this._gameName, this._password, timeMinutes, mapSettings.KillsCurrent, mapSettings.PlayersCurrent, this._minLevelCurrent, this._maxLevelCurrent, (GameFlags.GAME_FLAGS) _gameFlags.ToInt());
        }
        GUITools.PopGUIState();
        GUI.EndGroup();
    }
示例#20
0
    /// <summary>
    /// 开始界面
    /// </summary>
    private void WelcomePage()
    {
        InitGUIStyle();
        GUILayout.Space(position.height * 0.2f);
        GUILayout.Label("欢迎使用中国商飞3D虚拟培训课件开发平台", titleLabelStyle);
        GUILayout.Space(20);
        GUILayout.Label("请选择新建课件设计类型", subtitleLabelStyle);
        GUILayout.Space(100);

        //操作方式设定未来可能被移除
        opType =
            (OperateType)
            GUITools.EnumPopup(new GUIContent("操作方式"), opType, position.width * 0.33f, position.width * 0.33f,
                               GUILayout.Height(20));
        GUILayout.Space(10);

        sjType =
            (SubjectType)
            GUITools.EnumPopup(new GUIContent("课件类型"), sjType, position.width * 0.33f, position.width * 0.33f,
                               GUILayout.Height(20));
        GUILayout.Space(100);

        if (GUITools.Button("新建课件", position.width * 0.4f, position.width * 0.4f, GUILayout.Height(20)))
        {
            GameObject go = GameObject.FindGameObjectWithTag("GameManager");
            if (go)
            {
                if (EditorUtility.DisplayDialog("提示", "存在已编辑的场景,确定要新建课件吗?", "确定", "取消"))
                {
                    //新建
                    EditorApplication.delayCall += NewScene;
                }
            }
            else
            {
                if (EditorUtility.DisplayDialog("提示", "确定要新建课件吗?", "确定", "取消"))
                {
                    //新建
                    EditorApplication.delayCall += NewScene;
                }
            }
        }

        GUILayout.Space(20);

        if (GUITools.Button("打开已编辑场景", position.width * 0.4f, position.width * 0.4f, GUILayout.Height(20)))
        {
            string openPath = EditorUtility.OpenFilePanel("打开场景", "", "unity");
            if (openPath != "")
            {
                EditorSceneManager.OpenScene(openPath);
                //载入信息,跳转界面
                CheckScenePath();
            }
        }
    }
示例#21
0
    // Token: 0x06000E40 RID: 3648 RVA: 0x000617CC File Offset: 0x0005F9CC
    private void DrawResetGear()
    {
        float num  = Mathf.Max((float)(Screen.width - 584) * 0.5f, 170f);
        float num2 = ((float)(Screen.width - 584) - num) * 0.5f;

        if (Singleton <TemporaryLoadoutManager> .Instance.IsGearLoadoutModified && GUITools.Button(new Rect(2f + num2, (float)(Screen.height - 60), num, 32f), new GUIContent("Reset Avatar"), BlueStonez.button_white))
        {
            Singleton <TemporaryLoadoutManager> .Instance.ResetLoadout();
        }
    }
示例#22
0
 void DrawButtonsPreview(Color32 textColor)
 {
     for (int i = 0; i < colors.Length; i++)
     {
         EditorGUILayout.BeginHorizontal();
         GUITools.IconButton(icons[i], colors[i]);
         GUITools.Button(contents[i], colors[i], GUITools.toolbarButton, textColor);
         EditorGUILayout.EndHorizontal();
     }
 }
示例#23
0
        public static void DrawName(string current, GUIContent gui, Action <string> onPicked)
        {
            EditorGUILayout.BeginHorizontal();
            DrawLabel(gui);
            if (GUITools.Button(GetGUI(current), GUITools.popup))
            {
                BuildMenu(current, onPicked);
            }

            EditorGUILayout.EndHorizontal();
        }
示例#24
0
    // Token: 0x06000D32 RID: 3378 RVA: 0x0005AE40 File Offset: 0x00059040
    private void DrawOptionsPanel()
    {
        GUI.SetNextControlName("OptionPanelHeading");
        GUI.Label(new Rect(0f, 0f, this._rect.width, 56f), LocalizedStrings.OptionsCaps, BlueStonez.tab_strip);
        if (GUI.GetNameOfFocusedControl() != "OptionPanelHeading")
        {
            GUI.FocusControl("OptionPanelHeading");
        }
        this._selectedOptionsTab = UnityGUI.Toolbar(new Rect(2f, 31f, this._rect.width - 5f, 22f), this._selectedOptionsTab, this._optionsTabs, this._optionsTabs.Length, BlueStonez.tab_medium);
        if (GUI.changed)
        {
            GUI.changed = false;
            AutoMonoBehaviour <SfxManager> .Instance.Play2dAudioClip(GameAudio.ButtonClick, 0UL, 1f, 1f);
        }
        GUI.BeginGroup(new Rect(16f, 55f, this._rect.width - 32f, this._rect.height - 56f - 44f), string.Empty, BlueStonez.window_standard_grey38);
        switch (this._selectedOptionsTab)
        {
        case 0:
            this.DoControlsGroup();
            break;

        case 1:
            this.DoAudioGroup();
            break;

        case 2:
            this.DoVideoGroup();
            break;
        }
        GUI.EndGroup();
        GUI.enabled = !this._showWaterModeMenu;
        if (GUI.Button(new Rect(this._rect.width - 136f, this._rect.height - 40f, 120f, 32f), new GUIContent(LocalizedStrings.OkCaps), BlueStonez.button))
        {
            ApplicationDataManager.ApplicationOptions.SaveApplicationOptions();
            PanelManager.Instance.ClosePanel(PanelType.Options);
        }
        if (AutoMonoBehaviour <InputManager> .Instance.HasUnassignedKeyMappings)
        {
            GUI.contentColor = Color.red;
            GUI.Label(new Rect(166f, this._rect.height - 40f, this._rect.width - 136f - 166f, 32f), LocalizedStrings.UnassignedKeyMappingsWarningMsg, BlueStonez.label_interparkmed_11pt);
            GUI.contentColor = Color.white;
        }
        if (this._selectedOptionsTab == 0 && !ApplicationDataManager.IsMobile && GUITools.Button(new Rect(16f, this._rect.height - 40f, 150f, 32f), new GUIContent(LocalizedStrings.ResetDefaults), BlueStonez.button))
        {
            AutoMonoBehaviour <InputManager> .Instance.Reset();
        }
        else if (this._selectedOptionsTab == 2)
        {
            GUI.Label(new Rect(16f, this._rect.height - 40f, 150f, 32f), "FPS: " + (1f / Time.smoothDeltaTime).ToString("F1"), BlueStonez.label_interparkbold_16pt_left);
        }
        GUI.enabled = true;
    }
 // Token: 0x06000E05 RID: 3589 RVA: 0x00060A34 File Offset: 0x0005EC34
 protected void DrawBuyButton(Rect position, string text, ShopArea area = ShopArea.Shop)
 {
     GUI.contentColor = ColorScheme.UberStrikeYellow;
     if (GUITools.Button(position, new GUIContent(text), BlueStonez.buttondark_medium))
     {
         BuyPanelGUI buyPanelGUI = PanelManager.Instance.OpenPanel(PanelType.BuyItem) as BuyPanelGUI;
         if (buyPanelGUI)
         {
             buyPanelGUI.SetItem(this.Item, this._location, this._recommendation, false);
         }
     }
     GUI.contentColor = Color.white;
 }
示例#26
0
    // Token: 0x06000AA3 RID: 2723 RVA: 0x0004429C File Offset: 0x0004249C
    private void DoDialogFooter(Rect rect, ChatGroupPanel pane, ChatDialog dialog)
    {
        GUI.BeginGroup(rect, BlueStonez.window_standard_grey38);
        bool enabled = GUI.enabled;

        GUI.enabled &= (!AutoMonoBehaviour <CommConnectionManager> .Instance.Client.Lobby.IsPlayerMuted && dialog != null);
        GUI.SetNextControlName("@CurrentChatMessage");
        this._currentChatMessage = GUI.TextField(new Rect(6f, 6f, rect.width - 60f, rect.height - 12f), this._currentChatMessage, 140, BlueStonez.textField);
        this._currentChatMessage = this._currentChatMessage.Trim(new char[]
        {
            '\n'
        });
        if (this._spammingNotificationTime > Time.time)
        {
            GUI.color = Color.red;
            GUI.Label(new Rect(15f, 6f, rect.width - 66f, rect.height - 12f), LocalizedStrings.DontSpamTheLobbyChat, BlueStonez.label_interparkmed_10pt_left);
            GUI.color = Color.white;
        }
        else
        {
            string text = string.Empty;
            if (dialog != null && dialog.UserCmid > 0)
            {
                if (dialog.CanChat)
                {
                    text = LocalizedStrings.EnterAMessageHere;
                }
                else
                {
                    text = dialog.UserName + LocalizedStrings.Offline;
                }
            }
            else
            {
                text = LocalizedStrings.EnterAMessageHere;
            }
            if (string.IsNullOrEmpty(this._currentChatMessage) && GUI.GetNameOfFocusedControl() != "@CurrentChatMessage")
            {
                GUI.color = new Color(1f, 1f, 1f, 0.3f);
                GUI.Label(new Rect(10f, 6f, rect.width - 66f, rect.height - 12f), text, BlueStonez.label_interparkmed_10pt_left);
                GUI.color = Color.white;
            }
        }
        if ((GUITools.Button(new Rect(rect.width - 51f, 6f, 45f, rect.height - 12f), new GUIContent(LocalizedStrings.Send), BlueStonez.buttondark_small) || Event.current.keyCode == KeyCode.Return) && !AutoMonoBehaviour <CommConnectionManager> .Instance.Client.Lobby.IsPlayerMuted && this._lastMessageSentTimer > 0.29f)
        {
            this.SendChatMessage();
            GUI.FocusControl("@CurrentChatMessage");
        }
        GUI.enabled = enabled;
        GUI.EndGroup();
    }
    // Token: 0x06000AD5 RID: 2773 RVA: 0x000461F0 File Offset: 0x000443F0
    private void DrawCreateClanMessage(Rect rect)
    {
        Rect position = new Rect((rect.width - 480f) / 2f, (rect.height - 360f) / 2f, 480f, 360f);

        GUI.BeginGroup(position, BlueStonez.window_standard_grey38);
        int num  = 35;
        int num2 = 120;
        int num3 = 320;
        int num4 = 130;
        int num5 = 190;
        int num6 = 250;

        GUI.Label(new Rect(0f, 0f, position.width, 56f), LocalizedStrings.CreateAClan, BlueStonez.tab_strip);
        GUI.Label(new Rect(0f, 60f, position.width, 20f), LocalizedStrings.HereYouCanCreateYourOwnClan, BlueStonez.label_interparkbold_18pt);
        GUI.Label(new Rect(0f, 80f, position.width, 40f), LocalizedStrings.YouCantChangeYourClanInfoOnceCreated, BlueStonez.label_interparkmed_11pt);
        GUI.Label(new Rect((float)num, (float)num4, 100f, 20f), LocalizedStrings.Name, BlueStonez.label_interparkbold_18pt_left);
        GUI.Label(new Rect((float)num, (float)num5, 100f, 20f), LocalizedStrings.Tag, BlueStonez.label_interparkbold_18pt_left);
        GUI.Label(new Rect((float)num, (float)num6, 100f, 20f), LocalizedStrings.Motto, BlueStonez.label_interparkbold_18pt_left);
        this._newClanName  = GUI.TextField(new Rect((float)num2, (float)num4, (float)num3, 24f), this._newClanName, BlueStonez.textField);
        this._newClanTag   = GUI.TextField(new Rect((float)num2, (float)num5, (float)num3, 24f), this._newClanTag, BlueStonez.textField);
        this._newClanMotto = GUI.TextField(new Rect((float)num2, (float)num6, (float)num3, 24f), this._newClanMotto, BlueStonez.textField);
        GUI.Label(new Rect((float)num2, (float)(num4 + 25), 300f, 20f), LocalizedStrings.ThisIsTheOfficialNameOfYourClan, BlueStonez.label_interparkmed_10pt_left);
        GUI.Label(new Rect((float)num2, (float)(num5 + 25), 300f, 20f), LocalizedStrings.ThisTagGetsDisplayedNextToYourName, BlueStonez.label_interparkmed_10pt_left);
        GUI.Label(new Rect((float)num2, (float)(num6 + 25), 300f, 20f), LocalizedStrings.ThisIsYourOfficialClanMotto, BlueStonez.label_interparkmed_10pt_left);
        if (this._newClanName.Length > 25)
        {
            this._newClanName = this._newClanName.Remove(25);
        }
        if (this._newClanTag.Length > 5)
        {
            this._newClanTag = this._newClanTag.Remove(5);
        }
        if (this._newClanMotto.Length > 25)
        {
            this._newClanMotto = this._newClanMotto.Remove(25);
        }
        GUITools.PushGUIState();
        GUI.enabled &= (this._newClanName.Length >= 3 && this._newClanTag.Length >= 2 && this._newClanMotto.Length >= 3);
        if (GUITools.Button(new Rect(position.width - 110f - 110f, 310f, 100f, 30f), new GUIContent(LocalizedStrings.CreateCaps), BlueStonez.button_green))
        {
            Singleton <ClanDataManager> .Instance.CreateNewClan(this._newClanName, this._newClanMotto, this._newClanTag);
        }
        GUITools.PopGUIState();
        if (GUITools.Button(new Rect(position.width - 110f, 310f, 100f, 30f), new GUIContent(LocalizedStrings.CancelCaps), BlueStonez.button))
        {
            this.createAClan = false;
        }
        GUI.EndGroup();
    }
 // 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;
 }
示例#29
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();
                    }
                }
            }
        }
 // 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();
 }