November 6, 200322 yr My questions:1. Do gauges in a FS "Window" other than the Main Window automatically open when the aircraft loads? Say, for example, I have a window called "Radio Stack". Will the gauges in Radio Stack open or become active even before I open the Radio Stack Window?2. For the sake of theory, is it possible to "shut down" or de-load a gauge and make it dissapear after it's already loaded? Let's say I have 5 gauges in my Radio Stack Window. Is it possible to assign a mouse click somewhere in the Window so that one of the gauges in the Radio Stack will totally shut down and no longer be accessed by FS?
November 7, 200322 yr As far as I know, here are the answers I can give you:1. Yes, all the gauges, even the ones that are in a separate window, are loaded when the panel is loaded. The gauges are loaded but they are not accessed until you popup the corresponding window. It means they don't consume CPU time. If you develop gauges in C, you can define a callback function that is called with a "service_id" parameter. When the gauge is loaded, the callback is called and the service_id has the value "PANEL_SERVICE_CONNECT_TO_WINDOW". It means that the gauge is loaded and ready to be used. When you popup the window, the callback is called with the value "PANEL_SERVICE_PRE_DRAW", which means the gauge is actually drawn. At this time, it takes CPU time for drawing.2. No. As soon as a gauge is loaded, it can't be unloaded unless you load another panel. It maybe possible to do this using the Windows SDK, because a gauge is a DLL, but I don't know if FS will be table in that case.Hope this helps...Eric My Web Site
November 7, 200322 yr Note that I only "program" in xml, not C gauges.1. Well, actually yes and no. I think they are "loaded and locked" by FS from the moment the aircraft is loaded. However, they may not be actually run until you open the window it is put on. I.e. "aotomatic code" might not start to run (or init) properly until the window/gauge has been put onto screen once. I have modified the cessna 182 panel so that I can fly it from vc only. When I load my (also modified) default flight, I start in spot view and enter the virtual cockpit from there. Now, unless I put one of the critical gauges into an invisible spot on the virtual cockpit, the gauge will not work properly. Even if the gauge is placed on the normal 2d panel.2. I don't believe so. You can assign a clickspot to a "reload_panels" event, in which the lock will be unlocked, which in turn allows you to write to the file while it is being edited. Saves a LOT of time btw. In order to "shut down" a gauge, you have to make it react properly on a user variable.
Create an account or sign in to comment