Xojo Conferences
XDCMay2019MiamiUSA

RB3DSpace width vs Window width (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: [ANN] Save 50% on the New Stimulus 4.5 for Mac OS X
Next thread: Are Tabpanels custom or OS controls?


Re: File Suggestions?   -   Rubber Chicken Software Co.
  RB3DSpace width vs Window width   -   fargo rpgportland.com
   Re: RB3DSpace width vs Window width   -   Joe Strout
   Re: RB3DSpace width vs Window width   -   fargo rpgportland.com
   Re: RB3DSpace width vs Window width   -   fargo rpgportland.com

RB3DSpace width vs Window width
Date: 28.04.09 03:24 (Mon, 27 Apr 2009 21:24:26 -0500 (CDT))
From: fargo rpgportland.com
Howdy,
So, I'm trying to dynamically position some label type things when my
little quasi-game goes fullscreen, and I've noticed that the width of the
3d space takes a bit to change after the window has changed, so my
calculations tend to be based off incorrect information. Specifically the
window will have returned to its smaller size, in this case 469 wide, but
the 3d space still reports 1280 at the time of my method call.

Anyone know of a good way to get around this lag? I tried running this
loop before my position update method-
if me.FullScreen then
me.FullScreen = False
while myspace.width <> me.width
wend
d.moveLabels(False)
Else
me.FullScreen = True
while myspace.width <> me.width
wend
d.moveLabels(True)
end if

But that just froze me up.

Thanks,
Fargo


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: RB3DSpace width vs Window width
Date: 28.04.09 05:22 (Mon, 27 Apr 2009 22:22:09 -0600)
From: Joe Strout
<email address removed> wrote:

> calculations tend to be based off incorrect information. Specifically the
> window will have returned to its smaller size, in this case 469 wide, but
> the 3d space still reports 1280 at the time of my method call.

Yeah, the Rb3DSpace probably has to be updated before it will realize
that it's been resized.

> Anyone know of a good way to get around this lag? I tried running this
> loop before my position update method-
> if me.FullScreen then
> me.FullScreen = False
> while myspace.width <> me.width
> wend

Hah, good try, but no, it's not a time lag here; it's an
event-processing thing. Try myspace.Update. If that doesn't work, then
you'll have to simply start a single-fire timer whose Action event calls
MoveLabels. Even a period of 1 would probably suffice, since the point
is just to let the event loop finish doing its work.

Best,
- Joe

Re: RB3DSpace width vs Window width
Date: 28.04.09 21:12 (Tue, 28 Apr 2009 15:12:15 -0500 (CDT))
From: fargo rpgportland.com
> <email address removed> wrote:
>
>> calculations tend to be based off incorrect information. Specifically
>> the
>> window will have returned to its smaller size, in this case 469 wide,
>> but
>> the 3d space still reports 1280 at the time of my method call.
>
> Yeah, the Rb3DSpace probably has to be updated before it will realize
> that it's been resized.
>
>> Anyone know of a good way to get around this lag? I tried running this
>> loop before my position update method-
>> if me.FullScreen then
>> me.FullScreen = False
>> while myspace.width <> me.width
>> wend
>
> Hah, good try, but no, it's not a time lag here; it's an
> event-processing thing. Try myspace.Update. If that doesn't work, then
> you'll have to simply start a single-fire timer whose Action event calls
> MoveLabels. Even a period of 1 would probably suffice, since the point
> is just to let the event loop finish doing its work.
>
> Best,
> - Joe
>
> --
> Joe Strout
> Inspiring Applications, Inc.
> http://www.InspiringApps.com

Thanks Joe, I'll give that a shot.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: RB3DSpace width vs Window width
Date: 29.04.09 00:28 (Tue, 28 Apr 2009 18:28:54 -0500 (CDT))
From: fargo rpgportland.com
>> <email address removed> wrote:
>>
>>> calculations tend to be based off incorrect information. Specifically
>>> the
>>> window will have returned to its smaller size, in this case 469 wide,
>>> but
>>> the 3d space still reports 1280 at the time of my method call.
>>
>> Yeah, the Rb3DSpace probably has to be updated before it will realize
>> that it's been resized.
>>
>>> Anyone know of a good way to get around this lag? I tried running this
>>> loop before my position update method-
>>> if me.FullScreen then
>>> me.FullScreen = False
>>> while myspace.width <> me.width
>>> wend
>>
>> Hah, good try, but no, it's not a time lag here; it's an
>> event-processing thing. Try myspace.Update. If that doesn't work, then
>> you'll have to simply start a single-fire timer whose Action event calls
>> MoveLabels. Even a period of 1 would probably suffice, since the point
>> is just to let the event loop finish doing its work.
>>
>> Best,
>> - Joe
>>
>> --
>> Joe Strout
>> Inspiring Applications, Inc.
>> http://www.InspiringApps.com
>
> Thanks Joe, I'll give that a shot.

And that (the timer) worked brilliantly. I had previously tried passing a
few updates to myspace, but that was goin' noplace.

In any case, I believe at last count I owed you 432 beers, so just add one
more to the tally.

Thanks,
Fargo

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>