private void LateUpdate() { ScreenSizeManager.GetClientRect(this.window_handle, out this.client_rect); this.next_client_width = this.client_rect.right - this.client_rect.left; this.next_client_height = this.client_rect.bottom - this.client_rect.top; if (this.current_client_width != this.next_client_width && this.current_client_height != this.next_client_height) { if (Mathf.Abs(this.next_client_width - this.current_client_width) >= Mathf.Abs(this.next_client_height - this.current_client_height)) { this.EditWindowsSizeW(this.next_client_width, true); } else { this.EditWindowSizeH(this.next_client_height, true); } } else if (this.current_client_width != this.next_client_width) { this.EditWindowsSizeW(this.next_client_width, true); } else { if (this.current_client_height == this.next_client_height) { return; } this.EditWindowSizeH(this.next_client_height, true); } }
private void Awake() { this.window_handle = ScreenSizeManager.FindWindow((string)null, Application.get_productName()); ScreenSizeManager.GetClientRect(this.window_handle, out this.client_rect); this.next_client_width = this.current_client_width = this.client_rect.right - this.client_rect.left; this.next_client_height = this.current_client_height = this.client_rect.bottom - this.client_rect.top; ScreenSizeManager.GetWindowRect(this.window_handle, out this.window_rect); int num1 = this.window_rect.right - this.window_rect.left; int num2 = this.window_rect.bottom - this.window_rect.top; this.frame_width = num1 - this.current_client_width; this.frame_height = num2 - this.current_client_height; }