[studio] Make new dir window OK on Enter key
All checks were successful
Build / build (push) Successful in 3m17s
All checks were successful
Build / build (push) Successful in 3m17s
This commit is contained in:
parent
800ca85176
commit
500b93562c
@ -46,6 +46,10 @@ void NewDir::draw(StudioContext &ctx) noexcept {
|
|||||||
ImGui::SetKeyboardFocusHere();
|
ImGui::SetKeyboardFocusHere();
|
||||||
}
|
}
|
||||||
ig::InputText("Name", m_str);
|
ig::InputText("Name", m_str);
|
||||||
|
if (ImGui::IsItemFocused() && ImGui::IsKeyPressed(ImGuiKey_Enter)) {
|
||||||
|
newDir.emit(m_path + "/" + m_str);
|
||||||
|
close();
|
||||||
|
}
|
||||||
if (ig::PopupControlsOkCancel(m_open) == ig::PopupResponse::OK) {
|
if (ig::PopupControlsOkCancel(m_open) == ig::PopupResponse::OK) {
|
||||||
newDir.emit(m_path + "/" + m_str);
|
newDir.emit(m_path + "/" + m_str);
|
||||||
close();
|
close();
|
||||||
|
Loading…
Reference in New Issue
Block a user