• 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.

Area Click Zone

Messages
10,088
Country
us-arizona
Hey Guys,

In doing my MFD which is born from the FS9 GPS 500, I am having a problem understanding the Zoom click zone. How on earth is this working here?

I have tried several directions to isolate these into two different area's other from how its originally working, and nothing seems to work.

I cannot understand how you can get the second coordinate from one 'area' call, such as say '34'..? That makes no sense.

Here is the code for the Map Zoom-in and Zoom-out button area's.


Code:
		<Area Name="RNG Button" Left="789" Top="324" Width="39" Height="30">
			<Area Name="RNG Out" Top="35" GpsSpecific="Y">
				<Click Kind="LeftSingle+Leave">
					(M:Event) 'LeftSingle' scmp 0 == (@g:zoominButtonDown) 0 == and if{ 1 (>@g:zoominButtonDown) @ZOOMINButton }
					(M:Event) 'Leave' scmp 0 == (@g:zoominButtonDown) 1 == and if{ 0 (>@g:zoominButtonDown) }
				</Click>
				<Cursor Type="UpArrow"/>
				<Tooltip ID="TOOLTIPTEXT_GPS_RANGE_UP"/>
			</Area>
			<Area Name="RNG In" Bottom="35" GpsSpecific="Y">
				<Click Kind="LeftSingle+Leave">
					(M:Event) 'LeftSingle' scmp 0 == (@g:zoomoutButtonDown) 0 == and if{ 1 (>@g:zoomoutButtonDown) @ZOOMOUTButton }
					(M:Event) 'Leave' scmp 0 == (@g:zoomoutButtonDown) 1 == and if{ 0 (>@g:zoomoutButtonDown) }
				</Click>
				<Cursor Type="DownArrow"/>
				<Tooltip ID="TOOLTIPTEXT_GPS_RANGE_DOWN"/>
			</Area>
		</Area>


Could someone by chance shed some light on this? I for one would be greatful.



Bill
LHC
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Bill, please note that the original XML is:

Code:
<Area Name="RNG Button" Left="410" Top="46" Width="28" Height="[B][COLOR="Red"]70[/COLOR][/B]">
	<Area Name="RNG Out" Top="[B][COLOR="Red"]35[/COLOR][/B]" GpsSpecific="Y">
		<Click Kind="LeftSingle">
			1 (&gt;@g:zoominButtonDown) @ZOOMINButton
		</Click>
		<Cursor Type="UpArrow"/>
		<Tooltip ID="TOOLTIPTEXT_GPS_RANGE_UP"/>
	</Area>
	<Area Name="RNG In" Bottom="[B][COLOR="red"]35[/COLOR][/B]" GpsSpecific="Y">
		<Click Kind="LeftSingle">
			1 (&gt;@g:zoomoutButtonDown) @ZOOMOUTButton
		</Click>
		<Cursor Type="DownArrow"/>
		<Tooltip ID="TOOLTIPTEXT_GPS_RANGE_DOWN"/>
	</Area>
</Area>

The key to understanding this is that 35 + 35 = 70... ;)

The first line defines a "master rectangle" at 410,46,28,70.

The first "sub-area" defines a segment of that "master rectangle" which is 35pixels high, beginning from the TOP of the "master rectangle."

The second "sub-area" defines a segment of that "master rectangle" which is 35pixels high, beginning from the BOTTOM of the "master rectangle."

The only reason for this type of syntax is organizational. This makes it clear that you are defining ONE BUTTON with two operations, depending on where on the buttom you click..

There is absolutely no other purpose served. It could just as easily been defined as two completely seperate mouse rectangles.
 
Messages
10,088
Country
us-arizona
Ahhhh... I see.

So in making the button horizontal, I would make Left and Right the width call zones.

I did try to re-write in click zone parameters, but it didnt function. Perhaps if I had totally seperated them from the 'button' string, that would have enabled them to work seperately.

Thanks for the tutorial on that Bill!


Bill
LHC
 
Top