From acc6f9cd006c9b61057c24173ff4c1ab427b82ba Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Thu, 13 Jun 2024 14:04:15 +0200 Subject: [PATCH] =?UTF-8?q?-=20Editor=20m=C3=A9s=20bonic,=20comencem=20a?= =?UTF-8?q?=20implementar=20el=20anar=20d'una=20habitaci=C3=B3=20a=20altra?= =?UTF-8?q?=20i=20crear=20noves?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main.cpp | 60 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/source/main.cpp b/source/main.cpp index b81e2d2..741f6ba 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -202,7 +202,7 @@ const bool btn_opt(const char* label, const int x, const int y, int &var, std::v 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) { 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("XN", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refDoor(XN), -1, 5); + ui::label("XN", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refDoor(XN), -1, 5, 50); line += 10; - ui::label("YP", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refDoor(YP), -1, 5); + ui::label("YP", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refDoor(YP), -1, 5, 50); line += 10; - ui::label("XP", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refDoor(XP), -1, 5); + ui::label("XP", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refDoor(XP), -1, 5, 50); line += 10; - ui::label("YN", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refDoor(YN), -1, 5); + ui::label("YN", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refDoor(YN), -1, 5, 50); 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"}); - //ui::label("COLOR", 2, line, 64, 11); + 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); //changed |= btn_small(64, line, room::editor::refColor(), 5, 11); line += 10; - ui::label("FLOOR", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refFloorTex(), 0, 5); + ui::label("FLOOR", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refFloorTex(), 0, 5, 50); line += 10; - ui::label("WALL", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refWallTex(), 0, 5); + ui::label("WALL", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refWallTex(), 0, 5, 50); line += 10; - ui::label("DOOR", 2, line, 64, 11); - changed |= btn_small(64, line, room::editor::refDoorTex(), 0, 4); + ui::label("DOOR", 2, line, 48, 11); + changed |= btn_small(48, line, room::editor::refDoorTex(), 0, 4, 50); line += 10; ui::label("UNDER DOOR", 2, line, 48, 11); 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("FLOOR:", 10, 155, room::editor::refFloorTex(), 0, 5); changed |= btn("WALLS:", 10, 170, room::editor::refWallTex(), 0, 5);