Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get gauge size into a variable? (using FS2000/CFS2 gua...

Featured Replies

I'm working on a slider-type gauge for CFS2...hence the reason behind me using the FS2000 SDK...I need to find the y-axis size of my gauge when it's placed on the panel so I can use it in the mouse position calculations.I've got working code for this in an FS2002 gauge using this to get the size dimension:

 pelement->gauge_header->size.y

The problem is that the FS2000 gauge header doesn't have "size" defined. To get my mouse position, I'm using:

 PPIXBOX relative_point

I have tried using

 PPIXBOX size_y

to get the y-axis dimension into the code as a variable, but it isn't working.In particular, I'm using the formula "y_axis_dimension_var - relative_point_var" to invert the mouse action. I.E. 0 @ the bottom of the gauge and the Y-axis size value @ the top of the gauge.Anyone have any tips or a snippet I can follow?

Additional info:I can get the x-axis dimension into the gauge usingpelement->gauge_header->size_x_mmbut there is no similar def for the y-axis...Here is the FS700 gauge header definition from the FS2000gauges.h:////////////////////////////////////////////////////////////////////typedef struct GAUGEHDR{ UINT32 gauge_header_version; char *gauge_name; PPELEMENT_HEADER elements_list; PQUERY_ROUTINE_610 query_routine_610; PINSTALL_ROUTINE_610 install_routine_610; PINITIALIZE_ROUTINE_610 initialize_routine_610; PUPDATE_ROUTINE_610 update_routine_610; PGENERATE_ROUTINE_610 generate_routine_610; PDRAW_ROUTINE_610 draw_routine_610; PKILL_ROUTINE_610 kill_routine_610; char reserved_1[4]; UINT32 size_x_mm; char reserved_2[32]; PMOUSERECT mouse_rect; PGAUGE_CALLBACK gauge_callback; UINT32 user_data; PVOID parameters; char* usage; char reserved_3[16];}////////////////////////////////////////////////////////////////////Here is the PIXBOX def:////////////////////////////////////////////////////////////////////typedef struct PIXBOX{ PIXEL x; PIXEL y; PIXEL size_x; PIXEL size_y;}////////////////////////////////////////////////////////////////////

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.