mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: camouflage
This commit is contained in:
1 parent
38870ca3f7
commit
561b59d235
7 files changed
+81
-41
No files matched your search
@@ -25,6 +25,9 @@ type ModuleButtonProps = Omit<ComponentProps<typeof Button>, 'type'> & {
|
||||
type: 'consumable';
|
||||
consumable: number;
|
||||
}
|
||||
| {
|
||||
type: 'camouflage';
|
||||
}
|
||||
);
|
||||
|
||||
export function ModuleButton({
|
||||
@@ -49,6 +52,10 @@ export function ModuleButton({
|
||||
imageStyles.top = '50%';
|
||||
imageStyles.left = '50%';
|
||||
imageStyles.transform = 'translate(calc(-50% + 2px), calc(-50% + 2px))';
|
||||
} else if (props.type === 'camouflage') {
|
||||
imageStyles.top = '50%';
|
||||
imageStyles.left = '50%';
|
||||
imageStyles.transform = 'translate(calc(-50% + 4px), calc(-50% + 4px))';
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -80,7 +87,9 @@ export function ModuleButton({
|
||||
? `icons/shells/${props.shell}.webp`
|
||||
: props.type === 'consumable'
|
||||
? `icons/consumables/${props.consumable}.webp`
|
||||
: `icons/equipment/${props.equipment}.webp`,
|
||||
: props.type === 'camouflage'
|
||||
? `icons/camo.webp`
|
||||
: `icons/equipment/${props.equipment}.webp`,
|
||||
)}
|
||||
style={imageStyles}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user