- Treballant en millorar el editor
This commit is contained in:
@@ -162,7 +162,7 @@ void btn_opt(const char* label, const int x, const int y, uint8_t &var, std::vec
|
|||||||
pos++;
|
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)
|
if (result)
|
||||||
{
|
{
|
||||||
pos++; if (pos==values.size()) pos=0;
|
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;
|
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)
|
if (result)
|
||||||
{
|
{
|
||||||
pos++; if (pos==values.size()) pos=0;
|
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)
|
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;
|
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)
|
if (result)
|
||||||
{
|
{
|
||||||
const int len = strlen(var);
|
const int len = strlen(var);
|
||||||
@@ -255,6 +255,9 @@ bool game::loop()
|
|||||||
room::draw2();
|
room::draw2();
|
||||||
//draw::draw(148+sx*2-sy*2, 67+sx+sy,24,24,24,0);
|
//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,0,input::mouseX());
|
||||||
print(0,20,input::mouseY());
|
print(0,20,input::mouseY());
|
||||||
print(0,30,input::mouseBtn(1)?1:0);
|
print(0,30,input::mouseBtn(1)?1:0);
|
||||||
@@ -293,7 +296,7 @@ bool game::loop()
|
|||||||
if (act)
|
if (act)
|
||||||
{
|
{
|
||||||
btn_txt("NAME:", 330, 40, act->name);
|
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);
|
draw::freeSurface(act->surface);
|
||||||
act->surface = draw::loadSurface(act->bmp);
|
act->surface = draw::loadSurface(act->bmp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user