How do I position windows?

FSSC, Airport 2.*, CfgEdit, etc. Get to grips with designing Scenery & Panels here!

How do I position windows?

Postby WebbPA » Thu Jun 05, 2003 7:55 pm

I've been getting into panel design, primarily tweaking my own panels by moving, replacing, etc. gauges. But the window design escapes me.  I want to move and resize some GPS windows and after I get the hang of that afew other popups.  I have a panel with this configuration that puts a GPS window in the bottom right, but not in the default position in the corner:

[Window01]
Background_color=0,0,0
size_mm=640
window_size_ratio=1.00  
position=0
visible=0
ident=GPS_panel
window_size= 0.226, 0.482
window_pos= 0.774, 0.432

Having read my Panel Design SDK it appears that:

size_mm means the window is 640 pixels - width, depth or what?

Window size ratio=1.00 "Determines the width of panel window as a ratio of the client area of Flight Simulator main window"  Huh?  If the default is 1, why is this in here?

Position=0 This should put it in the upper left corner, shouldn't it?

visible=0.  Finally, a line I understand.
ident=GPS.  OK, I understand this one, too.

window_size= 0.226, 0.482
window_pos= 0.774, 0.432 - according to the SDK, I have just overridden the previous size, ratio and position settings.

Should I always set size, ratio and position as above so I can reset them here?

What do the numbers mean?  I get the impression they are relative positions, 0.0, 0.0 being upper left corner and 1.0, 1.0 being bottom right.

Anything else I'm missing?
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby Hagar » Fri Jun 06, 2003 1:12 am

You might like to try my method. http://www.simviation.com/lair/AddGPS.htm

I've been working with panels since FS98. I find the FS98-style window entries work fine for general use in all versions of FS.
size_mm=640 is the width of the panel window. It affects the gauge sizes & positioning. This has no relationship to the actual size of the panel BMP but is usually the same. Higher resolution (1024 x 768 ) main panel BMPs would usually be used in the later sims.
Some windows are defined with both width & depth like this size_mm=1024, 768. This is useful for the smaller pop-up windows to fit them exactly to the gauge.

I discovered long ago that the window_size_ratio= line is a corrupt command which has no effect. Try changing it to windowsize_ratio=
Delete or remark the FS2000 window_size= & window_pos= entries.
As you say, these conflict with the FS98-style position= entries. position=8 will put the GPS in its usual location at bottom right. I see no point in using both methods.

You can do all this in CfgEdit if you prefer.
Last edited by Hagar on Fri Jun 06, 2003 1:20 am, edited 1 time in total.
Image

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group
My Google Photos albums
My Flickr albums
User avatar
Hagar
Colonel
Colonel
 
Posts: 30864
Joined: Wed Jun 19, 2002 7:15 am
Location: Costa Geriatrica

Re: How do I position windows?

Postby JohnP » Fri Jun 06, 2003 1:14 am

:)The file in question seems to have a lot of entries, which might make this confusing. Here is the GPS entry for the microsoft Boeing 737:
  [Window02]
size_mm=150,250
position=8
BACKGROUND_COLOR=16,16,16
VISIBLE=0
ident=GPS_PANEL
gauge00=gps!gps,0,0,150,250

The top line is the size line(Heigth, Width)
The second line is the position, which in this case is 8. Position 8 is the lower right corner. It usually starts with 0(upper left corner), then 1,2,3,4,etc. going across the top and down to the lower left to the middle right.
 The last line is X axis, Y axis, heigth, width.
 Hope this helps a little, even though it sounds confusing.
JohnP
2nd Lieutenant
2nd Lieutenant
 
Posts: 182
Joined: Tue Jun 25, 2002 2:48 am

Re: How do I position windows?

Postby WebbPA » Fri Jun 06, 2003 6:56 am

Thanks, but it's still very confusing.  My first goal is to move the "standard" GPS position from a big popup in the corner to something that fits nicely over other gauges.  This is what the example does - it's from John Consterdine's Baron RTW panel.

Despite the size=640 and position=0 it's custom sized and positioned closer to position=5 (middle left) than position=0 (position=0 should be upper left, shouldn't it?).  When I use position=8 I can't move the gauge out of position 8, like to overlap 5 and 8.  Can I just use size=640, position=0 for ALL windows and just concentrate on window_size and window_position?

According to the SDK these entries will override everything else anyway.  But what do these numbers mean - are they the relative positions I mentioned earlier?

