[jasper/world/studio] WorldEditor: suppress keyboard when popup open

This commit is contained in:
Gary Talent 2024-05-31 23:50:49 -05:00
parent bec487552f
commit 79d7f76407
2 changed files with 16 additions and 10 deletions

View File

@ -296,6 +296,7 @@ void WorldEditorImGui::drawWorldView() noexcept {
return handleDrop(fbPaneScale);
});
handleMouseSelection(fbPaneScale);
if (!popupOpen()) {
auto const&io = ImGui::GetIO();
if (io.KeyCtrl) {
if (io.KeysDown[ImGuiKey_G]) {
@ -309,6 +310,7 @@ void WorldEditorImGui::drawWorldView() noexcept {
}
}
}
}
void WorldEditorImGui::handleMouseSelection(float fbPaneScale) noexcept {
auto const&io = ImGui::GetIO();

View File

@ -104,6 +104,10 @@ class WorldEditorImGui: public studio::Editor {
ox::Result<ox::UUID> assetId() const noexcept;
ox::Error addDependency(ox::FileAddress const&fileAddr) noexcept;
constexpr bool popupOpen() const noexcept {
return m_sizeEditor.show;
}
};
}