Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Pages: 1 
Send Topic Print
Mapping pop-up windows (Read 627 times)
Jan 25th, 2006 at 10:46am

Gary R.   Offline
Colonel
If God is you're co-pilot,
switch seats.
PA, USA

Gender: male
Posts: 811
*****
 
Okay, I understand how to a gauge is sized and mapped on a 2D panel.  Now, what I can't figure out is how to make a pop-up window appear on a specific x,y co-ordinate of the 2D panel.  Here's what I want to do.  I want to take a WX radar guage display and make it appear over the display area of an MFD gauge on the 2D panel.  What throws me is this.  Pop-up windows have a position reference
position= 1,2,3,4, etc.

and a window_pos reference
window_pos=0.xxxx,0.xxxx

Okay, the decimal notation messes me up because I can't relate that in any way to the 2D panel x,y co-ordinate and of course the window position number 1,2,3 etc. seems to be very generalized.  What I need to figure out is how to make the window to overlay on the 2D panel at a specifc x,y when I click the associated icon or press shift 1,2,3,etc.  Any help??

Thanks.

Thanks
 

AMD 2800xp on gigabyte vt600l k7 triton overclocked @ 2.3 ghz, 768 PC 3200, 128 DDR 6600GT AGP, 60 gig,5200 rpm maxtor, 160gig 7200rpm WD, Sony FD Trinitron 19
IP Logged
 
Reply #1 - Jan 25th, 2006 at 6:21pm
RollerBall   Ex Member

 
Gary, don't try to edit the cfg file manually. You'll be on a hiding to nothing. Use CfgEdit which is perfectly good for editing panels in FS04 and 02 despite only showing FS2000 in its blurb.

You can use it to accurately size and position any pop-up panel. You can create any pop-up that uses the standard sim icons (but use the ones you can see in the program that are in the Mooney, the Kingair and the C208 ) plus a few more less common ones (like overheads) using 'sim icons' created by 3rd party designers. One thing to remember is that in order to work EVERY pop-up must have '_PANEL' in its ident - can't just have a number

eg GPS_Panel, Radio_Stack_Panel, Throttle_Panel

That's about all you need to know to get started  Wink
 
IP Logged
 
Reply #2 - Jan 27th, 2006 at 6:54pm

Gary R.   Offline
Colonel
If God is you're co-pilot,
switch seats.
PA, USA

Gender: male
Posts: 811
*****
 
CFGedit is my usual tool for panel editing.  But, if you click on the option to size and position the panel windows, most times you get an undetailed display of the main panel which makes it impossible to pin the pop up window over an exact location on the main panel.  What I want to do is this.  Okay.  On the main panel, I have installed the MX-20 display which is naturally an XML gauge.  CFGedit doesn't see xml's.  Now, I have the Common Weather radar which consists of the gauge "guts", that is the sweep and return displays and a gauge bitmap to position that in.  Now, the WX can be placed within any bitmap image.  I could easily place that in the display area of any MFD bitmap.  Now, I happen to have a plain old bitmap of an MX-20 unit.  I wish to use that for the background bitmap in the WX window and then map it to appear over the panel mounted MX-20 MFD gauge, which would make it a lot more realistic appearing of course.  I just need to figure out the how the location and position figures of pop-up windows relate to the where they appear over the main panel.
 

AMD 2800xp on gigabyte vt600l k7 triton overclocked @ 2.3 ghz, 768 PC 3200, 128 DDR 6600GT AGP, 60 gig,5200 rpm maxtor, 160gig 7200rpm WD, Sony FD Trinitron 19
IP Logged
 
Reply #3 - Jan 27th, 2006 at 6:59pm

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
If you click Window/Set Default Position in CfgEdit you should be able to do what you want.
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #4 - Jan 28th, 2006 at 3:58am

H   Offline
Colonel
2003: the year NH couldn't
save face...
NH, USA

Gender: male
Posts: 6837
*****
 
I'm not sure of each sim. In CFS1, the upper left of the screen is "1" and my gunsight 'window' (don't need it in the way if I'm just flying around) is in position "4" (near center) .However, 'tweak' positioning can also be accomplished by resizing the picture with the blank-out color (usually true black).
If you're not concerned about a little extra file size, the main panel window can be size matched and you can add as many gauges as you wish, positioning according to pixel comparison. If you intend more than one window to be displayed simultaneously, be sure you order them properly in the .cfg for the proper one to display over the other and properly assign the Window keys in your settings without upsetting the window selections of other planes (or renaming them accordingly) if your giving any of them a turn on/off feature.8)
 
IP Logged
 
Reply #5 - Jan 28th, 2006 at 4:16am

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
Quote:
I'm not sure of each sim. In CFS1, the upper left of the screen is "1" and my gunsight 'window' (don't need it in the way if I'm just flying around) is in position "4" (near center) .However, 'tweak' positioning can also be accomplished by resizing the picture with the blank-out color (usually true black).

I assume Gary is referring to FS9. In the later versions of FS you're no longer restricted to the FS98-style positioning & it's possible to define the exact size & position of pop-up windows. This can be done in CfgEdit as I described above.

...
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #6 - Jan 28th, 2006 at 4:25am

H   Offline
Colonel
2003: the year NH couldn't
save face...
NH, USA

Gender: male
Posts: 6837
*****
 
Quote:
I assume Gary is referring to FS9. In the later versions of FS you're no longer restricted to the FS98-style positioning & it's possible to define the exact size & position of pop-up windows. This can be done in CfgEdit as I described above.
I assumed as much -- cheaters! Not all of us work with -- or even have -- FS2k4  Tongue. However, I have the inkling that the old mess-with-it method may still work if you wanted to make use of all that extra time you don't know what to do with. Wink 8)
 
IP Logged
 
Reply #7 - Jan 28th, 2006 at 7:30pm

Gary R.   Offline
Colonel
If God is you're co-pilot,
switch seats.
PA, USA

Gender: male
Posts: 811
*****
 
I want to figure how to make this

gauge29=APOLLO_PVI!Apollo_PVI,  [459,434,166,136]

=
this

file=PVI_background.bmp
file_1024=PVI_background.bmp
size_mm=460
window_size_ratio=1.00   
position=0
visible=0
ident=70
file=PVI_background.bmp
file_1024=PVI_background.bmp
size_mm=460
window_size_ratio=1.00   
position=0
visible=0
ident=70
window_size= 0.350, 0.370
window_pos= 0.510, 0.570


I'm trying to correlate this

window_size= 0.350, 0.370
window_pos= 0.510, 0.570

to this

gauge29=APOLLO_PVI!Apollo_PVI,  [459,434,166,136]

which is the gauge on the main panel I want to overlay.  Because the this guage is an xml it doesn't display in the position window page of cfgedit so there's no way I can specifically position it.  I need to find out how the size and co-ordintates of the gauge on the main panel would relate to the size and co-ordinates of the pop-up window so I can postion it precisely where I want it manually.

Its the 0.xxxxx they use for the size and postion of the pop-ups that mess me up.  I don't understand how they relate to where the pop-up will appear on the main panel when clicked open.  If there isn't a handy mathematical formula to manually make sense of it then I guess I'll either just have to keep messing with it till I get it or get a payware panel editor that will allow the precision I need to do what I want the first time at it.
 

AMD 2800xp on gigabyte vt600l k7 triton overclocked @ 2.3 ghz, 768 PC 3200, 128 DDR 6600GT AGP, 60 gig,5200 rpm maxtor, 160gig 7200rpm WD, Sony FD Trinitron 19
IP Logged
 
Reply #8 - Jan 28th, 2006 at 7:33pm

Gary R.   Offline
Colonel
If God is you're co-pilot,
switch seats.
PA, USA

Gender: male
Posts: 811
*****
 
I am deducing that the size and co-ordinates of gauges on the main panel are in pixels and in the pop-up windows they are in mm.  If that is correct then it's no wonder it's a difficult trial and error task.  Why can't the same units be used for measuring of the main panel co-ordinates and the pop-ups?
 

AMD 2800xp on gigabyte vt600l k7 triton overclocked @ 2.3 ghz, 768 PC 3200, 128 DDR 6600GT AGP, 60 gig,5200 rpm maxtor, 160gig 7200rpm WD, Sony FD Trinitron 19
IP Logged
 
Reply #9 - Jan 29th, 2006 at 3:11am

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
You would need to read the relevant SDK to find out the technical details. This would obviously depend on the size of the main panel BMP. The gauge position & size on a pop-up window is relative to the window itself so if you position & size the window as you want it I don't really see the problem. You can always use an an ordinary gauge instead of the XML gauge to postion it & change it afterwards by manually editing Panel.cfg. If you're serious about panel design it might be worth purchasing FS Panel Studio which is CfgEdit's big brother & designed to work with FS9.

