Quote:I'm sorry to say that it doesn't slow the action. It does the same even with very little values. Just *pop* and it's gone, no sliding.
It's because you do all operations in one frame.
Silly me... My bad, I look at your code briefly. Your whole code is wrong.
If you want your GUI object slide you need to update it every frame.
//do this in some init function
Flt current_pos_x = questbar.getWindow("questbar").pos() .x;
Flt desired_pos_x = -D.w() - questbar.getWindow("questbar").size().x;
// check if button was pressed, then do this in every frame
if(current_pos_x > desired_pos_x)
{
current_pos_x -= 0.05f * Time.d(); // now sliding speed is const (0.05 per sec), you can change 0.05f to value that give you smooth slide
questbar.getWindow("questbar").pos(Vec2(current_pos_x,questbar.getWindow("questbar").pos().y));
}