I've just started using CfgEdit but I can't get it to work with popup windows.  It's ok for general positioning of gauges but I always have to back and fine tune them with notepad.  I can see any window I want but only one at a time.  And I just tried opening the above panel and I got an error message - CfgEdit offered to change the GPS position for me.
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby WebbPA » Fri Jun 06, 2003 7:40 am

Maybe a picture will help.
Last edited by WebbPA on Fri Jun 06, 2003 7:59 am, edited 1 time in total.
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby JohnP » Fri Jun 06, 2003 11:10 am

:)Do you use a panel program? Pop-up gauges will go into a specific location, and can be moved around with the mouse. With a panel program you could move it into the location you want and see what the numbers are, which might help you understand them. Also there is a setting in Fs2002 that if checked will not allow you to move windows around, if checked.
Hopefully, this helps a little and is not to confusing.
JohnP
2nd Lieutenant
2nd Lieutenant
 
Posts: 182
Joined: Tue Jun 25, 2002 2:48 am

Re: How do I position windows?

Postby WebbPA » Fri Jun 06, 2003 11:18 am

No, I just started using CfgEdit for general positioning and sizing of gauges, then I tweak the .cfg file with notepad.  I can't get CfgEdit to properly show window position and it comes up with error messages every time it sees something it doesn't understand.
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby Hagar » Fri Jun 06, 2003 12:01 pm

Did you try the example in my tute? This should work on any panel. Change the [Windowxx] header number & windowsize_ratio= entry to suit the panel. No other modifications required.

[Window03]
size_mm=150,250
windowsize_ratio=2.0
position=8
BACKGROUND_COLOR=16,16,16
VISIBLE=0
ident=GPS

gauge00=gps!gps,0,0,150,250

The above example is for a panel with a 1024 x 768 main panel BMP. This is what it looks like.

Image
Last edited by Hagar on Fri Jun 06, 2003 12:09 pm, edited 1 time in total.
Image

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group
My Google Photos albums
My Flickr albums
User avatar
Hagar
Colonel
Colonel
 
Posts: 30864
Joined: Wed Jun 19, 2002 7:15 am
Location: Costa Geriatrica

Re: How do I position windows?

Postby JohnP » Fri Jun 06, 2003 12:06 pm

:)position      Specifies the relative position of a panel window to the main window. For example:
position = 7
A number from 0 to 8 (as shown below) designates the position of the panel window. If nothing is specified, 7 is the default.

0 = upper-left corner
1 = upper-middle side
2 = upper-right corner
3 = middle-left side
4 = middle
5 = middle-right side
6 = lower-left corner
7 = lower-middle side
8 = lower-right corner

window_pos      Overrides the position and windowsize_ratio variables. Provide an x(,y) value.
window_pos=0.85, 0.3

window_size      Overrides the position and windowsize_ratio variables. Provide a w(,h) value.
window_size=0.5, 0.5


The above is an excerpt from the Microsoft panel SdK. I know that you have read it, but The window pos and size entries are overriding your other entries.
I know that with POP-UP windows I just let them come up and reposition them with the mouse to my desired location. If you are dealing with fixed windows, that is a different story.
JohnP
2nd Lieutenant
2nd Lieutenant
 
Posts: 182
Joined: Tue Jun 25, 2002 2:48 am

Re: How do I position windows?

Postby WebbPA » Fri Jun 06, 2003 12:33 pm

Hagar,

As I understand your example you double the size of the gauge and put it in position 8.  I'm after a little more artistic effect.  In this case I would want to move it down so it isn't covering the fuel gauge, then left so it lines up with the MFD that is already mostly covered up.

After moving it I would have to resize it so the bottom right corner of the gauge lines up with the bottom right corner of the panel.

Or maybe I would want to move and resize it so it fits exactly over the right MFD.

Since Position=XX is irrelevant there must be something in window_size and window_pos that will place the gauge on the screen.

I thought these coordinates would have the same meaning as gauge coordinates except that the numbers go from 0 to 1 instead of 0 to 1024.  With a little trial and error I should have been able to figure out some sort of correlation but it hasn't worked that way.  the gauge moves around and resizes unpredictably.

JohnP's quote from the SDK shows how frustrating this is.  It's incomprehensible and it's the only thing the manual that even mentions window placement.
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby JohnP » Fri Jun 06, 2003 12:52 pm