The example you gave seems to have duplicate entries. The part I've marked in italics doesn't look necessary to me. Quote:
file=PVI_background.bmp  
file_1024=PVI_background.bmp  
size_mm=460
window_size_ratio=1.00    
position=0
visible=0
ident=70
file=PVI_background.bmp  
file_1024=PVI_background.bmp  
size_mm=460
window_size_ratio=1.00    
position=0
visible=0
ident=70

window_size= 0.350, 0.370
window_pos= 0.510, 0.570
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #10 - Jan 29th, 2006 at 5:22am

H   Offline
Colonel
2003: the year NH couldn't
save face...
NH, USA

Gender: male
Posts: 6837
*****
 
To elaborate (as in agreement with Hagar), you seem to be trying to tell the program to display the same panel over itself ???.
Just to relate the similarity in an earlier panel.cfg file (CFS1,2) but using your info:

[Window00]

file=PVI_background.bmp 
file_1024=PVI_background.bmp 
size_mm=460
window_size_ratio=1.00   
position=0
visible=0
ident=70

gauge0=APOLLO_PVI!Apollo_PVI,459,434,166,136
-------------------------------------
note that just prior to the individual info is a listing ouf the 'windows' giving the names as they'd appear in the views menu.


[Window00]
the number of your window determines the overlay (subsequent numbers display on top of lower numbers)


file=PVI_background.bmp
this should be your default display for this window; see next entry


file_1024=PVI_background.bmp
this indicates an alternate picture is availaable if you've set your monitor to display in the 1024 screen


size_mm=460
this indicates your actual picture sizing


window_size_ratio=1.00
the multiplier: 1 indicates the picture is kept original size, .5 would halve it, 2 would double it, etc.


position=0
I don't have a CFS/FS program available right now and I don't know where a 0 would place it. 7 is standard for a full-size main panel but a mini-window (like a mini-control) would place differently (according to the actual size of the picture). As I've said, my gunsight (SPAD 13) is a 4.


visible=0
According to this, this panel isn't going to exist when you power up nor until you select it in the view menu -- or engage an on/off key assigned to it. Putting a 1 here would have it normally displayed and assigning a key to it would enable you to make it disappear (and reappear)


ident=70
Ok, maybe Hagar's tutorial would help out here. I always thought this was directing back to the window sequencing. In this case I would have had a 0 here but could well be wrong.


the following are the gauge(s) that display with this particular window

gauge0=APOLLO_PVI!Apollo_PVI,  [459,434,166,136]
the APOLLO_PVI is name of the gauge file to be accessed, the ! indicates that this is a multipack (more than one gauge) and the Apollo_PVI is the particular gauge in the pack to be displayed. If the gauge file contains only one gauge, there should only be the name of the gauge file here and no "!".
The following are screen placements and gauge sizing (there would be no "[" or "]"  in a CFS panel.cfg file); the 459 is the horizontal placement, the 434 is the verticle placement, the166 is the horizontal sizing (or stretch) of the gauge and the 136 is the verticle sizing of the gauge


Hope this helps for anyone who wants to  edit the hard way. 8)
 
IP Logged
 
Reply #11 - Jan 29th, 2006 at 5:35am

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
Let's start from the beginning. All this information is even confusing me. Roll Eyes

Gary R said: Quote:
Because the this guage is an xml it doesn't display in the position window page of cfgedit so there's no way I can specifically position it.

In this case I would use a conventional gauge to position it on the main panel in CfgEdit. Change the gauge afterwards by manually editing Panel.cfg. Then there would be no need for the pop-up window.
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #12 - Jan 31st, 2006 at 10:02pm

Gary R.   Offline
Colonel
If God is you're co-pilot,
switch seats.
PA, USA

Gender: male
Posts: 811
*****
 
Okay, I don't think folks are quite following me.  See, what is confusing me is this.  You all know on main panel.cfg's the gauges are configed as such.
size x,y and postion x,y.  Now, those figures are always whole numbers like 1-999 for instance.  Now, when youy look at the size and postion co-ordinates of a pop-up window, they ARE different.  How?  They are in a decimal notation. IE:
window_size= 0.xxx, 0.xxx
window_pos= 0.xxx, 0,xxx 

Here's an authentic one

[Window01]
Background_color=16,16,16
size_mm=200,330
window_size_ratio=1.00   
position=8
visible=0
ident=GPS_PANEL
window_size= 0.267, 0.267
window_pos= 0.731, 0.478

gauge00=fs9gps!gps_500,  1,0,199,330

