[haiku-3rdparty-dev] Re: Animating view size / position advice

  • From: hey68 you <hey68you@xxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Thu, 1 Sep 2011 11:27:03 +0000

Thanks for the advice - I've found some old BeOS sample code ("Miszsa's
crazy apps - slidy window demo") using BMessageRunner and I'm trying to play
with the interval parameter.

I'm seeing that it doesn't make a difference how short I make the interval
parameter, if the number of pixels to resize by on each call to resize is
large, than the total time of the animation seems the same to the eye
regardless of the time interval.

The only way to speed up the total animation time is to make the resize by
steps larger (i.e. resize by more pixels at a time).

So - if I want to be able to control the overall animation time, I will need
to "jump" more distance on each resize call.

Thanks,
hey68you

On Thu, Sep 1, 2011 at 10:26 AM, Stephan Aßmus <superstippi@xxxxxx> wrote:

> On 01.09.2011 12:15, Axel Dörfler wrote:
>
>> On 01.09.2011 12:03, hey68 you wrote:
>>
>>> I would like to animate a change in a BView's size and/or position
>>> (using ResizeBy and MoveBy functions).
>>>
>>> Is there a relatively simple way to do this? Using a pulse and/or
>>> posting a BMessage etc.?
>>>
>>
>> Usually a BMessageRunner should be what you're looking for. You can find
>> an example in src/apps/switcher/ which uses this mechanism for animating
>> window movement.
>>
>
> Can you point to the code? I couldn't find it. Thanks!
>
> Best regards,
> -Stephan
>
>
>

Other related posts: