afegir i borrar rooms

This commit is contained in:
2026-04-02 22:14:19 +02:00
parent cea5492abc
commit 7287d65ca3
4 changed files with 336 additions and 11 deletions

View File

@@ -43,6 +43,8 @@ class MapEditor {
// Comandos para propiedades de la habitación
auto setRoomProperty(const std::string& property, const std::string& value) -> std::string;
auto createNewRoom(const std::string& direction = "") -> std::string;
auto deleteRoom() -> std::string;
// Opciones del editor (llamados desde console_commands / teclas)
auto showInfo(bool show) -> std::string;
@@ -106,6 +108,9 @@ class MapEditor {
void handleMouseUp();
void updateDrag();
void autosave();
auto getAssetsYamlPath() -> std::string;
void addRoomToAssetsYaml(const std::string& room_name);
void removeRoomFromAssetsYaml(const std::string& room_name);
void updateStatusBarInfo();
static auto snapToGrid(float value) -> float;
static auto pointInRect(float px, float py, const SDL_FRect& rect) -> bool;