animacions al menu

This commit is contained in:
2026-04-05 01:15:45 +02:00
parent 4238ae1bc4
commit 5ac570df0f
3 changed files with 183 additions and 56 deletions

View File

@@ -14,6 +14,8 @@ class Text {
// Pinta texto sobre un buffer ARGB de 320x200
void draw(Uint32* pixel_data, int x, int y, const char* text, Uint32 color) const;
void drawCentered(Uint32* pixel_data, int y, const char* text, Uint32 color) const;
// Com draw, però clippat a [clip_x_min, clip_x_max) × [clip_y_min, clip_y_max)
void drawClipped(Uint32* pixel_data, int x, int y, const char* text, Uint32 color, int clip_x_min, int clip_x_max, int clip_y_min, int clip_y_max) const;
// Calcula ancho en píxeles d'un text
[[nodiscard]] auto width(const char* text) const -> int;