Indigo Rose Software
  #1  
Old 07-31-2006
AGameAnx's Avatar
AGameAnx AGameAnx is offline
Forum Member
 
Join Date: Jul 2006
Location: Lithuania, Vilniaus raj. Kalviskes
Posts: 5
Post Function: WndResize hitTest setVisible Move

Here's some simple scripts i wrote.

Just for case you don't want to write these yourself everytime
These scripts apply to all object types.
You can rename these txt files to *.lua and use Application.LoadScript

In window resize function i used these simple calculations (just to keep you notised):
Code:
--The function >
function resize(objects)
-- Pos
for index, object in objects do
if (object.xdist) then
	*ObjectType*.SetPos(object.name, wndsize.Width-objects[index].xdist, *ObjectType*.GetPos(object.name).Y);
end
if (object.ydist) then
	*ObjectType*.SetPos(object.name, *ObjectType*.GetPos(object).X, wndsize.Height-objects[index].ydist);
end
-- Size
if (object.xsize) then
	*ObjectType*.SetSize(object.name, wndsize.Width-objects[index].xsize, *ObjectType*.GetSize(object.name).Height);
end
if (object.ysize) then
	*ObjectType*.SetSize(object.name, *ObjectType*.GetSize(object).Width, wndsize.Height-objects[index].ysize);
end
end
If function will not recieve any of the values it will leave it as it is, as you can see
Attached Files
File Type: txt hitTest.txt (3.0 KB, 86 views)
File Type: txt move.txt (1.9 KB, 76 views)
File Type: txt setVisible.txt (1.9 KB, 72 views)
File Type: txt wndResize.txt (10.2 KB, 83 views)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another tough one... Interaction between Web and AMS Agent Jones AutoPlay Media Studio 5.0 13 08-18-2005 03:10 PM
Function: String.RandomFromPattern Brett Setup Factory 8.0 Examples 0 10-28-2004 09:09 AM
Function: TableSum and TableAverage Darryl AutoPlay Media Studio 5.0 Examples 1 08-29-2004 02:59 PM
Bizarre Callback Function Behaviour - Can anyone help? SRJ AutoPlay Media Studio 5.0 3 06-30-2004 10:16 PM
Function: Resize & Center an Image kpsmith AutoPlay Media Studio 5.0 Examples 0 05-17-2004 02:36 PM


All times are GMT -6. The time now is 03:58 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software