Changes

Jump to navigation Jump to search
m
no edit summary
Line 6: Line 6:  
=== Introduction ===
 
=== Introduction ===
 
This dialog is the 'front end' of the extra500 failure system. It uses Canvas only and has several pages and interactive elements. All pages are .svg designed.
 
This dialog is the 'front end' of the extra500 failure system. It uses Canvas only and has several pages and interactive elements. All pages are .svg designed.
We will look at the code and try to explain what is does. It focuses on nasal - canvas interaction only.
+
We will look at the code and try to explain what is does.  
 +
 
 +
The dialog is set-up like a normal nasal namespace:
 +
<nasal>
 +
    <Dialogs>
 +
      <file>Aircraft/extra500/Dialogs/failuredialog.nas</file>
 +
    </Dialogs>
 +
</nasal>.
 +
 
 +
And called (opened) though a menu entry in /Dialogs/extra500-menu.xml just like any other classical menu entry.
 +
<item>
 +
  <name>Failure-dialog</name>
 +
  <label>Failure Dialog</label>
 +
  <binding>
 +
      <command>nasal</command>
 +
      <script><![CDATA[
 +
        Dialogs.Failuredialog.openDialog();
 +
      ]]></script>
 +
  </binding>
 +
</item>
 +
 
 +
This means there needs to be a loaded Class called failuredialog with an internal function called openDialog.
    
=== File structure ===
 
=== File structure ===
182

edits

Navigation menu