Posted By
|
Message
|
Flava
Registered 30/07/2002
Points 684
|
21st March, 2005 at 17:16:23 -
I'm currently making a new application, and it uses pop-up sub-applications. When the user clicks a button, I want the sub-app to appear in the center of the screen. I have many different sub-apps that open, and they all have different widths and heights. But for example, say the size of the sub-app is 320x200 and the user's resolution is 1024x768 - I'd use the following:
+ Button Clicked
- Set X Position to (1024-320)/2
- Set Y Position to (768-200)/2
That works perfectly fine - but obviously it only works for the 1024x768 resolution. I was wondering if there are any extensions, or any ways of finding out the resolution of the user's screen - so instead of using 1024 as the frame width, I can use the actual width of the user (as not everyone uses 1024x76. Hope somebody can help - and hope its not a ridiculously stupid question..
This is a signature. Have this one on me.
|
Flava
Registered 30/07/2002
Points 684
|
23rd March, 2005 at 15:04:28 -
Anyone know how I can find out the resolution of the user then?
This is a signature. Have this one on me.
|
AndyUK Mascot Maniac
Registered 01/08/2002
Points 14586
|
23rd March, 2005 at 19:19:17 -
why don't you use and extension to be able to change the resolution on set up. Then you will know what it is.
upon pressing 1 set resolution to 640x480 and set global value 1 to 1
upon pressing 2 set resolution to 800x600 and set global value 1 to 2
upon pressing 3 set resolution to 1024x768 and set global value 1 to 3
then use that global value (or whatever) to choose what sizes they need to be.
see what i mean?
.
|
DistantJ [FZ Games]
Registered 02/08/2004
Points 855
|
24th March, 2005 at 20:00:31 -
I think he means he wants to use the player's current desktop resolution.
I think it is possible with some extensions. Try the desktop object and stuff like that.
http://www.fzgames.com
|
SculptureOfSoul
Registered 14/03/2005
Points 52
|
24th March, 2005 at 23:21:04 -
Just use a window control object. The values you want are "Get Screen Width" and "Get Screen Height".
Current Project: Undertaking the design of my mammoth RPG. Utilizing all of the knowledge gained while coding the now defunct "Shadow Reign".
|
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
|
25th March, 2005 at 03:36:50 -
Yeah, they're right there? You should have known!
Old member (~2004-2007).
|
Flava
Registered 30/07/2002
Points 684
|
26th March, 2005 at 04:04:13 -
Yeah Im quite ashamed - I looked through the extension list and couldnt find anything myself. I'll try the window control and desktop object thingy!
Thanks guys!
This is a signature. Have this one on me.
|
|
|