From 037f65d5efe567c6ff22301f86c271e4a9d1cc68 Mon Sep 17 00:00:00 2001 From: konero Date: Jan 15 2023 22:34:12 +0000 Subject: Triangle brush cursors --- diff --git a/toonz/sources/include/tools/cursors.h b/toonz/sources/include/tools/cursors.h index a741def..2069bbd 100644 --- a/toonz/sources/include/tools/cursors.h +++ b/toonz/sources/include/tools/cursors.h @@ -19,6 +19,14 @@ enum { PenCursor, PenLargeCursor, PenCrosshairCursor, + PenTriangleTopLeftCursor, + PenTriangleTopRightCursor, + PenTriangleBottomLeftCursor, + PenTriangleBottomRightCursor, + PenTriangleUpCursor, + PenTriangleDownCursor, + PenTriangleLeftCursor, + PenTriangleRightCursor, BenderCursor, CutterCursor, DistortCursor, diff --git a/toonz/sources/tnztools/Resources/brush_triangle_bottom_left.png b/toonz/sources/tnztools/Resources/brush_triangle_bottom_left.png new file mode 100644 index 0000000..45d269c Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_bottom_left.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_bottom_right.png b/toonz/sources/tnztools/Resources/brush_triangle_bottom_right.png new file mode 100644 index 0000000..9c3207d Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_bottom_right.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_down.png b/toonz/sources/tnztools/Resources/brush_triangle_down.png new file mode 100644 index 0000000..0adc836 Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_down.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_left.png b/toonz/sources/tnztools/Resources/brush_triangle_left.png new file mode 100644 index 0000000..c5b03b4 Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_left.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_right.png b/toonz/sources/tnztools/Resources/brush_triangle_right.png new file mode 100644 index 0000000..a78f7e1 Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_right.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_top_left.png b/toonz/sources/tnztools/Resources/brush_triangle_top_left.png new file mode 100644 index 0000000..9070cb0 Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_top_left.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_top_right.png b/toonz/sources/tnztools/Resources/brush_triangle_top_right.png new file mode 100644 index 0000000..c681d57 Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_top_right.png differ diff --git a/toonz/sources/tnztools/Resources/brush_triangle_up.png b/toonz/sources/tnztools/Resources/brush_triangle_up.png new file mode 100644 index 0000000..ecad709 Binary files /dev/null and b/toonz/sources/tnztools/Resources/brush_triangle_up.png differ diff --git a/toonz/sources/tnztools/cursormanager.cpp b/toonz/sources/tnztools/cursormanager.cpp index 4d08188..da14dc8 100644 --- a/toonz/sources/tnztools/cursormanager.cpp +++ b/toonz/sources/tnztools/cursormanager.cpp @@ -28,6 +28,22 @@ const struct { {ToolCursor::PenCursor, "brush", 16, 15, false}, {ToolCursor::PenLargeCursor, "brush_large", 16, 15, false}, {ToolCursor::PenCrosshairCursor, "brush_crosshair", 16, 15, false}, + {ToolCursor::PenTriangleTopLeftCursor, "brush_triangle_top_left", + 16, 15, false}, + {ToolCursor::PenTriangleTopRightCursor, "brush_triangle_top_right", + 16, 15, false}, + {ToolCursor::PenTriangleBottomLeftCursor, "brush_triangle_bottom_left", + 16, 15, false}, + {ToolCursor::PenTriangleBottomRightCursor, "brush_triangle_bottom_right", + 16, 15, false}, + {ToolCursor::PenTriangleUpCursor, "brush_triangle_up", + 16, 15, false}, + {ToolCursor::PenTriangleDownCursor, "brush_triangle_down", + 16, 15, false}, + {ToolCursor::PenTriangleLeftCursor, "brush_triangle_left", + 16, 15, false}, + {ToolCursor::PenTriangleRightCursor, "brush_triangle_right", + 16, 15, false}, {ToolCursor::BenderCursor, "bender", 9, 7, true}, {ToolCursor::CutterCursor, "cutter", 6, 24, true}, // 12,20, ???}, {ToolCursor::EraserCursor, "eraser", 7, 21, true}, // 15,16, ???}, @@ -175,6 +191,22 @@ public: cursorType = ToolCursor::PenLargeCursor; else if (brushType == "Crosshair") cursorType = ToolCursor::PenCrosshairCursor; + else if (brushType == "Triangle Top Left") + cursorType = ToolCursor::PenTriangleTopLeftCursor; + else if (brushType == "Triangle Top Right") + cursorType = ToolCursor::PenTriangleTopRightCursor; + else if (brushType == "Triangle Bottom Left") + cursorType = ToolCursor::PenTriangleBottomLeftCursor; + else if (brushType == "Triangle Bottom Right") + cursorType = ToolCursor::PenTriangleBottomRightCursor; + else if (brushType == "Triangle Up") + cursorType = ToolCursor::PenTriangleUpCursor; + else if (brushType == "Triangle Down") + cursorType = ToolCursor::PenTriangleDownCursor; + else if (brushType == "Triangle Left") + cursorType = ToolCursor::PenTriangleLeftCursor; + else if (brushType == "Triangle Right") + cursorType = ToolCursor::PenTriangleRightCursor; } bool useLeft = diff --git a/toonz/sources/tnztools/tnztools.qrc b/toonz/sources/tnztools/tnztools.qrc index e333b83..009378b 100644 --- a/toonz/sources/tnztools/tnztools.qrc +++ b/toonz/sources/tnztools/tnztools.qrc @@ -84,6 +84,14 @@ Resources/ex_precise_left.png Resources/brush_large.png Resources/brush_crosshair.png + Resources/brush_triangle_top_left.png + Resources/brush_triangle_top_right.png + Resources/brush_triangle_bottom_left.png + Resources/brush_triangle_bottom_right.png + Resources/brush_triangle_up.png + Resources/brush_triangle_down.png + Resources/brush_triangle_left.png + Resources/brush_triangle_right.png Resources/tracker.png Resources/ex_prev.png Resources/ex_prev_left.png diff --git a/toonz/sources/toonz/preferencespopup.cpp b/toonz/sources/toonz/preferencespopup.cpp index bde6c83..87bf565 100644 --- a/toonz/sources/toonz/preferencespopup.cpp +++ b/toonz/sources/toonz/preferencespopup.cpp @@ -1398,7 +1398,15 @@ QList PreferencesPopup::getComboItemList( {cursorBrushType, {{tr("Small"), "Small"}, {tr("Large"), "Large"}, - {tr("Crosshair"), "Crosshair"}}}, + {tr("Crosshair"), "Crosshair"}, + {tr("Triangle Top Left"), "Triangle Top Left"}, + {tr("Triangle Top Right"), "Triangle Top Right"}, + {tr("Triangle Bottom Left"), "Triangle Bottom Left"}, + {tr("Triangle Bottom Right"), "Triangle Bottom Right"}, + {tr("Triangle Up"), "Triangle Up"}, + {tr("Triangle Down"), "Triangle Down"}, + {tr("Triangle Left"), "Triangle Left"}, + {tr("Triangle Right"), "Triangle Right"}}}, {cursorBrushStyle, {{tr("Default"), "Default"}, {tr("Left-Handed"), "Left-Handed"},