Squashed 'deps/nostalgia/' changes from 6bc629e0..2016f6e6

2016f6e6 [studio] Fix DeleteConfirmation 'No' option to not delete file

git-subtree-dir: deps/nostalgia
git-subtree-split: 2016f6e605207caade93cb868dce1557b2aacac5
This commit is contained in:
2025-01-19 20:18:56 -06:00
parent 7e20f72009
commit 8e0b6ffbab

View File

@ -43,9 +43,16 @@ void DeleteConfirmation::draw(StudioContext &ctx) noexcept {
case Stage::Open:
drawWindow(ctx.tctx, m_open, [this] {
ImGui::Text("Are you sure you want to delete %s?", m_path.c_str());
if (ig::PopupControlsOkCancel(m_open, "Yes", "No") != ig::PopupResponse::None) {
switch (ig::PopupControlsOkCancel(m_open, "Yes", "No")) {
case ig::PopupResponse::None:
break;
case ig::PopupResponse::OK:
deleteFile.emit(m_path);
close();
break;
case ig::PopupResponse::Cancel:
close();
break;
}
});
break;