private void HandleOnTabletButtonDown(byte tabletId, MLInputTabletDeviceButton tabletButton, ulong timestamp) { if (_deviceButtons.ContainsKey(tabletButton)) { for (int i = 0; i < _deviceButtons[tabletButton].Count; i++) { _deviceButtons[tabletButton][i].material = _activeMaterial; } } // If center touch ring button is pressed, clear the canvas. if (tabletButton == MLInputTabletDeviceButton.Button9) { ClearCanvas(); } // Pen - Erase Mode if (tabletButton == MLInputTabletDeviceButton.Button11) { _buttonErase = true; } _lastButton = tabletButton; _lastButtonState = true; UpdateInformation(); }
private void HandleOnTabletButtonUp(byte tabletId, MLInputTabletDeviceButton tabletButton, ulong timestamp) { if (_deviceButtons.ContainsKey(tabletButton)) { for (int i = 0; i < _deviceButtons[tabletButton].Count; i++) { _deviceButtons[tabletButton][i].material = _defaultMaterial; } } // Pen - Erase Mode if (tabletButton == MLInputTabletDeviceButton.Button11) { _buttonErase = false; } _lastButton = tabletButton; _lastButtonState = false; UpdateInformation(); }