See, I don't know how to relate one to the other.  I want the pop-up window I have created to open at a specific x,y co-ordinate on the main panel when I open it and at a specific x,y size.  CFGedit doesn't show enough detail in the "set default postition" view for me to do that without numerous attempts worth of guess work.  I want to know how the 0.xxx notation of pop up sizing and locations relate to the whole number xxxx used on the main panel gauges co-ordinates and sizes so I can calculate it mathematically without a lot of trial and error.
 

AMD 2800xp on gigabyte vt600l k7 triton overclocked @ 2.3 ghz, 768 PC 3200, 128 DDR 6600GT AGP, 60 gig,5200 rpm maxtor, 160gig 7200rpm WD, Sony FD Trinitron 19
IP Logged
 
Reply #13 - Feb 1st, 2006 at 1:06am

H   Offline
Colonel
2003: the year NH couldn't
save face...
NH, USA

Gender: male
Posts: 6837
*****
 
I think I follow you but you're not not seeing my path (nor am I saying mine's necessarily the only way -- there's more than one way to do most things). Your intentions are to have a window that can be displayed or not displayed so placing the gauge in the main panel list defeats that purpose.
window_size= 0.267, 0.267
window_pos= 0.731, 0.478

You're concerning yourself with these but I've never used them because they're not generally included in CFS1 nor in many (although some) CFS2 3rd pty panels. Without anyone telling me, I would change these numbers (keep track) a couple times, multiplying them times their respective pixel count of the window.bmp and see where the window shows up. In CFS1 or 2, I could delete these entries and still place and size the panel;
The following is given in respect to visual results
:

position=8
If you change this number, the window will appear at different locations on the monitor; it will not resize anything, just move the general location. If you find the general position, however, you can open the window.bmp and change its physical size by adding the blank color (usually black is the default transparent); this will move the visible part of the window in the other direction, thus enabling you to tweak your visual positioning.

size_mm=200,330
If you change the 1st number (200 in this one), your horizontal size will change
If you change the 2nd number, your verticle size will change

window_size_ratio=1.00
If you change this number, even decimally, both horizontal and verticle sizes will be changed accordingly. You could, though, try a sizing distortion by, say:
window_size_ratio=1.00, 0.75
 
IP Logged
 
Reply #14 - Feb 1st, 2006 at 4:56am

Hagar   Offline
Colonel
My Spitfire Girl
Costa Geriatrica

Posts: 33159
*****
 
I knew exactly what you meant right from the start. This should all be explained in the relevant FS2004 SDK. It will all depend on the size of the main panel BMP as defined in the [Window00] entries. Make sure you check the FS2000 mode in CfgEdit as in my shot so you can use the more accurate positioning. Forget the FS98-style position= line. It will work just the same without it. The position of the gauge in your example is relative to the pop-up window itself. The window_size= & window_pos= entries are the position of the pop-up window relative to the main panel. These use the same units as the gauges. It might take a little experimenting to get it exactly right depending on the size of the main panel.

I'm still wondering whether what you're trying to do is necessary.
 

...

Founder & Sole Member - Grumpy's Over the Hill Club for Veteran Virtual Aviators
Member of the Fox Four Group

Need help? Try Grumpy's Lair

My photo gallery
IP Logged
 
Reply #15 - Feb 1st, 2006 at 4:59am

H   Offline
Colonel
2003: the year NH couldn't
save face...
NH, USA

Gender: male
Posts: 6837
*****
 
Quote:
I'm still wondering whether what you're trying to do is necessary.
Only for the fact that he wants the window selectable rather than permanently displayed; he should also be able to reposition it on the screen with his mouse.
 
IP Logged
 
Reply #16 - Feb 12th, 2006 at 6:35pm

dsdawson   Offline
Colonel
I love YaBB 1G - SP1!

Posts: 26
*****
 
Quote:
size x,y and postion x,y.  Now, those figures are always whole numbers like 1-999 for instance.  Now, when youy look at the size and postion co-ordinates of a pop-up window, they ARE different.  How?  They are in a decimal notation. IE:
window_size= 0.xxx, 0.xxx
window_pos= 0.xxx, 0,xxx 


These fractional values are relative to the main panel window.  For instance:
window_size= 0.25, 0.30
window_pos= 0.4, 0,45
With these values, your popup window will be 25% of the width and 30% of the height of the screen.
It will be positioned at  point (measured at its upper left corner) 40% of the way across the screen (from left) and 45% of the way down the screen.

Doug
 
IP Logged
 
Pages: 1 
Send Topic Print