mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-26 03:35:23 +00:00
Request frame duration when opening sequences
This commit is contained in:
parent
277e24c799
commit
c67902dee3
@ -1033,6 +1033,7 @@ double_high = Double-high Pixels (1:2)
|
|||||||
title = Notice
|
title = Notice
|
||||||
description = Do you want to load the following files as an animation?
|
description = Do you want to load the following files as an animation?
|
||||||
repeat = Do the same for other files
|
repeat = Do the same for other files
|
||||||
|
duration = Duration
|
||||||
agree = &Agree
|
agree = &Agree
|
||||||
skip = &Skip
|
skip = &Skip
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
<view expansive="true" id="view" minwidth="128" minheight="64">
|
<view expansive="true" id="view" minwidth="128" minheight="64">
|
||||||
<listbox id="files" multiselect="true" />
|
<listbox id="files" multiselect="true" />
|
||||||
</view>
|
</view>
|
||||||
|
<hbox>
|
||||||
|
<label text="@.duration" />
|
||||||
|
<expr text="0" id="duration" suffix="ms" />
|
||||||
|
</hbox>
|
||||||
<separator horizontal="true" />
|
<separator horizontal="true" />
|
||||||
<check id="repeat" text="@.repeat" />
|
<check id="repeat" text="@.repeat" />
|
||||||
<check id="dont_show" text="@general.dont_show" />
|
<check id="dont_show" text="@general.dont_show" />
|
||||||
|
@ -385,6 +385,10 @@ FileOp* FileOp::createLoadDocumentOperation(Context* context,
|
|||||||
window.files()->getSelectedChild() != nullptr);
|
window.files()->getSelectedChild() != nullptr);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.duration()->setTextf("%d", fop->m_seq.duration);
|
||||||
|
window.duration()->Change.connect(
|
||||||
|
[&]() { fop->m_seq.duration = window.duration()->textInt(); });
|
||||||
|
|
||||||
window.openWindowInForeground();
|
window.openWindowInForeground();
|
||||||
|
|
||||||
// Don't show this alert again.
|
// Don't show this alert again.
|
||||||
@ -832,6 +836,8 @@ void FileOp::operate(IFileOpProgress* progress)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_document->sprite()->setFrameDuration(frame, m_seq.duration);
|
||||||
|
|
||||||
++frame;
|
++frame;
|
||||||
m_seq.progress_offset += m_seq.progress_fraction;
|
m_seq.progress_offset += m_seq.progress_fraction;
|
||||||
}
|
}
|
||||||
@ -1395,6 +1401,7 @@ FileOp::FileOp(FileOpType type,
|
|||||||
m_seq.frame = frame_t(0);
|
m_seq.frame = frame_t(0);
|
||||||
m_seq.layer = nullptr;
|
m_seq.layer = nullptr;
|
||||||
m_seq.last_cel = nullptr;
|
m_seq.last_cel = nullptr;
|
||||||
|
m_seq.duration = 100;
|
||||||
m_seq.flags = 0;
|
m_seq.flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,6 +311,7 @@ namespace app {
|
|||||||
bool has_alpha;
|
bool has_alpha;
|
||||||
LayerImage* layer;
|
LayerImage* layer;
|
||||||
Cel* last_cel;
|
Cel* last_cel;
|
||||||
|
int duration;
|
||||||
// Flags after the user choose what to do with the sequence.
|
// Flags after the user choose what to do with the sequence.
|
||||||
int flags;
|
int flags;
|
||||||
} m_seq;
|
} m_seq;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user