canvis cosmetics
This commit is contained in:
@@ -465,11 +465,20 @@ void MapEditor::handleEvent(const SDL_Event& event) { // NOLINT(readability-fun
|
||||
if (event.type == SDL_EVENT_KEY_DOWN && static_cast<int>(event.key.repeat) == 0) {
|
||||
std::string direction;
|
||||
switch (event.key.key) {
|
||||
case SDLK_UP: direction = "UP"; break;
|
||||
case SDLK_DOWN: direction = "DOWN"; break;
|
||||
case SDLK_LEFT: direction = "LEFT"; break;
|
||||
case SDLK_RIGHT: direction = "RIGHT"; break;
|
||||
default: break;
|
||||
case SDLK_UP:
|
||||
direction = "UP";
|
||||
break;
|
||||
case SDLK_DOWN:
|
||||
direction = "DOWN";
|
||||
break;
|
||||
case SDLK_LEFT:
|
||||
direction = "LEFT";
|
||||
break;
|
||||
case SDLK_RIGHT:
|
||||
direction = "RIGHT";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (!direction.empty() && GameControl::get_adjacent_room) {
|
||||
std::string adjacent = GameControl::get_adjacent_room(direction);
|
||||
|
||||
Reference in New Issue
Block a user