Skip to content

Commit

Permalink
Prevent moving camera when any menu open
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy committed Jul 13, 2023
1 parent e428b21 commit edbea10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ Editor::update_keyboard(const Controller& controller)
}


if (!MenuManager::instance().has_dialog())
if (MenuManager::instance().current_menu() == nullptr)
{
if (controller.pressed(Control::ESCAPE)) {
esc_press();
Expand All @@ -415,6 +415,7 @@ Editor::update_keyboard(const Controller& controller)
if (controller.pressed(Control::DEBUG_MENU) && g_config->developer_mode)
{
MenuManager::instance().set_menu(MenuStorage::DEBUG_MENU);
return;
}
if (controller.hold(Control::LEFT)) {
scroll({ -m_scroll_speed, 0.0f });
Expand Down

0 comments on commit edbea10

Please sign in to comment.