// Token: 0x06000A9E RID: 2718 RVA: 0x00043C18 File Offset: 0x00041E18 public override void DrawGUI(Rect rect) { GUI.BeginGroup(rect, BlueStonez.window); if (Event.current.type == EventType.KeyDown && Event.current.keyCode == KeyCode.Escape) { GUIUtility.keyboardControl = 0; } Rect rect2 = new Rect(0f, 21f, 150f, rect.height - 21f); Rect rect3 = new Rect(149f, 0f, rect.width - 150f, 22f); Rect rect4 = new Rect(150f, 22f, rect.width - 150f, rect.height - 22f - 36f - this._keyboardOffset); Rect rect5 = new Rect(149f, rect.height - 37f, rect.width - 150f + 1f, 37f); GUITools.PushGUIState(); GUI.enabled &= !PopupMenu.IsEnabled; ChatGroupPanel pane = Singleton <ChatManager> .Instance._commPanes[3]; this.DoDialogFooter(rect5, pane, Singleton <ChatManager> .Instance.InGameDialog); this.DrawCommPane(rect2, pane); this.DoDialogHeader(rect3, Singleton <ChatManager> .Instance.InGameDialog); this.DoDialog(rect4, pane, Singleton <ChatManager> .Instance.InGameDialog); GUITools.PopGUIState(); if (PopupMenu.Current != null) { PopupMenu.Current.Draw(); } GUI.EndGroup(); GuiManager.DrawTooltip(); }
// Token: 0x06000AA0 RID: 2720 RVA: 0x00043D90 File Offset: 0x00041F90 public void DrawCommPane(Rect rect, ChatGroupPanel pane) { GUI.BeginGroup(rect); pane.WindowHeight = rect.height; float height = Mathf.Max(pane.WindowHeight, pane.ContentHeight); float num = 0f; pane.Scroll = GUITools.BeginScrollView(new Rect(0f, 0f, rect.width, pane.WindowHeight), pane.Scroll, new Rect(0f, 0f, rect.width - 17f, height), false, true, true); GUI.BeginGroup(new Rect(0f, 0f, rect.width, pane.WindowHeight + pane.Scroll.y)); int num2 = 0; string value = pane.SearchText.ToLower(); GUI.BeginGroup(new Rect(0f, num, rect.width - 17f, (float)(GameState.Current.Players.Count * 24))); foreach (GameActorInfo gameActorInfo in GameState.Current.Players.Values) { if (string.IsNullOrEmpty(value) || gameActorInfo.PlayerName.ToLower().Contains(value)) { this.GroupDrawUser((float)(num2++ *24), rect.width - 17f, gameActorInfo, true); } } GUI.EndGroup(); num += 24f + (float)(GameState.Current.Players.Count * 24); GUI.EndGroup(); GUITools.EndScrollView(); pane.ContentHeight = num; GUI.EndGroup(); }
// 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: 0x06000AA1 RID: 2721 RVA: 0x00043F50 File Offset: 0x00042150 private void DoDialog(Rect rect, ChatGroupPanel pane, ChatDialog dialog) { if (dialog == null) { return; } if (dialog.CheckSize(rect) && !Input.GetMouseButton(0)) { this._dialogScroll.y = float.MaxValue; } GUI.BeginGroup(new Rect(rect.x, rect.y + Mathf.Clamp(rect.height - dialog._heightCache, 0f, rect.height), rect.width, rect.height)); int num = 0; float num2 = 0f; this._dialogScroll = GUITools.BeginScrollView(new Rect(0f, 0f, dialog._frameSize.x, dialog._frameSize.y), this._dialogScroll, new Rect(0f, 0f, dialog._contentSize.x, dialog._contentSize.y), false, false, true); foreach (InstantMessage instantMessage in dialog._msgQueue) { if (dialog.CanShow == null || dialog.CanShow(instantMessage.Context)) { if (num % 2 == 0) { GUI.Label(new Rect(0f, num2, dialog._contentSize.x - 1f, instantMessage.Height), GUIContent.none, BlueStonez.box_grey38); } if (GUI.Button(new Rect(0f, num2, dialog._contentSize.x - 1f, instantMessage.Height), GUIContent.none, BlueStonez.dropdown_list)) { this._selectedCmid = instantMessage.Cmid; } if (string.IsNullOrEmpty(instantMessage.PlayerName)) { GUI.color = new Color(0.6f, 0.6f, 0.6f); GUI.Label(new Rect(4f, num2, dialog._contentSize.x - 8f, 20f), instantMessage.Text, BlueStonez.label_interparkbold_11pt_left); } else { GUI.color = this.GetNameColor(instantMessage); GUI.Label(new Rect(4f, num2, dialog._contentSize.x - 8f, 20f), instantMessage.PlayerName + ":", BlueStonez.label_interparkbold_11pt_left); GUI.color = new Color(0.9f, 0.9f, 0.9f); GUI.Label(new Rect(4f, num2 + 20f, dialog._contentSize.x - 8f, instantMessage.Height - 20f), instantMessage.Text, BlueStonez.label_interparkmed_11pt_left); } GUI.color = new Color(1f, 1f, 1f, 0.5f); GUI.Label(new Rect(4f, num2, dialog._contentSize.x - 8f, 20f), instantMessage.TimeString, BlueStonez.label_interparkmed_10pt_right); GUI.color = Color.white; num2 += instantMessage.Height; num++; } } GUITools.EndScrollView(); dialog._heightCache = num2; GUI.EndGroup(); }