Remove duplicate code

This commit is contained in:
2026-10-13 11:57:43 -03:00
parent dfc6a6d77b
commit 5165698fe3
50 changed files with 307 additions and 812 deletions
+11
View File
@@ -115,6 +115,17 @@ interface Graphics {
measure_text(text: string, scale?: number): number;
// any texture. part is [u, v, width, height] from 0 to 1, the part of it to draw, like a progress bar's filled part
texture(id: string, x: number, y: number, w: number, h: number, part?: [u, v, w, h]): void;
// full drawn over empty, filled from 0 to 1 of the way from the left, or from the bottom when direction is "up"
progress(
empty: string,
full: string,
x: number,
y: number,
w: number,
h: number,
filled: number,
direction?: "right" | "up",
): void;
item(id: string, x: number, y: number, count?: number): void; // an item as a slot shows it
clip(x: number, y: number, w: number, h: number, draw: () => void): void; // only draws inside the box