Bonjour Tiemo,
Le 25 juil. 08 à 14:34, Tiemo Hollmann TB a écrit :
I resize by the absolute diff of the windwow resize, like:
on resizeStack pNewW,pNewH,pOldW,pOldH
put pNewW - pOldW into tWDiff
put pNewH - pOldH into tHDiff
put item 1 of the rect of player "myPlayer" into tL4
put item 2 of the rect of player "myPlayer" into tT4
put ((item 3 of the rect of player "myPlayer") + tWDiff)
into tR4
put ((item 4 of the rect of player "myPlayer") + tHDiff)
into tB4
set the rect of player "myPlayer" to tL4,tT4,tR4,tB4
so the resize works to the right and bottom
any idea?
The problem with such a code is that any new dimension is always
relative to the current one and not absolute.
It would be safer to use absolute values:
put the rect of player "myPlayer" into tRect
put pNewW - <value> into item 3 of tRect
put pNewH - <value> into item 4 of tRect
set the rect of player "myPlayer" to tRect
How to Manage Stack Resizing tutorial might help you:
This stack explains how to position, scale, etc. all controls in a
card when the window is resized with the help of the Geometry Manager
or by scripting.
Tips and tricks, commented scripts, FAQ and example stacks.
You will access this tutorial through "Tutorials Picker" a free
plugin that interfaces with the So Smart Software website in order to
display all available tutorials stacks directly from the web.
You will find it by going to http://www.sosmartsoftware.com/
Revolution/Plugins or Tutorials section.
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/
----------------------------------------------------------------
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution