文档目录
工具箱界面
工具箱:背景 blit 于 topPos-17(源区 176×255),工具/护甲/着色器/食物/杂项五组 23 槽,176×238
工具箱物品栏
import { IeToolboxScreen } from "./index";
/**
* IeToolboxScreen 预览用例:装好工具/护甲/食物的工具箱。
*/
export function IeToolboxScreenDemo() {
return (
<IeToolboxScreen
armor={[{ icon: "iron-ingot", tooltip: "护目镜" }, { icon: "iron-ingot", tooltip: "胸甲" }, null]}
food={Array.from({ length: 6 }, (_, i) => i < 3 ? { count: 8, icon: "charcoal", tooltip: "面包" } : null)}
misc={Array.from({ length: 7 }, (_, i) => i < 2 ? { count: 16, icon: "charcoal", tooltip: "火把" } : null)}
onSlotClick={() => {}}
shaders={[{ icon: "iron-ingot", tooltip: "着色器" }, null, null, null]}
tools={[{ icon: "iron-ingot", tooltip: "工程师锤" }, { icon: "iron-ingot", tooltip: "断线钳" }, null]}
/>
);
}
安装
$pnpm add @tennantite/ienpm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ie/src/ie-toolbox-screen/index.tsxnpm 包保留源码目录,可直接复制改造。