- Editor més bonic, comencem a implementar el anar d'una habitació a altra i crear noves

This commit is contained in:
2024-06-13 14:04:15 +02:00
parent a1901a725d
commit acc6f9cd00

View File

@@ -202,7 +202,7 @@ const bool btn_opt(const char* label, const int x, const int y, int &var, std::v
pos++; pos++;
} }
result = ui::combo(labels[pos].c_str(), x+31, y, 96-w, 11); result = ui::combo(labels[pos].c_str(), x+w-1, y, 96-w, 11);
if (result) if (result)
{ {
pos++; if (pos==values.size()) pos=0; pos++; if (pos==values.size()) pos=0;
@@ -498,37 +498,63 @@ switch (section)
ui::label("DOOR HEIGHTS", 2, line, 96, 11, GRAY); line+=10; ui::label("DOOR HEIGHTS", 2, line, 96, 11, GRAY); line+=10;
ui::label("XN", 2, line, 64, 11); ui::label("XN", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refDoor(XN), -1, 5); changed |= btn_small(48, line, room::editor::refDoor(XN), -1, 5, 50);
line += 10; line += 10;
ui::label("YP", 2, line, 64, 11); ui::label("YP", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refDoor(YP), -1, 5); changed |= btn_small(48, line, room::editor::refDoor(YP), -1, 5, 50);
line += 10; line += 10;
ui::label("XP", 2, line, 64, 11); ui::label("XP", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refDoor(XP), -1, 5); changed |= btn_small(48, line, room::editor::refDoor(XP), -1, 5, 50);
line += 10; line += 10;
ui::label("YN", 2, line, 64, 11); ui::label("YN", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refDoor(YN), -1, 5); changed |= btn_small(48, line, room::editor::refDoor(YN), -1, 5, 50);
line += 10; line += 10;
ui::label("TEXTURES", 2, line, 96, 11, GRAY); line+=10; ui::label("TEXTURES", 2, line, 96, 11, GRAY); line+=10;
changed |= btn_opt("COLOR", 2, line, room::editor::refColor(), {5, 6, 7, 8, 9, 10, 11}, {"BLUE", "RED", "PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"}); changed |= btn_opt("COLOR", 2, line, room::editor::refColor(), {5, 6, 7, 8, 9, 10, 11}, {"BLUE", "RED", "PURPLE", "GREEN", "CYAN", "YELLOW", "WHITE"}, 47); //ui::label("COLOR", 2, line, 64, 11);
//ui::label("COLOR", 2, line, 64, 11);
//changed |= btn_small(64, line, room::editor::refColor(), 5, 11); //changed |= btn_small(64, line, room::editor::refColor(), 5, 11);
line += 10; line += 10;
ui::label("FLOOR", 2, line, 64, 11); ui::label("FLOOR", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refFloorTex(), 0, 5); changed |= btn_small(48, line, room::editor::refFloorTex(), 0, 5, 50);
line += 10; line += 10;
ui::label("WALL", 2, line, 64, 11); ui::label("WALL", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refWallTex(), 0, 5); changed |= btn_small(48, line, room::editor::refWallTex(), 0, 5, 50);
line += 10; line += 10;
ui::label("DOOR", 2, line, 64, 11); ui::label("DOOR", 2, line, 48, 11);
changed |= btn_small(64, line, room::editor::refDoorTex(), 0, 4); changed |= btn_small(48, line, room::editor::refDoorTex(), 0, 4, 50);
line += 10; line += 10;
ui::label("UNDER DOOR", 2, line, 48, 11); ui::label("UNDER DOOR", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, 5, 50); changed |= btn_small(48, line, room::editor::refWallDoorTex(), 0, 5, 50);
ui::label("EXITS", 2, line, 96, 11, GRAY); line+=10;
ui::label("XN", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refExit(XN), -1, 64, 36);
if (ui::button("GO", 84, line, 13, 11)) room::load(room::editor::refExit(XN));
line += 10;
ui::label("YP", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refExit(YP), -1, 64, 36);
ui::button("GO", 84, line, 13, 11);
line += 10;
ui::label("XP", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refExit(XP), -1, 64, 36);
ui::button("GO", 84, line, 13, 11);
line += 10;
ui::label("YN", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refExit(YN), -1, 64, 36);
ui::button("GO", 84, line, 13, 11);
line += 10;
ui::label("ZP", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refExit(ZP), -1, 64, 36);
ui::button("GO", 84, line, 13, 11);
line += 10;
ui::label("ZN", 2, line, 48, 11);
changed |= btn_small(48, line, room::editor::refExit(ZN), -1, 64, 36);
ui::button("GO", 84, line, 13, 11);
line += 10;
/*changed |= btn("COLOR:", 10, 140, room::editor::refColor(), 5, 11); /*changed |= btn("COLOR:", 10, 140, room::editor::refColor(), 5, 11);
changed |= btn("FLOOR:", 10, 155, room::editor::refFloorTex(), 0, 5); changed |= btn("FLOOR:", 10, 155, room::editor::refFloorTex(), 0, 5);
changed |= btn("WALLS:", 10, 170, room::editor::refWallTex(), 0, 5); changed |= btn("WALLS:", 10, 170, room::editor::refWallTex(), 0, 5);