• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX mouse click area issue when gauge undocked on second screen

Messages
371
Country
france
Hello,

A user report to me that when it undock my gauge to drag on a second screen, mouse area clickspot have issue.

Gauge has a fixed size of 1024x768

Here is the declaration is Panel.cfg :

[Window06]
size_mm=1024,768
pixel_size=1024,768
position=4
visible=0
BACKGROUND_COLOR=0,0,0
ident=10101
gauge00=A320FD-FMC!A320_FMS_Main,0,0,1024,768
sizeable=0



776477SIDselectionner.jpg


To select a SID, you have just to click on a SID line. I use the following code to translate mouse click position :

Code:
<Size>590,505</Size>
<CursorType>Hand</CursorType>
<MouseClick id="MouseClick">
    <Script>
        1 (>L:CA_Sound14)
        (M:Event) 'LeftSingle' scmp 0 ==
        (L:SID,bool) 1 == and if{ 0 190 (M:X) rng (M:Y) 15 / flr 1 + (L:SIDnumber,enum) &lt;= and if{ (M:Y) 15 / flr 1 + (>L:Selected_SID,enum) }
                                220 390 (M:X) rng (M:Y) 15 / flr 35 + (L:SIDnumber,enum) &lt;= and if{ (M:Y) 15 / flr 35 + (>L:Selected_SID,enum) }
                                435 600 (M:X) rng (M:Y) 15 / flr 69 + (L:SIDnumber,enum) &lt;= and if{ (M:Y) 15 / flr 69 + (>L:Selected_SID,enum) }
                                'IndexSIDName:' (L:Selected_SID,enum) int scat (>C:XMLVARS:SearchVarName,string)
                                (C:XMLVARS:StringValue,string) 'NEXT PAGE' scmp 0 == if{ 1 (>L:Sid_index_page,bool) 1 (>L:refresh_index,bool) }
                                (C:XMLVARS:StringValue,string) 'PREVIOUS PAGE' scmp 0 == if{ 0 (>L:Sid_index_page,bool) 1 (>L:refresh_index,bool) }
                                }
        (M:Event) 'LeftSingle' scmp 0 ==
        (L:STAR,bool) 1 == and if{ 0 280 (M:X) rng (M:Y) 15 / flr 1 + (L:STARnumber,enum) &lt;= and if{ (M:Y) 15 / flr 1 + (>L:Selected_STAR,enum) }
                                320 600 (M:X) rng (M:Y) 15 / flr 34 + (L:STARnumber,enum) &lt;= and if{ (M:Y) 15 / flr 34 + (>L:Selected_STAR,enum) }
                                'IndexSTARName:' (L:Selected_STAR,enum) int scat (>C:XMLVARS:SearchVarName,string)
                                (C:XMLVARS:StringValue,string) 'NEXT PAGE' scmp 0 == if{ 1 (>L:Star_index_page,bool) 1 (>L:refresh_index,bool) }
                                (C:XMLVARS:StringValue,string) 'PREVIOUS PAGE' scmp 0 == if{ 0 (>L:Star_index_page,bool) 1 (>L:refresh_index,bool) }
                                }
    </Script>
</MouseClick>

There is third column max, with 34 lines per column max.

All works on main screen, but when user undock the gauge on his second screen, when he click on a line, there is an offset and this is another line that is selected.

Is there a solution to solve this problem ? My panel.cfg declaration is wrong ? or mouse area detection method cannot work when window is undocked ?

Thanks for your help.
 
To answer the simple question. Yes you can undock a gauge to another screen and the mouse area detection method will work.
You might have an issue if the second screen has a different aspect ratio than the primary one.
Not sure about that, but I have seen issues where the shape of a gauge was artificially changed and mouse areas were off.
Roy
 
I think your size is wrong .
505 divided by 34 = 14.852941

It should be ,
34 multiplied by 15 = 510

It's the problem with formatted text .
in this example.
Code:
   <FormattedText X="169" Y="510" Font="Tahoma" FontSize="8"
      LineSpacing="15" Adjust="Left" Color="#39A239" BackgroundColor="#0f0f0f" Bright="Yes" Tabs="0,65R,107R,141R,150L">

Y="510" divided by LineSpacing="15" = 34 vertical lines .

If the size of the box area does not match a multiple of Linespacing then you get horrible distortions when the instrument is resized or it's aspect ratio is changed .

One method of seeing visually the actual size of your formatted background box ( X="169" Y="510" ) is to
make the ( BackgroundColor="#0f0f0f" ) a distinctive colour during instrument development .


Both your Formatted text box size , and the Click area size must be the same .
Also the X,Y placement origin of both must be the same .

Cheers
Karol
 
Last edited:
Hello Roy,
Gauge has a fixed size in the panel.cfg (no_sizeable) and no crop; Gauge size = gauge bitmap background = gauge size declaration in Panel.cfg


Hello Karol,

Your idea seems to be logic....I don't use a linespecing feature, only Tabs. I think that gaugestring size has no importance in mouse detection....But your right, my mouse area size has a wrong size and I change for a 15 pixels divided...

I send the fixed gauge to the user, to know if problem is solved and I will report here.

Thanks

Francois
 
Back
Top