protected virtual void OnMouseWheel(WheelEvent e) { if (e.shiftKey) { uPixel.CyclePalette((int)Mathf.Sign(-e.mouseDelta.y)); } else { m_Size += (int)Mathf.Sign(-e.mouseDelta.y); m_Size = Mathf.Max(1, m_Size); } Vector2Int mouseCoord = GetImageCoord(Image, e.localMousePosition); uPixel.ClearBuffer(); Vector2Int[] coords = GetTargetCoords(mouseCoord); uPixel.DrawBuffer(coords); e.StopPropagation(); }
static void NextColorShortcut() { window.CyclePalette(1); }