Skip to content

Commit

Permalink
Ability to open debug menu in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy committed Jul 13, 2023
1 parent 23131b0 commit e428b21
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,17 @@ Editor::update_keyboard(const Controller& controller)
return;
}


if (!MenuManager::instance().has_dialog())
{
if (controller.pressed(Control::ESCAPE)) {
esc_press();
return;
}
if (controller.pressed(Control::DEBUG_MENU) && g_config->developer_mode)
{
MenuManager::instance().set_menu(MenuStorage::DEBUG_MENU);
}
if (controller.hold(Control::LEFT)) {
scroll({ -m_scroll_speed, 0.0f });
}
Expand Down Expand Up @@ -683,7 +687,7 @@ Editor::setup()
m_enabled = true;
m_toolbox_widget->update_mouse_icon();
}

}

void
Expand Down Expand Up @@ -742,7 +746,7 @@ Editor::event(const SDL_Event& ev)
}
}



if (ev.type == SDL_KEYDOWN && ev.key.keysym.sym == SDLK_F6) {
Compositor::s_render_lighting = !Compositor::s_render_lighting;
Expand Down

0 comments on commit e428b21

Please sign in to comment.