- canvi de tecles en el editor
- actualitzada la versió de console per lo dels colorins - clang format
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath> // Para std::round
|
||||
#include <cstdio> // Para std::remove (borrar fichero)
|
||||
#include <filesystem> // Para directory_iterator (getAnimationCompletions)
|
||||
#include <fstream> // Para ifstream, ofstream
|
||||
#include <iostream> // Para cout
|
||||
#include <set> // Para set
|
||||
#include <cmath> // Para std::round
|
||||
#include <cstdio> // Para std::remove (borrar fichero)
|
||||
#include <filesystem> // Para directory_iterator (getAnimationCompletions)
|
||||
#include <fstream> // Para ifstream, ofstream
|
||||
#include <iostream> // Para cout
|
||||
#include <set> // Para set
|
||||
#include <system_error> // Para std::error_code
|
||||
|
||||
#include "core/input/mouse.hpp" // Para Mouse
|
||||
@@ -489,8 +489,8 @@ void MapEditor::handleEvent(const SDL_Event& event) { // NOLINT(readability-fun
|
||||
return;
|
||||
}
|
||||
|
||||
// 7: alternar entre draw y collision
|
||||
if (event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_7 && static_cast<int>(event.key.repeat) == 0) {
|
||||
// 8: alternar entre draw y collision
|
||||
if (event.type == SDL_EVENT_KEY_DOWN && event.key.key == SDLK_8 && static_cast<int>(event.key.repeat) == 0) {
|
||||
setEditingCollision(!editing_collision_);
|
||||
return;
|
||||
}
|
||||
@@ -1520,11 +1520,20 @@ auto MapEditor::getSetCompletions() const -> std::vector<std::string> {
|
||||
auto MapEditor::getAnimationCompletions() const -> std::vector<std::string> {
|
||||
const char* folder = nullptr;
|
||||
switch (selection_.type) {
|
||||
case EntityType::ENEMY: folder = "data/enemies"; break;
|
||||
case EntityType::PLATFORM: folder = "data/platforms"; break;
|
||||
case EntityType::KEY: folder = "data/keys"; break;
|
||||
case EntityType::DOOR: folder = "data/doors"; break;
|
||||
default: return {};
|
||||
case EntityType::ENEMY:
|
||||
folder = "data/enemies";
|
||||
break;
|
||||
case EntityType::PLATFORM:
|
||||
folder = "data/platforms";
|
||||
break;
|
||||
case EntityType::KEY:
|
||||
folder = "data/keys";
|
||||
break;
|
||||
case EntityType::DOOR:
|
||||
folder = "data/doors";
|
||||
break;
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
std::vector<std::string> result;
|
||||
std::error_code ec;
|
||||
|
||||
Reference in New Issue
Block a user