Go to the documentation of this file.
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 ),
45 const float M_PI = 3.141593f;
47 float k = sin(
M_PI * _current_time -
M_PI / 2.0f);
48 if (k < 0) k = (-pow(-k, 0.7f) + 1) / 2;
49 else k = (pow(k, 0.7f) + 1) / 2;
static WidgetManager & getInstance()
void MYGUI_EXPORT actionWidgetDestroy(Widget *_widget, ControllerItem *_controller)
void MYGUI_EXPORT actionWidgetHide(Widget *_widget, ControllerItem *_controller)
void MYGUI_EXPORT inertionalMoveFunction(const IntCoord &_startRect, const IntCoord &_destRect, IntCoord &_result, float _current_time)
void MYGUI_EXPORT linearMoveFunction(const IntCoord &_startRect, const IntCoord &_destRect, IntCoord &_result, float _k)
void MYGUI_EXPORT actionWidgetShow(Widget *_widget, ControllerItem *_controller)
void set(T const &_left, T const &_top, T const &_width, T const &_height)