Esempio n. 1
0
        private void HandleOnTabletButtonDown(byte tabletId, MLInput.TabletDeviceButton 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 == MLInput.TabletDeviceButton.Button9)
            {
                ClearCanvas();
            }

            // Pen - Erase Mode
            if (tabletButton == MLInput.TabletDeviceButton.Button11)
            {
                ButtonErase = true;
            }

            LastButton      = tabletButton;
            LastButtonState = true;
        }
Esempio n. 2
0
        private void HandleOnTabletButtonUp(byte tabletId, MLInput.TabletDeviceButton 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 == MLInput.TabletDeviceButton.Button11)
            {
                ButtonErase = false;
            }

            LastButton      = tabletButton;
            LastButtonState = false;
        }