- Sistema de menus operatiu, falta ficar-los tots

- Afegit .tap del Fernando Martín. Investigar perqué falla.
This commit is contained in:
2024-12-03 22:09:52 +01:00
parent 2ebe1916a4
commit 486bd648d3
10 changed files with 103 additions and 15 deletions

12
ui.cpp
View File

@@ -29,6 +29,8 @@ namespace ui
uint8_t offset_x = 0;
uint8_t offset_y = 0;
bool clicked = false;
void init()
{
surf = SDL_LoadBMP("font.bmp");
@@ -79,4 +81,14 @@ namespace ui
for (int i=0; i<strlen(text);++i) if (text[i]!=32) printchar(x+i, y, text[i]);
}
void setClicked(const bool value)
{
clicked = value;
}
const bool getClicked()
{
return clicked;
}
}