36 _startRect.
left -
int(
float(_startRect.
left - _destRect.
left) * _k ),
37 _startRect.
top -
int(
float(_startRect.
top - _destRect.
top) * _k ),
38 _startRect.
width -
int(
float(_startRect.
width - _destRect.
width) * _k ),
47 const float M_PI = 3.141593f;
48 float k = std::sin(
M_PI * _current_time -
M_PI / 2.0f);
49 if (k < 0) k = (-std::pow(-k, 0.7f) + 1) / 2;
50 else k = (std::pow(k, 0.7f) + 1) / 2;
void actionWidgetDestroy(Widget *_widget, ControllerItem *_controller)
void linearMoveFunction(const IntCoord &_startRect, const IntCoord &_destRect, IntCoord &_result, float _k)
void inertionalMoveFunction(const IntCoord &_startRect, const IntCoord &_destRect, IntCoord &_result, float _current_time)
void actionWidgetHide(Widget *_widget, ControllerItem *_controller)
void actionWidgetShow(Widget *_widget, ControllerItem *_controller)
void set(T const &_left, T const &_top, T const &_width, T const &_height)