mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +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
|
||||
description = Do you want to load the following files as an animation?
|
||||
repeat = Do the same for other files
|
||||
duration = Duration
|
||||
agree = &Agree
|
||||
skip = &Skip
|
||||
|
||||
|
@ -8,6 +8,10 @@
|
||||
<view expansive="true" id="view" minwidth="128" minheight="64">
|
||||
<listbox id="files" multiselect="true" />
|
||||
</view>
|
||||
<hbox>
|
||||
<label text="@.duration" />
|
||||
<expr text="0" id="duration" suffix="ms" />
|
||||
</hbox>
|
||||
<separator horizontal="true" />
|
||||
<check id="repeat" text="@.repeat" />
|
||||
<check id="dont_show" text="@general.dont_show" />
|
||||
|
@ -385,6 +385,10 @@ FileOp* FileOp::createLoadDocumentOperation(Context* context,
|
||||
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();
|
||||
|
||||
// Don't show this alert again.
|
||||
@ -832,6 +836,8 @@ void FileOp::operate(IFileOpProgress* progress)
|
||||
#endif
|
||||
}
|
||||
|
||||
m_document->sprite()->setFrameDuration(frame, m_seq.duration);
|
||||
|
||||
++frame;
|
||||
m_seq.progress_offset += m_seq.progress_fraction;
|
||||
}
|
||||
@ -1395,6 +1401,7 @@ FileOp::FileOp(FileOpType type,
|
||||
m_seq.frame = frame_t(0);
|
||||
m_seq.layer = nullptr;
|
||||
m_seq.last_cel = nullptr;
|
||||
m_seq.duration = 100;
|
||||
m_seq.flags = 0;
|
||||
}
|
||||
|
||||
|
@ -311,6 +311,7 @@ namespace app {
|
||||
bool has_alpha;
|
||||
LayerImage* layer;
|
||||
Cel* last_cel;
|
||||
int duration;
|
||||
// Flags after the user choose what to do with the sequence.
|
||||
int flags;
|
||||
} m_seq;
|
||||
|
Loading…
Reference in New Issue
Block a user