- [ONGOING] Implementant el menú de tecles, que jdes m'ha distret i m'he quedat a meitant

This commit is contained in:
2024-07-08 14:00:43 +02:00
parent c7f6ad7538
commit 1e216bfd24
2 changed files with 56 additions and 0 deletions

38
source/m_menu_tecles.cpp Normal file
View File

@@ -0,0 +1,38 @@
#include "m_menu_tecles.h"
#include "jdraw.h"
namespace modules
{
namespace menu_tecles
{
int selected_option = MENU_TECLES_AMUNT;
void init()
{
selected_option = MENU_TECLES_AMUNT;
}
int loop()
{
draw::cls(2);
draw::color(1);
draw::print2("REDEFINIR TECLES", 13, 3, YELLOW, FONT_ZOOM_VERTICAL);
int pos = 10;
static char *textos[6] = { "AMUNT:", "AVALL:", "ESQUERRA:", "DRETA:", "BOTAR: ", "AGAFAR: " };
for (int i=0; i<6; ++i)
{
draw::print2(i==selected_option?"fg":"de", 13, pos, i==selected_option?YELLOW:TEAL, i==selected_option?FONT_ZOOM_VERTICAL:FONT_ZOOM_NONE);
draw::print2(textos[i], 18, pos, i==selected_option?YELLOW:TEAL, i==selected_option?FONT_ZOOM_VERTICAL:FONT_ZOOM_NONE);
}
draw::print2("(C) JAILDOCTOR 2024", 11, 28, TEAL, FONT_ZOOM_NONE);
draw::render();
return MENU_TECLES_NONE;
}
}
}