32 mDestCoord = _destCoord;
41 mCalcPosition =
false;
48 mDestCoord.
top = _destPoint.
top;
53 void ControllerPosition::prepareItem(
Widget* _widget)
63 bool ControllerPosition::addTime(Widget* _widget,
float _time)
65 mElapsedTime += _time;
67 if (mElapsedTime < mTime)
70 eventFrameAction(mStartCoord, mDestCoord, coord, mElapsedTime / mTime);
73 if (mCalcSize) _widget->setCoord(coord);
74 else _widget->setPosition(coord.point());
76 else if (mCalcSize) _widget->setSize(coord.size());
86 eventFrameAction(mStartCoord, mDestCoord, coord, 1.0f);
89 if (mCalcSize) _widget->setCoord(coord);
90 else _widget->setPosition(coord.point());
92 else if (mCalcSize) _widget->setSize(coord.size());
106 setTime(utility::parseValue<float>(_value));
107 else if (_key ==
"Coord")
108 setCoord(utility::parseValue<IntCoord>(_value));
109 else if (_key ==
"Size")
110 setSize(utility::parseValue<IntSize>(_value));
111 else if (_key ==
"Position")
112 setPosition(utility::parseValue<IntPoint>(_value));
113 else if (_key ==
"Function")
119 if (_value ==
"Inertional")
121 else if (_value ==
"Accelerated")
123 else if (_value ==
"Slowed")
125 else if (_value ==
"Jump")
136 eventFrameAction = _value;