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.

MAKE_ICON for moving Knob

Featured Replies

Asking again about altimeter with barometer knob.Now I am trying to get the function of moving knob with changing barometic setting. I know that I should use "MAKE_ICON" element, however I am confusing at Field "SWITCH_TYPE".Maybe I should take "ICON_SWITICH_TYPE_SET_CUR_USING_ RANGE" ,but there is no sample for that type. So question is,1)Is "ICON_SWITICH_TYPE_SET_CUR_USING_ RANGE" adequate for the purpose?2)How to use "offset" and "scale" for the type? I would be so happy if there are any sample code. I am quite new to making gauges, and also relatively new and have only poor knowledgement of C language. Thanks in advance.

First the question, why MAKE_ICON?MAKE_ICONS are for displaying different bitmaps at the same place. You can of course simulate somthing like a stop-motion moving effect with it (like the XML gauges in the Baron, quite ugly in my opinion). So why not try MAKE_NEEDLE, MAKE_MOVING, MAKE_SLIDER....?Secondly, how to use MAKE_ICON with ICON_SWITICH_TYPE_SET_CUR_USING_RANGE? A MAKE_ICON consists of several bitmaps indexed 0,1,... NUM_ICONS-1. With ICON_SWITCH_TYPE_SET_CUR_ICON you have to return the index in the callback if used. With ICON_SWITICH_TYPE_SET_CUR_USING_RANGE the indexes are calculated from the token variable or the callback by subtracting OFFSET (at least I think so, I used 0) and then dividing by SCALE. The result is rounded to be used as an index to your bitmap list.Arne Bartels

>So why not try MAKE_NEEDLE, MAKE_MOVING, MAKE_SLIDER....?I see. That's quite true.The reason I tried to use MAKE_ICON,I am studying to make copy of 767PIC gauges.I got bitmaps from 767PIC's altimeter gauge by using GAU2BMP.There are 8 knob bitmaps which are each rotated 45 degrees.So, I thought this is using MAKE_ICON to display moving knobs.Anyway, I'll try with MAKE_NEEDLE to get same function.Thanks so much for your help!Taku

>>So why not try MAKE_NEEDLE, MAKE_MOVING, MAKE_SLIDER....?>>I see. That's quite true.>>The reason I tried to use MAKE_ICON,>I am studying to make copy of 767PIC gauges.>I got bitmaps from 767PIC's altimeter gauge by using GAU2BMP.>There are 8 knob bitmaps which are each rotated 45 degrees.>So, I thought this is using MAKE_ICON to display moving>knobs.Using a "needle" instead of an set of icons makes good sense, if only for reasons of file size economy, not to mention the smoother appearance of a rotating knob... :)BillAVSIM OmbudsmanFounder and Director,Creative Recycling of Aircraft Partshttp://catholic-hymns.com/frbill/FS2002/images/fartslogo.jpg

One potential problems with MAKE_NEEDLEs is that they might look distorted if they are near a border of the panel background bitmap. If you are far from the border it doesn't make any effect. Otherwise use MAKE_SPRITE instead.Arne Bartels

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.