// 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(); } } }
// Token: 0x06000D81 RID: 3457 RVA: 0x0005E3D8 File Offset: 0x0005C5D8 private void DoOKButton() { 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 rect = new Rect((this._size.x - 120f) * 0.5f, this._size.y - 40f, 120f, 32f); GUIContent content = new GUIContent((!string.IsNullOrEmpty(this._okCaption)) ? this._okCaption : LocalizedStrings.OkCaps); bool flag; 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(); } } }
// Token: 0x06000DD5 RID: 3541 RVA: 0x0005FCF8 File Offset: 0x0005DEF8 public static IPopupDialog ShowMessage(string title, string text, PopupSystem.AlertType flag, Action ok, string okCaption, Action cancel, string cancelCaption, PopupSystem.ActionType type) { IPopupDialog popupDialog = new GeneralPopupDialog(title, text, flag, ok, okCaption, cancel, cancelCaption, type, true); PopupSystem.Show(popupDialog); return(popupDialog); }
// Token: 0x06000D88 RID: 3464 RVA: 0x0005E974 File Offset: 0x0005CB74 public GeneralPopupDialog(string title, string text, PopupSystem.AlertType flag, Action ok, string okCaption, Action cancel, string cancelCaption, PopupSystem.ActionType actionType, bool allowAudio = true) { this.Text = text; this.Title = title; this._alertType = flag; this._actionType = actionType; this._callbackOk = ok; this._callbackCancel = cancel; this._okCaption = okCaption; this._cancelCaption = cancelCaption; this._allowAudio = allowAudio; }