David Luff writes:
> I've knocked up an ATC/AI enable/disable dialog using checkboxes,
> but if one of the subsystems starts disabled and is then enabled
> there is the possibility of update being called without a previous
> call to init.  I can avoid this by setting an init-done-ok boolean
> flag in init and checking for it in update, but it's not terribly
> elegant. 

>From my perspective, it would generally be acceptable/desirable to
call the init() function always, and then use the enable/disable
function to determine of the update() function is called.

> I see in logger.xml, that it's possible to specify reinit of a given
> subsystem to the OK button: 
> 
>  <button>
>   <x>200</x>
>   <y>10</y>
>   <legend>OK</legend>
>   <binding>
>    <command>dialog-apply</command>
>   </binding>
>   <binding>
>    <command>reinit</command>
>    <subsystem>ATC_mgr</subsystem>
>   </binding>
>   <binding>
>    <command>dialog-close</command>
>   </binding>
>  </button>
> 
> What I'd like to do is to do this, but only if the value of the corresponding 
> property has been changed from false to true using the checkboxes:
> 
>  <checkbox>
>   <x>30</x>
>   <y>140</y>
>   <width>20</width>
>   <height>20</height>
>   <label>Enable ATC</label>
>   <property>/sim/ATC/enabled</property>
>  </checkbox>
> 
> Is there currently a way of doing this?
> 
> Also, should settings like this be remembered from session to session - ie should I 
> write out the property to preferences.xml when it's changed?  Is there a way of 
> doing this available?
> 
> Cheers - Dave
> 
> _______________________________________________
> Flightgear-devel mailing list
> [EMAIL PROTECTED]
> http://mail.flightgear.org/mailman/listinfo/flightgear-devel

-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to