small tank icons

This commit is contained in:
tresabhi committed 2026-08-04 19:54:08 -05:00
1 parent be0804ae59
commit 9968b2c83d
4 files changed
+58 -26

No files matched your search

@@ -1,6 +1,5 @@
import { asset } from '@blitzkit/core';
import { GenericTankComponentButton } from './GenericTankComponentButton';
import type { TankComponentButtonProps } from './TankComponentButton';
import { GenericTankComponentButton } from "./GenericTankComponentButton";
import type { TankComponentButtonProps } from "./TankComponentButton";
interface ModuleProps extends TankComponentButtonProps {
module: string;
@@ -9,11 +8,11 @@ interface ModuleProps extends TankComponentButtonProps {
export function ModuleButton({ module, ...props }: ModuleProps) {
return (
<GenericTankComponentButton
icon={asset(`icons/modules/${module}.webp`)}
icon={`/api/icons/modules/${module}.webp`}
iconStyles={{
top: '50%',
left: '50%',
transform: 'translate(calc(-50% + 2px), calc(-50% + 2px))',
top: "50%",
left: "50%",
transform: "translate(calc(-50% + 2px), calc(-50% + 2px))",
}}
{...props}
/>
@@ -1,5 +1,3 @@
import { asset } from '@blitzkit/core';
interface SmallTankIconProps {
id: number;
size?: number;
@@ -13,16 +11,16 @@ export function SmallTankIcon({ id, size = HEIGHT }: SmallTankIconProps) {
<div
style={{
height: size,
overflow: 'hidden',
overflow: "hidden",
width: WIDTH * (size / HEIGHT),
}}
>
<img
alt={`Tank ${id}`}
src={asset(`icons/tanks/small/${id}.webp`)}
src={`/tanks/${id}/icons/small.webp`}
style={{
transform: `scale(${(size / HEIGHT) * 100}%)`,
transformOrigin: 'top left',
transformOrigin: "top left",
}}
/>
</div>