File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ namespace anim {
14
14
namespace {
15
15
16
16
rpl::variable<bool > AnimationsDisabled = false ;
17
+ int SlowMultiplierMinusOne/* = 0*/ ;
17
18
18
19
} // namespace
19
20
@@ -76,6 +77,16 @@ void SetDisabled(bool disabled) {
76
77
AnimationsDisabled = disabled;
77
78
}
78
79
80
+ int SlowMultiplier () {
81
+ return (SlowMultiplierMinusOne + 1 );
82
+ }
83
+
84
+ void SetSlowMultiplier (int multiplier) {
85
+ Expects (multiplier > 0 );
86
+
87
+ SlowMultiplierMinusOne = multiplier - 1 ;
88
+ }
89
+
79
90
void DrawStaticLoading (
80
91
QPainter &p,
81
92
QRectF rect,
Original file line number Diff line number Diff line change @@ -351,6 +351,8 @@ QPainterPath path(QPointF (&from)[N]) {
351
351
rpl::producer<bool > Disables ();
352
352
bool Disabled ();
353
353
void SetDisabled (bool disabled);
354
+ int SlowMultiplier ();
355
+ void SetSlowMultiplier (int multiplier); // 1 - default, 10 - slow x10.
354
356
355
357
void DrawStaticLoading (
356
358
QPainter &p,
Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ inline void Simple::startPrepared(
410
410
anim::transition transition) {
411
411
_data->from = _data->value ;
412
412
_data->delta = to - _data->from ;
413
- _data->duration = duration;
413
+ _data->duration = duration * anim::SlowMultiplier () ;
414
414
_data->transition = transition;
415
415
_data->animation .start ();
416
416
}
You can’t perform that action at this time.
0 commit comments