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.

Hide STATIC IMAGE

Featured Replies

Hi everyone,I just put my original post to quotes below as it appears that this static alpha image interferes with other elements in the sub-gauges. The problem seems to be the SET_ON_SCREEN() below, because the needles and icons over this sub-gauge don't update as they should. They kinda freeze to the point where they were when switching the static image on/off. Does this have to do something with the icon and needle callbacks? Any ideas how to fix this?

I've been working my &@($* off for whole morning to show/hide static image from gauge callback (FSX). I got the impression that it's not even possible while searching the forums, but it really is. Of course it's easier to use MAKE_ICON, but if you want to use alpha channel in the image the MAKE_STATIC is the only applicable macro.So anyone looking for the answer I want to share my method here in the most helpful/useful forum I know for gauge programming.I use two elements here in the gauge. The first one is of course the gauge background image and the second one is the actual bitmap with alpha which I use for some lightning. So inside gauge PANEL_SERVICE_PRE_UPDATE you can accomplish the show/hide of the MAKE_STATIC as follows:
if ( panel_lights_on  ) {	if( GET_IMAGE_HIDDEN( pgauge->elements_list[0]->next_element[0] ) != 0 )  SHOW_IMAGE( pgauge->elements_list[0]->next_element[0] );}else {	if( GET_IMAGE_HIDDEN( pgauge->elements_list[0]->next_element[0] ) == 0 ) {		SET_ON_SCREEN( pgauge->elements_list[0]->next_element[0] );		HIDE_IMAGE( pgauge->elements_list[0]->next_element[0] );	}}

Hope this helps someone, so he/she doesn't need to lose as much hair as I did! :(

Just edited the original post!This is driving me nuts! :(

  • Commercial Member

I have no idea why you want to call SET_ON_SCREEN just before you call HIDE_IMAGE. In fact, I have no idea why you want to call SET_ON_SCREEN at all. HIDE_IMAGE and SHOW_IMAGE should do pretty much all you need.

Ed Wilson

Mindstar Aviation
My Playland - I69

I have no idea why you want to call SET_ON_SCREEN just before you call HIDE_IMAGE. In fact, I have no idea why you want to call SET_ON_SCREEN at all. HIDE_IMAGE and SHOW_IMAGE should do pretty much all you need.
Oh man.. You're right. This is what happens when you do one thing for too long... in a need for a break. I did mess up with the USE_TRANSPARENCY flag that's why HIDE_IMAGE and SHOW_IMAGE didn't work for some reason and I added the SET_ON_SCREEN even I know it's crazy, but it hide the bitmap :( But the update problem still exists, for example everything in default, I turn on the lights (the static one) and set some other MAKE_ICON switch to different position, after that when I switch the light back off the changed switch reverts to it's default position and stays there even if I strum the light switch on and off.edit: For clarity this static light bitmap overlays the switches, but is defined to be under all other gauges in panel.cfg and in the gauge master file.???

I got into one solution but not perfect one.Because I update my switches in icon callback they don't obviously update as long as some of the callbacks of the same sub-gauge is called. So I added gauge callback and to pre_update section a loop that sets all the icons on_screen.Now the icons update but I can still see them jump once to the position they where before switching the light on. So is this a restriction of FS or sub-gauge system or is there a way to get rid of this tiny but irritating jump of the switches?...just came to my mind to try to put some of the switches to the same sub-gauge with the light for testing. I'll be in touch.EDIT: The solution really was to add the switches to the same sub-gauge... this is going to take some time :(

The switches should have been part of the subgauge to begin with.Reduction in # of gauges is a very, very important goal.
I have only one "gauge", a multigauge, which consist of ~30 subgauges. I've been trying to keep the count low, but I'm not very familiar with the virtual cockpit setup and don't know is it going to be implemented yet, so i have been defining each analog needle instrument separately, so it might be easier to position into the VC. Anyway do you meen that reduction in amount of subgauges is as important as separate gauge files or close as important? Does it affect on framerates or something?

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.