文档目录
ME 驱动器界面
176×201 ME 驱动器界面:2×5 存储元件槽、优先级标签与玩家背包。
ME 驱动器物品栏
import type { ScreenSlot } from "@tennantite/ui";
import { Ae2DriveScreen } from "./index";
const STORAGE_ITEMS: ScreenSlot[] = [
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
{ count: 1, icon: "emerald", tooltip: "存储元件" },
];
/**
* Ae2DriveScreen 预览用例:10 个存储元件槽。
*/
export function Ae2DriveScreenDemo() {
return (
<Ae2DriveScreen
items={STORAGE_ITEMS}
mainItems={[
{ count: 64, icon: "stone-block", tooltip: "石头" },
{ count: 16, icon: "emerald", tooltip: "绿宝石" },
]}
/>
);
}
安装
$pnpm add @tennantite/ae2npm 方式安装编译产物;需要改造源码请用上方的 CLI 拷贝安装。
源码
packages/ae2/src/ae2-drive-screen/index.tsxnpm 包保留源码目录,可直接复制改造。