:)Question? "After relooking at your file setup for the GPS, you have it marked as visible=1. This means that your gauge is more like a fixed window instead of a pop-up one. If you intend it to be a pop-up one then you entry should read visible=0". Second question is what is behind the GPS screen? That would give a better idea as to how you plan on placing it visually, instead of trying to explain it.
JohnP
2nd Lieutenant
2nd Lieutenant
 
Posts: 182
Joined: Tue Jun 25, 2002 2:48 am

Re: How do I position windows?

Postby JohnP » Fri Jun 06, 2003 1:19 pm

FS2000, FS2002, CFS and CFS2

FS2000/2 and CFS/2 can use the FS98 mode of Window placement, but also introduced a more flexible method. Window Size and Window Position are easier to use, and, if defined, will override Window Size Ratio and Position. Both range in value from 0.0 to 1.0.

Window Position defines where on the Main Window the radio stack (using the same example) will appear, by defining the precise percentage of the Window at which the top left corner of the radio stack is placed. For example, a Window Position value of 0.5, 0.5 (for X and Y) will place the radio stack Panel Window top left corner at the exact middle of the Main Window.

Window Size defines the size of the radio stack as a ratio of the size of the Main Window. A value of 0.2, 0.2 will produce a radio stack width and height scaled to exactly 1/5th, or 20%, of the Main Window width and height.

FS2000/2 and CFS/2 allow you have a Window with no background bitmap. In this case, you can specify the background color using an RGB value. FS Panel Studio allows you to modify this in the Window Properties dialog. In this case positioning is relative to the Size_MM of the Window.


The above is another excerpt from the panel program that I use(FS Panel Studio). It seems to give a clearer explanation of how sizing and positioning nuimbers work. It seems a little less confusing than the Microsoft Panel SDK.
Again, hope this helps a little.
JohnP
2nd Lieutenant
2nd Lieutenant
 
Posts: 182
Joined: Tue Jun 25, 2002 2:48 am

Re: How do I position windows?

Postby WebbPA » Fri Jun 06, 2003 1:35 pm

Visible=1 is just so I don't have to click the icon every time I reload the panel.  When I'm done editing I'll set it back to 0.  There's nothing behind it but the main panel.

I found another example that may illustrate what I want to do.  It's the left 1/3 of the screen.  The code is:

[Window13]
size_mm=260,258
window_size_ratio=1.00  
visible=0
ident=205
pixel_size=0,0
window_pos= 0.030, 0.522
gauge00=gps!gps,  -8,1,275,255

and it looks like this
Image

Size looks like the window size - 260x280 pixels.

Window_pos looks about right - upper left corner is 30 pixels from the left edge of the screen and 522 pixels from the top of the screen.

The gauge00 entries look like gauge placement within the window, the negative number being the reason why the left border of the guage is invisible.

So I conclude that

1. Size=mm means window size?  (OK, I'm still lost on this one but either 640 or the same as the gauge size).

2. Position=xx is irrelevant since I am going to override it later.  This example doesn't even have that line.

3. Window size ratio should always be 1.00 since I am going to override it later.

4. Window_pos is the position of the window (w,h) on the screen (not just relative to the panel bmp).

5. Window_size is the size of the window (w,h).

6. Window_size and window_pos are numbers between 0 and 1 where 1,1=the right bottom pixel (1024, 768 for my resolution).

7. Gauge=(gaugename), X position within the window, Y position within the window, Width of gauge, height of gauge.  The first 2 numbers will usually be 0,0.

Am I getting closer?
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby WebbPA » Fri Jun 06, 2003 1:46 pm

John,

Thanks for the explanation.  I think my dissertation is pretty close to that.  But if you have time for one more question, the SDK says that size=mm "Specifies the size of the panel window, in millimeters" (Pixels?).

So is size_mm=W,H normally going to be the same as the width and height entries in gaugexx=(gaugename),0,0,W,H?
WebbPA
Ground hog
Ground hog
 
Posts: 0
Joined: Sat Sep 25, 2010 6:01 pm

Re: How do I position windows?

Postby RollerBall » Fri Jun 06, 2003 1:46 pm

Haven't read the whole of this thread - life's too short at the moment(!) - but using CFGEdit I've had no problem positioning popups - esp GPS using the position feature which lets you see exactly where it'll be on the panel, resize it and move it round.

Load your panel in CFGEdit and open your GPS panel, then click on Window-Set Default Position. Couldn't be easier. If you're getting error messages you've got a prog problem. Works with all mine and I've done loads.

Roger
RollerBall
 

Next

Return to Scenery & Panel Design

Who is online

Users browsing this forum: No registered users and 655 guests