mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Provide animation duration.
This commit is contained in:
parent
2f02198ac7
commit
d1518da1ad
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,10 @@ int Animation::frameRate() const {
|
||||||
return _frameRate;
|
return _frameRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
crl::time Animation::duration() const {
|
||||||
|
return (_endFrame - _startFrame) * crl::time(1000) / _frameRate;
|
||||||
|
}
|
||||||
|
|
||||||
void Animation::play(const PlaybackOptions &options) {
|
void Animation::play(const PlaybackOptions &options) {
|
||||||
_options = options;
|
_options = options;
|
||||||
_started = crl::now();
|
_started = crl::now();
|
||||||
|
|
Loading…
Add table
Reference in a new issue