import { GuiMenuScreen } from "./gui_screen.ts"; import { ClientInventories } from "../inventory.ts"; import { ClientMessage } from "$/common/protocol.ts"; import { player_menu } from "../menu.ts"; import type { ModGraphics } from "./mod_graphics.ts"; const WIDTH = 176; const HEIGHT = 166; // menu 0's screen: the crafting grid over the inventory. the recipes live on the server, which fills in the result export class GuiPlayerInventory extends GuiMenuScreen { constructor(inventories: ClientInventories, send: (message: ClientMessage) => void) { super(inventories, send, player_menu(inventories), WIDTH, HEIGHT); } render_background(g: ModGraphics): void { g.panel(0, 0, WIDTH, HEIGHT); } render_labels(g: ModGraphics): void { g.text(this.menu.title, 26, 6); g.text("Inventory", 8, 73); } }