works with overwrite warning
This commit is contained in:
+13
-2
@@ -21,6 +21,13 @@ using namespace glm;
|
|||||||
|
|
||||||
namespace anm2ed::imgui
|
namespace anm2ed::imgui
|
||||||
{
|
{
|
||||||
|
bool Taskbar::save_requires_special_prompt(Manager& manager, Settings& settings, int index) const
|
||||||
|
{
|
||||||
|
auto* document = manager.get(index);
|
||||||
|
return document && settings.fileIsSpecialInterpolatedFramesOnSaveReminder &&
|
||||||
|
document->anm2.has_special_interpolated_frames();
|
||||||
|
}
|
||||||
|
|
||||||
void Taskbar::save_execute(Manager& manager, Settings& settings, const PendingSave& request, bool bakeFrames)
|
void Taskbar::save_execute(Manager& manager, Settings& settings, const PendingSave& request, bool bakeFrames)
|
||||||
{
|
{
|
||||||
manager.save(request.index, request.path, (anm2::Compatibility)settings.fileCompatibility, bakeFrames,
|
manager.save(request.index, request.path, (anm2::Compatibility)settings.fileCompatibility, bakeFrames,
|
||||||
@@ -104,7 +111,9 @@ namespace anm2ed::imgui
|
|||||||
|
|
||||||
if (ImGui::MenuItem(localize.get(BASIC_SAVE), settings.shortcutSave.c_str(), false, document))
|
if (ImGui::MenuItem(localize.get(BASIC_SAVE), settings.shortcutSave.c_str(), false, document))
|
||||||
{
|
{
|
||||||
if (settings.fileIsWarnOverwrite)
|
if (save_requires_special_prompt(manager, settings, manager.selected))
|
||||||
|
save_request(manager, settings, manager.selected, document->path);
|
||||||
|
else if (settings.fileIsWarnOverwrite)
|
||||||
overwritePopup.open();
|
overwritePopup.open();
|
||||||
else
|
else
|
||||||
save_request(manager, settings, manager.selected, document->path);
|
save_request(manager, settings, manager.selected, document->path);
|
||||||
@@ -332,7 +341,9 @@ namespace anm2ed::imgui
|
|||||||
if (shortcut(manager.chords[SHORTCUT_OPEN], shortcut::GLOBAL)) dialog.file_open(Dialog::ANM2_OPEN);
|
if (shortcut(manager.chords[SHORTCUT_OPEN], shortcut::GLOBAL)) dialog.file_open(Dialog::ANM2_OPEN);
|
||||||
if (shortcut(manager.chords[SHORTCUT_SAVE], shortcut::GLOBAL))
|
if (shortcut(manager.chords[SHORTCUT_SAVE], shortcut::GLOBAL))
|
||||||
{
|
{
|
||||||
if (settings.fileIsWarnOverwrite)
|
if (save_requires_special_prompt(manager, settings))
|
||||||
|
save_request(manager, settings);
|
||||||
|
else if (settings.fileIsWarnOverwrite)
|
||||||
overwritePopup.open();
|
overwritePopup.open();
|
||||||
else
|
else
|
||||||
save_request(manager, settings);
|
save_request(manager, settings);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ namespace anm2ed::imgui
|
|||||||
bool isQuittingMode{};
|
bool isQuittingMode{};
|
||||||
PendingSave pendingSave{};
|
PendingSave pendingSave{};
|
||||||
|
|
||||||
|
bool save_requires_special_prompt(Manager&, Settings&, int = -1) const;
|
||||||
void save_execute(Manager&, Settings&, const PendingSave&, bool);
|
void save_execute(Manager&, Settings&, const PendingSave&, bool);
|
||||||
bool save_request(Manager&, Settings&, int = -1, const std::filesystem::path& = {});
|
bool save_request(Manager&, Settings&, int = -1, const std::filesystem::path& = {});
|
||||||
|
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ namespace anm2ed
|
|||||||
X(LABEL_SPECIAL_INTERPOLATED_FRAMES_REMINDER_ON_SAVE, "Remind me when saving a document with frames with special interpolation modes", "Recordatorio de frames con interpolación especial al guardar", "Напоминание о кадрах со специальной интерполяцией при сохранении", "保存时特殊插值帧提醒", "저장 시 특수 보간 프레임 알림") \
|
X(LABEL_SPECIAL_INTERPOLATED_FRAMES_REMINDER_ON_SAVE, "Remind me when saving a document with frames with special interpolation modes", "Recordatorio de frames con interpolación especial al guardar", "Напоминание о кадрах со специальной интерполяцией при сохранении", "保存时特殊插值帧提醒", "저장 시 특수 보간 프레임 알림") \
|
||||||
X(LABEL_BAKE_SPECIAL_INTERPOLATED_FRAMES_ON_SAVE, "Automatically bake frames with special interpolation modes", "Hornear frames con interpolación especial al guardar", "Запекать кадры со специальной интерполяцией при сохранении", "保存时烘焙特殊插值帧", "저장 시 특수 보간 프레임 베이크") \
|
X(LABEL_BAKE_SPECIAL_INTERPOLATED_FRAMES_ON_SAVE, "Automatically bake frames with special interpolation modes", "Hornear frames con interpolación especial al guardar", "Запекать кадры со специальной интерполяцией при сохранении", "保存时烘焙特殊插值帧", "저장 시 특수 보간 프레임 베이크") \
|
||||||
X(LABEL_SPECIAL_INTERPOLATED_FRAMES_REMINDER_POPUP, "Special Interpolated Frames Reminder", "Recordatorio de frames con interpolación especial", "Напоминание о кадрах со специальной интерполяцией", "特殊插值帧提醒", "특수 보간 프레임 알림") \
|
X(LABEL_SPECIAL_INTERPOLATED_FRAMES_REMINDER_POPUP, "Special Interpolated Frames Reminder", "Recordatorio de frames con interpolación especial", "Напоминание о кадрах со специальной интерполяцией", "特殊插值帧提醒", "특수 보간 프레임 알림") \
|
||||||
X(LABEL_SPECIAL_INTERPOLATED_FRAMES_REMINDER_PROMPT, "Your document includes frames with special interpolated modes. The Binding of Isaac: Rebirth does not support these special interpolated modes for frames and animations will not be rendered correctly. However, these frames can be baked to maintain the animation. Would you like to automatically bake these frames now?", "Su documento incluye frames con modos de interpolación especial. The Binding of Isaac: Rebirth no admite estos modos de interpolación especial para frames y las animaciones no se renderizarán correctamente. Sin embargo, estos frames pueden hornearse para mantener la animación. ¿Desea hornear automáticamente estos frames ahora?", "Ваш документ содержит кадры со специальными режимами интерполяции. The Binding of Isaac: Rebirth не поддерживает эти специальные режимы интерполяции для кадров, и анимации не будут отображаться корректно. Однако эти кадры можно запечь, чтобы сохранить анимацию. Хотите автоматически запечь эти кадры сейчас?", "您的文档包含使用特殊插值模式的帧。The Binding of Isaac: Rebirth 不支持这些帧的特殊插值模式,动画将无法正确渲染。不过,这些帧可以通过烘焙来保持动画效果。是否要立即自动烘焙这些帧?", "문서에 특수 보간 모드를 사용하는 프레임이 포함되어 있습니다. The Binding of Isaac: Rebirth는 이러한 프레임의 특수 보간 모드를 지원하지 않으며 애니메이션이 올바르게 렌더링되지 않습니다. 하지만 이러한 프레임은 애니메이션을 유지하도록 베이크할 수 있습니다. 지금 이 프레임들을 자동으로 베이크하시겠습니까?") \
|
X(LABEL_SPECIAL_INTERPOLATED_FRAMES_REMINDER_PROMPT, "Your document includes frames with special interpolation modes. The Binding of Isaac: Rebirth does not support these special interpolation modes for frames and animations will not be rendered correctly. However, these frames can be baked to maintain the animation. Would you like to automatically bake these frames now?", "Su documento incluye frames con modos de interpolación especial. The Binding of Isaac: Rebirth no admite estos modos de interpolación especial para frames y las animaciones no se renderizarán correctamente. Sin embargo, estos frames pueden hornearse para mantener la animación. ¿Desea hornear automáticamente estos frames ahora?", "Ваш документ содержит кадры со специальными режимами интерполяции. The Binding of Isaac: Rebirth не поддерживает эти специальные режимы интерполяции для кадров, и анимации не будут отображаться корректно. Однако эти кадры можно запечь, чтобы сохранить анимацию. Хотите автоматически запечь эти кадры сейчас?", "您的文档包含使用特殊插值模式的帧。The Binding of Isaac: Rebirth 不支持这些帧的特殊插值模式,动画将无法正确渲染。不过,这些帧可以通过烘焙来保持动画效果。是否要立即自动烘焙这些帧?", "문서에 특수 보간 모드를 사용하는 프레임이 포함되어 있습니다. The Binding of Isaac: Rebirth는 이러한 프레임의 특수 보간 모드를 지원하지 않으며 애니메이션이 올바르게 렌더링되지 않습니다. 하지만 이러한 프레임은 애니메이션을 유지하도록 베이크할 수 있습니다. 지금 이 프레임들을 자동으로 베이크하시겠습니까?") \
|
||||||
X(LABEL_DONT_NOTIFY_ME_AGAIN, "Don't notify me again", "No volver a notificarme", "Больше не уведомлять", "不再提醒我", "다시 알리지 않기") \
|
X(LABEL_DONT_NOTIFY_ME_AGAIN, "Don't notify me again", "No volver a notificarme", "Больше не уведомлять", "不再提醒我", "다시 알리지 않기") \
|
||||||
X(LABEL_AUTOMATICALLY_BAKE_THESE_FRAMES_ON_SAVE, "Automatically bake these frames on save", "Hornear automáticamente estos frames al guardar", "Автоматически запекать эти кадры при сохранении", "保存时自动烘焙这些帧", "저장 시 이 프레임 자동 베이크") \
|
X(LABEL_AUTOMATICALLY_BAKE_THESE_FRAMES_ON_SAVE, "Automatically bake these frames on save", "Hornear automáticamente estos frames al guardar", "Автоматически запекать эти кадры при сохранении", "保存时自动烘焙这些帧", "저장 시 이 프레임 자동 베이크") \
|
||||||
X(LABEL_SAVE_BAKE_FRAMES, "Save (Bake Frames)", "Guardar (Hornear frames)", "Сохранить (Запечь кадры)", "保存(烘焙帧)", "저장 (프레임 베이크)") \
|
X(LABEL_SAVE_BAKE_FRAMES, "Save (Bake Frames)", "Guardar (Hornear frames)", "Сохранить (Запечь кадры)", "保存(烘焙帧)", "저장 (프레임 베이크)") \
|
||||||
|
|||||||
Reference in New Issue
Block a user