Files
bworld/client/gui/gui_atlas.ts
T
2026-10-31 17:35:27 -03:00

39 lines
2.5 KiB
TypeScript

// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
// made by tools/pack_gui.ts, where each gui sprite is in assets/sprites/gui.png. border is the nine slice border as
// left, top, right, bottom, all 0 for sprites drawn whole
export const GUI_ATLAS = {
button: { x: 0, y: 108, width: 200, height: 20, border: [3, 3, 3, 3] },
button_highlighted: { x: 0, y: 129, width: 200, height: 20, border: [3, 3, 3, 3] },
button_disabled: { x: 0, y: 150, width: 200, height: 20, border: [3, 3, 3, 3] },
text_field: { x: 0, y: 171, width: 200, height: 20, border: [2, 2, 2, 2] },
text_field_highlighted: { x: 0, y: 192, width: 200, height: 20, border: [2, 2, 2, 2] },
panel: { x: 236, y: 192, width: 12, height: 12, border: [4, 4, 4, 4] },
tooltip: { x: 0, y: 0, width: 84, height: 84, border: [3, 3, 3, 3] },
slot: { x: 201, y: 192, width: 18, height: 18, border: [0, 0, 0, 0] },
slot_highlight_back: { x: 85, y: 0, width: 24, height: 24, border: [4, 4, 4, 4] },
slot_highlight_front: { x: 110, y: 0, width: 24, height: 24, border: [4, 4, 4, 4] },
hotbar: { x: 0, y: 85, width: 182, height: 22, border: [0, 0, 0, 0] },
hotbar_selection: { x: 135, y: 0, width: 24, height: 23, border: [0, 0, 0, 0] },
crosshair: { x: 220, y: 192, width: 15, height: 15, border: [0, 0, 0, 0] },
heart_container: { x: 0, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
heart_full: { x: 10, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
heart_half: { x: 20, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
food_empty: { x: 30, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
food_full: { x: 40, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
food_half: { x: 50, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
saturation_1: { x: 60, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
saturation_2: { x: 70, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
saturation_3: { x: 80, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
saturation_4: { x: 90, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
// drawn by hand, not from a resource pack
air_empty: { x: 100, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
air_full: { x: 110, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
air_half: { x: 120, y: 213, width: 9, height: 9, border: [0, 0, 0, 0] },
// the slot with modern industrialization's fluid slot droplet, drawn over it by hand
fluid_slot: { x: 160, y: 0, width: 18, height: 18, border: [0, 0, 0, 0] },
} as const;
export type GuiSprite = keyof typeof GUI_ATLAS;