private void SetMousePos(MouseEvent e) { ClientRect r = renderer.domElement.GetBoundingClientRect(); // calculate mouse position in normalized device coordinates // (-1 to +1) for both components mouse.x = ((double)(e.ClientX-r.Left) / (double)Width) * 2 - 1; mouse.y = - ((double)(e.ClientY-r.Top) / (double)Height)*2 +1; }
private void OnClick_UseSecureWebSocket(MouseEvent<InputElement> e) { if (OnViewUseSecureWebSocketChanged != null) { OnViewUseSecureWebSocketChanged(this, new EventArgs()); } }
private void OnClick_DisconnectButton(MouseEvent<ButtonElement> e) { if (OnViewDisconnecting != null) { OnViewDisconnecting(this, new EventArgs()); } }
private void OnClick_SendButton(MouseEvent<ButtonElement> e) { if (OnViewSending != null) { OnViewSending(this, new EventArgs()); } }
private void OnClick_ClearLogButton(MouseEvent<ButtonElement> e) { if (OnViewLogClearing != null) { OnViewLogClearing(this, new EventArgs()); } }