Add fog edit opacity

This commit is contained in:
Mitchell McCaffrey
2021-04-09 15:35:57 +10:00
parent c7aac9d2ce
commit b9ce0fd03d
3 changed files with 26 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ function SettingsModal({ isOpen, onRequestClose }) {
"map.gridSnappingSensitivity"
);
const [showFogGuides, setShowFogGuides] = useSetting("fog.showGuides");
const [fogEditOpacity, setFogEditOpacity] = useSetting("fog.editOpacity");
const [storageEstimate, setStorageEstimate] = useState();
const [isImportExportModalOpen, setIsImportExportModalOpen] = useState(false);
@@ -111,6 +112,19 @@ function SettingsModal({ isOpen, onRequestClose }) {
onChange={(e) => setShowFogGuides(e.target.checked)}
/>
</Label>
<Label py={2}>
Fog Edit Opacity
<Slider
step={0.05}
min={0}
max={1}
ml={1}
sx={{ width: "initial" }}
value={fogEditOpacity}
onChange={(e) => setFogEditOpacity(parseFloat(e.target.value))}
labelFunc={(value) => `${Math.round(value * 100)}%`}
/>
</Label>
<Label py={2}>
Token Label Size
<Slider