// Token: 0x06004096 RID: 16534 RVA: 0x000ECBA4 File Offset: 0x000EADA4 public dfMouseEventArgs(global::dfControl Source) : base(Source) { this.Buttons = global::dfMouseButtons.None; this.Clicks = 0; this.Position = Vector2.zero; this.WheelDelta = 0f; }
// Token: 0x0600407E RID: 16510 RVA: 0x000EC9E0 File Offset: 0x000EABE0 internal dfDragEventArgs(global::dfControl source, global::dfDragDropState state, object data, Ray ray, Vector2 position) : base(source) { this.Data = data; this.State = state; this.Position = position; this.Ray = ray; }
// Token: 0x060041CA RID: 16842 RVA: 0x000F16C0 File Offset: 0x000EF8C0 public void Update() { if (!Application.isPlaying) { return; } global::dfControl activeControl = global::dfGUIManager.ActiveControl; this.processMouseInput(); if (activeControl == null) { return; } if (this.processKeyboard()) { return; } if (this.useJoystick) { for (int i = 0; i < global::dfInputManager.wasd.Length; i++) { if (Input.GetKey(global::dfInputManager.wasd[i]) || Input.GetKeyDown(global::dfInputManager.wasd[i]) || Input.GetKeyUp(global::dfInputManager.wasd[i])) { return; } } this.processJoystick(); } }
// Token: 0x060043FA RID: 17402 RVA: 0x000FC94C File Offset: 0x000FAB4C private void detachEvents(global::dfControl control) { control.IsVisibleChanged -= this.childIsVisibleChanged; control.PositionChanged -= this.childControlInvalidated; control.SizeChanged -= this.childControlInvalidated; control.ZOrderChanged -= this.childOrderChanged; }
// Token: 0x060041CD RID: 16845 RVA: 0x000F1A48 File Offset: 0x000EFC48 private void processKeyEvent(EventType eventType, KeyCode keyCode, EventModifiers modifiers) { global::dfControl activeControl = global::dfGUIManager.ActiveControl; if (activeControl == null || !activeControl.IsEnabled || !activeControl.transform.IsChildOf(base.transform)) { return; } bool control = (modifiers & 2) == 2; bool flag = (modifiers & 1) == 1; bool alt = (modifiers & 4) == 4; global::dfKeyEventArgs dfKeyEventArgs = new global::dfKeyEventArgs(activeControl, keyCode, control, flag, alt); if (keyCode >= 32 && keyCode <= 122) { char c = keyCode; dfKeyEventArgs.Character = ((!flag) ? char.ToLower(c) : char.ToUpper(c)); } if (eventType == 4) { activeControl.OnKeyDown(dfKeyEventArgs); } else if (eventType == 5) { activeControl.OnKeyUp(dfKeyEventArgs); } if (dfKeyEventArgs.Used || eventType == 5) { return; } }
// Token: 0x060044E1 RID: 17633 RVA: 0x00101918 File Offset: 0x000FFB18 private void arrangeTabs() { this.SuspendLayout(); try { this.layoutPadding = this.layoutPadding.ConstrainPadding(); float num = (float)this.layoutPadding.left - this.scrollPosition.x; float num2 = (float)this.layoutPadding.top - this.scrollPosition.y; float num3 = 0f; float num4 = 0f; for (int i = 0; i < base.Controls.Count; i++) { global::dfControl dfControl = this.controls[i]; if (dfControl.IsVisible && dfControl.enabled && dfControl.gameObject.activeSelf) { Vector2 vector; vector..ctor(num, num2); dfControl.RelativePosition = vector; float num5 = dfControl.Width + (float)this.layoutPadding.horizontal; float num6 = dfControl.Height + (float)this.layoutPadding.vertical; num3 = Mathf.Max(num5, num3); num4 = Mathf.Max(num6, num4); num += num5; } } } finally { this.ResumeLayout(); } }
// Token: 0x0600405B RID: 16475 RVA: 0x000EC380 File Offset: 0x000EA580 private void popup_LostFocus(global::dfControl control, global::dfFocusEventArgs args) { if (this.popup != null && !this.popup.ContainsFocus) { this.closePopup(true); } }
// Token: 0x060043EA RID: 17386 RVA: 0x000FBDB4 File Offset: 0x000F9FB4 public void CenterChildControls() { if (this.controls.Count == 0) { return; } Vector2 vector = Vector2.one * float.MaxValue; Vector2 vector2 = Vector2.one * float.MinValue; for (int i = 0; i < this.controls.Count; i++) { global::dfControl dfControl = this.controls[i]; Vector2 vector3 = dfControl.RelativePosition; Vector2 vector4 = vector3 + dfControl.Size; vector = Vector2.Min(vector, vector3); vector2 = Vector2.Max(vector2, vector4); } Vector2 vector5 = vector2 - vector; Vector2 vector6 = (base.Size - vector5) * 0.5f; for (int j = 0; j < this.controls.Count; j++) { global::dfControl dfControl2 = this.controls[j]; dfControl2.RelativePosition = dfControl2.RelativePosition - vector + vector6; } }
// Token: 0x060043F7 RID: 17399 RVA: 0x000FC6D8 File Offset: 0x000FA8D8 private Vector2 calculateViewSize() { Vector2 vector = new Vector2((float)this.scrollPadding.horizontal, (float)this.scrollPadding.vertical).RoundToInt(); Vector2 vector2 = base.Size.RoundToInt() - vector; if (!base.IsVisible || this.controls.Count == 0) { return(vector2); } Vector2 vector3 = Vector2.one * float.MaxValue; Vector2 vector4 = Vector2.one * float.MinValue; for (int i = 0; i < this.controls.Count; i++) { global::dfControl dfControl = this.controls[i]; if (!Application.isPlaying || dfControl.IsVisible) { Vector2 vector5 = dfControl.RelativePosition.RoundToInt(); Vector2 vector6 = vector5 + dfControl.Size.RoundToInt(); vector3 = Vector2.Min(vector5, vector3); vector4 = Vector2.Max(vector6, vector4); } } vector4 = Vector2.Max(vector4, vector2); return(vector4 - vector3); }
// Token: 0x06004089 RID: 16521 RVA: 0x000ECA78 File Offset: 0x000EAC78 internal dfKeyEventArgs(global::dfControl source, KeyCode Key, bool Control, bool Shift, bool Alt) : base(source) { this.KeyCode = Key; this.Control = Control; this.Shift = Shift; this.Alt = Alt; }
// Token: 0x0600442F RID: 17455 RVA: 0x000FD5B8 File Offset: 0x000FB7B8 private void decrementPressed(global::dfControl sender, global::dfMouseEventArgs args) { if (args.Buttons.IsSet(global::dfMouseButtons.Left)) { this.Value -= this.IncrementAmount; args.Use(); } }
// Token: 0x060044D7 RID: 17623 RVA: 0x001014F4 File Offset: 0x000FF6F4 private void OnClick(global::dfControl sender, global::dfMouseEventArgs args) { if (!this.controls.Contains(args.Source)) { return; } this.SelectedIndex = args.Source.ZOrder; }
// Token: 0x06004095 RID: 16533 RVA: 0x000ECB68 File Offset: 0x000EAD68 public dfMouseEventArgs(global::dfControl Source, global::dfMouseButtons button, int clicks, Ray ray, Vector2 location, float wheel) : base(Source) { this.Buttons = button; this.Clicks = clicks; this.Position = location; this.WheelDelta = wheel; this.Ray = ray; }
// Token: 0x06004059 RID: 16473 RVA: 0x000EC344 File Offset: 0x000EA544 private void popup_KeyDown(global::dfControl control, global::dfKeyEventArgs args) { if (args.KeyCode == 27 || args.KeyCode == 13) { this.closePopup(true); base.Focus(); } }
// Token: 0x060043E5 RID: 17381 RVA: 0x000FBB4C File Offset: 0x000F9D4C protected internal override void OnControlAdded(global::dfControl child) { base.OnControlAdded(child); this.attachEvents(child); if (this.autoLayout) { this.AutoArrange(); } }
// Token: 0x06002969 RID: 10601 RVA: 0x000981D8 File Offset: 0x000963D8 public void OnButtonClicked(global::dfControl control, global::dfMouseEventArgs mouseEvent) { int num = int.Parse(control.Tooltip); this.Setup(this.pageCount, num); if (this.OnPageSwitch != null) { this.OnPageSwitch(num); } }
// Token: 0x06004354 RID: 17236 RVA: 0x000F909C File Offset: 0x000F729C private bool canShowControlUnclipped(global::dfControl control) { if (!this.hideClippedControls) { return(true); } Vector3 relativePosition = control.RelativePosition; return(relativePosition.x + control.Width < this.panel.Width - (float)this.borderPadding.right && relativePosition.y + control.Height < this.panel.Height - (float)this.borderPadding.bottom); }
// Token: 0x06002967 RID: 10599 RVA: 0x00097FA4 File Offset: 0x000961A4 public void Setup(int iPages, int iCurrentPage) { if (this.pageCount == iPages && this.pageCurrent == iCurrentPage) { return; } this.pageCount = iPages; this.pageCurrent = iCurrentPage; global::dfControl[] componentsInChildren = base.gameObject.GetComponentsInChildren <global::dfControl>(); foreach (global::dfControl dfControl in componentsInChildren) { if (!(dfControl.gameObject == base.gameObject)) { Object.Destroy(dfControl.gameObject); } } if (this.pageCount <= 1) { return; } global::dfControl component = base.GetComponent <global::dfControl>(); bool flag = true; Vector3 position; position..ctor(0f, 0f, 0f); for (int j = 0; j < this.pageCount; j++) { if (this.buttonGroups - j <= 0 && j < this.pageCount - this.buttonGroups && Math.Abs(j - this.pageCurrent) > this.buttonGroups / 2) { if (flag) { this.DropSpacer(ref position); } flag = false; } else { GameObject gameObject = (GameObject)Object.Instantiate(this.clickableButton); global::dfButton component2 = gameObject.GetComponent <global::dfButton>(); component.AddControl(component2); component2.Tooltip = j.ToString(); component2.MouseDown += this.OnButtonClicked; component2.Text = (j + 1).ToString(); component2.Invalidate(); if (j == this.pageCurrent) { component2.Disable(); } component2.Position = position; position.x += component2.Width + 5f; flag = true; } } component.Width = position.x; }
// Token: 0x060041D3 RID: 16851 RVA: 0x000F1E00 File Offset: 0x000F0000 private static float combinedOpacity(global::dfControl control) { float num = 1f; while (control != null) { num *= control.Opacity; control = control.Parent; } return(num); }
// Token: 0x060028AF RID: 10415 RVA: 0x00094B84 File Offset: 0x00092D84 public void OnKeyDown(global::dfControl control, global::dfKeyEventArgs keyEvent) { if (char.IsControl(keyEvent.Character)) { return; } if (!char.IsDigit(keyEvent.Character)) { keyEvent.Use(); } }
// Token: 0x060028D9 RID: 10457 RVA: 0x0009579C File Offset: 0x0009399C public void OnKeyDown(global::dfControl control, global::dfKeyEventArgs keyEvent) { if (char.IsControl(keyEvent.Character)) { return; } if (this.allowedChars.IndexOf(keyEvent.Character) == -1) { keyEvent.Use(); } }
// Token: 0x060040A3 RID: 16547 RVA: 0x000ECC54 File Offset: 0x000EAE54 public dfTouchEventArgs(global::dfControl Source, Touch touch, Ray ray) : base(Source, global::dfMouseButtons.Left, touch.tapCount, ray, touch.position, 0f) { this.Touch = touch; this.Touches = new List <Touch> { touch }; if (touch.deltaTime > 1.401298E-45f) { base.MoveDelta = touch.deltaPosition * (Time.deltaTime / touch.deltaTime); } }
// Token: 0x0600293D RID: 10557 RVA: 0x000978EC File Offset: 0x00095AEC private GameObject NewServerItem() { if (this.pooledServerItems.Count > 0) { return(this.pooledServerItems.Dequeue()); } GameObject gameObject = (GameObject)Object.Instantiate(this.serverItem); global::dfControl component = gameObject.GetComponent <global::dfControl>(); this.serverContainer.AddControl(component); return(gameObject); }
// Token: 0x06002968 RID: 10600 RVA: 0x0009816C File Offset: 0x0009636C public void DropSpacer(ref Vector3 vPos) { if (!this.spacerLabel) { return; } global::dfControl component = base.GetComponent <global::dfControl>(); GameObject gameObject = (GameObject)Object.Instantiate(this.spacerLabel); global::dfControl component2 = gameObject.GetComponent <global::dfControl>(); component.AddControl(component2); component2.Position = vPos; vPos.x += component2.Width + 5f; }
// Token: 0x060045B4 RID: 17844 RVA: 0x00105D64 File Offset: 0x00103F64 private void eventSource_KeyDown(global::dfControl control, global::dfKeyEventArgs args) { if (args.KeyCode != this.keyCode) { return; } if (args.Shift != this.shiftPressed || args.Control != this.controlPressed || args.Alt != this.altPressed) { return; } MethodInfo method = this.target.GetMethod(); method.Invoke(this.target.Component, null); }
// Token: 0x060043E6 RID: 17382 RVA: 0x000FBB70 File Offset: 0x000F9D70 protected internal override void OnControlRemoved(global::dfControl child) { base.OnControlRemoved(child); if (child != null) { this.detachEvents(child); } if (this.autoLayout) { this.AutoArrange(); } else { this.updateScrollbars(); } }
// Token: 0x060043E9 RID: 17385 RVA: 0x000FBD1C File Offset: 0x000F9F1C public void FitToContents() { if (this.controls.Count == 0) { return; } Vector2 vector = Vector2.zero; for (int i = 0; i < this.controls.Count; i++) { global::dfControl dfControl = this.controls[i]; Vector2 vector2 = dfControl.RelativePosition + dfControl.Size; vector = Vector2.Max(vector, vector2); } base.Size = vector + new Vector2((float)this.scrollPadding.right, (float)this.scrollPadding.bottom); }
// Token: 0x06004051 RID: 16465 RVA: 0x000EB95C File Offset: 0x000E9B5C private void trigger_Click(global::dfControl control, global::dfMouseEventArgs mouseEvent) { if (mouseEvent.Source == this.triggerButton && !mouseEvent.Used) { mouseEvent.Use(); if (this.popup == null) { this.openPopup(); } else { Debug.Log("Close popup"); this.closePopup(true); } } }
// Token: 0x060043F6 RID: 17398 RVA: 0x000FC644 File Offset: 0x000FA844 private Vector2 calculateMinChildPosition() { float num = float.MaxValue; float num2 = float.MaxValue; for (int i = 0; i < this.controls.Count; i++) { global::dfControl dfControl = this.controls[i]; if (dfControl.enabled && dfControl.gameObject.activeSelf) { Vector3 vector = dfControl.RelativePosition.FloorToInt(); num = Mathf.Min(num, vector.x); num2 = Mathf.Min(num2, vector.y); } } return(new Vector2(num, num2)); }
// Token: 0x06000329 RID: 809 RVA: 0x0000FA9C File Offset: 0x0000DC9C protected void DoOnConnected() { base.gameObject.SetActive(!this.disableWhenConnected); global::dfControl component = base.gameObject.GetComponent <global::dfControl>(); if (component) { if (this.disableWhenConnected) { component.Hide(); } else { component.Show(); } } }