From 94dfd090d3f5f2edc3f05981136651a5797e3104 Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Thu, 5 Oct 2023 20:03:15 +0200 Subject: [PATCH] - Treballant en millorar el editor --- source/main.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index 102e537..6cb8e08 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -162,7 +162,7 @@ void btn_opt(const char* label, const int x, const int y, uint8_t &var, std::vec pos++; } - result = ui::button(labels[pos].c_str(), x+32, y, 56, 11, TEAL, LIGHT+TEAL, LIGHT+PURPLE); + result = ui::combo(labels[pos].c_str(), x+32, y, 56, 11); if (result) { pos++; if (pos==values.size()) pos=0; @@ -182,7 +182,7 @@ bool btn_opt2(const char* label, const int x, const int y, char *var, std::vecto } if (pos==values.size()) pos = 0; - result = ui::button(var, x+32, y, 56, 11, TEAL, LIGHT+TEAL, LIGHT+PURPLE); + result = ui::combo(var, x+32, y, 56, 11); if (result) { pos++; if (pos==values.size()) pos=0; @@ -202,9 +202,9 @@ const uint8_t scancode_to_char(const uint8_t scancode) void btn_txt(const char* label, const int x, const int y, char *var) { - draw::print(label, x, y+3, 15, 0); + draw::print(label, x, y+3, PAPER, 0); int result = 0; - result = ui::textbox(var, x+22, y, 66, 11, WHITE, LIGHT+WHITE); + result = ui::textbox(var, x+22, y, 66, 11, LIGHT+WHITE, LIGHT+YELLOW); if (result) { const int len = strlen(var); @@ -255,6 +255,9 @@ bool game::loop() room::draw2(); //draw::draw(148+sx*2-sy*2, 67+sx+sy,24,24,24,0); + draw::color(WHITE); + draw::fillrect(320, 0, 100, 240); + print(0,0,input::mouseX()); print(0,20,input::mouseY()); print(0,30,input::mouseBtn(1)?1:0); @@ -293,7 +296,7 @@ bool game::loop() if (act) { btn_txt("NAME:", 330, 40, act->name); - if (btn_opt2("BMP:", 330, 55, act->bmp, gifs)) { + if (btn_opt2("BMP:", 330, 51, act->bmp, gifs)) { draw::freeSurface(act->surface); act->surface = draw::loadSurface(act->bmp); }