Add 'invert colors' checkbox.
rodzic
aa07e83ed7
commit
34f1da481a
|
@ -263,16 +263,6 @@ export const CREATURE_DESIGN_DEFAULTS: CreatureDesign = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function changeCreatureSymbol(
|
|
||||||
creature: CreatureSymbol,
|
|
||||||
data: SvgSymbolData
|
|
||||||
): CreatureSymbol {
|
|
||||||
return {
|
|
||||||
...creature,
|
|
||||||
data,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const CreatureEditorWidget: React.FC<{
|
const CreatureEditorWidget: React.FC<{
|
||||||
creature: CreatureSymbol;
|
creature: CreatureSymbol;
|
||||||
onChange: (symbol: CreatureSymbol) => void;
|
onChange: (symbol: CreatureSymbol) => void;
|
||||||
|
@ -285,10 +275,15 @@ const CreatureEditorWidget: React.FC<{
|
||||||
<VocabularyWidget
|
<VocabularyWidget
|
||||||
label="Symbol"
|
label="Symbol"
|
||||||
value={creature.data}
|
value={creature.data}
|
||||||
onChange={(data) => onChange(changeCreatureSymbol(creature, data))}
|
onChange={(data) => onChange({ ...creature, data })}
|
||||||
choices={SvgVocabularyWithBlank}
|
choices={SvgVocabularyWithBlank}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<Checkbox
|
||||||
|
label="Invert colors"
|
||||||
|
value={creature.invertColors}
|
||||||
|
onChange={(invertColors) => onChange({ ...creature, invertColors })}
|
||||||
|
/>
|
||||||
</details>
|
</details>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Ładowanie…
Reference in New Issue