Added fog rectangle tool

This commit is contained in:
Mitchell McCaffrey
2020-12-03 17:32:41 +11:00
parent f5b875e101
commit f1ae78612c
3 changed files with 71 additions and 2 deletions
@@ -12,6 +12,7 @@ import FogBrushIcon from "../../../icons/FogBrushIcon";
import FogPolygonIcon from "../../../icons/FogPolygonIcon";
import FogRemoveIcon from "../../../icons/FogRemoveIcon";
import FogToggleIcon from "../../../icons/FogToggleIcon";
import FogRectangleIcon from "../../../icons/FogRectangleIcon";
import UndoButton from "./UndoButton";
import RedoButton from "./RedoButton";
@@ -45,6 +46,8 @@ function BrushToolSettings({
onSettingChange({ preview: !settings.preview });
} else if (key === "c") {
onSettingChange({ useFogCut: !settings.useFogCut });
} else if (key === "r") {
onSettingChange({ type: "rectangle" });
} else if (
(key === "z" || key === "Z") &&
(ctrlKey || metaKey) &&
@@ -78,6 +81,12 @@ function BrushToolSettings({
isSelected: settings.type === "polygon",
icon: <FogPolygonIcon />,
},
{
id: "rectangle",
title: "Fog Rectangle (R)",
isSelected: settings.type === "rectangle",
icon: <FogRectangleIcon />,
},
{
id: "brush",
title: "Fog Brush (B)",