Skip to content

Commit

Permalink
split menubars into indiv set files
Browse files Browse the repository at this point in the history
  • Loading branch information
l0k1 committed Aug 16, 2022
1 parent 539d2a2 commit 34d11e5
Show file tree
Hide file tree
Showing 4 changed files with 494 additions and 174 deletions.
173 changes: 0 additions & 173 deletions MiG-21-set-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,179 +64,6 @@

<menubar>
<default>
<menu n="100">
<label>MiG-21</label>
<enabled type="bool">true</enabled>
<item>
<label>Autostart/Shutdown</label>
<binding>
<command>nasal</command>
<script>mig21.autostart(1)</script>
</binding>
</item>
<item>
<label>Select Livery</label>
<binding>
<command>nasal</command>
<script>aircraft.livery.dialog.toggle()</script>
</binding>
</item>
<item>
<label>Show Stores Dialog</label>
<binding>
<command>nasal</command><![CDATA[some stuff]]>
<script>
canvas_window.showStoresDialog();
</script>
</binding>
</item>
<item>
<label>Select Radio Config File</label>
<binding>
<command>nasal</command>
<script>mig21.get_radio_file_gui();</script>
</binding>
</item>
<item>
<label>VOR/ILS Radio</label>
<binding>
<command>nasal</command>
<script>dialog.nav_radio_dialog.open()</script>
</binding>
</item>
<item>
<label>Comm Radio</label>
<binding>
<command>nasal</command>
<script>dialog.comm_radio_dialog.open()</script>
</binding>
</item>
<item>
<label>ADF Radio</label>
<binding>
<command>nasal</command>
<script>dialog.adf_radio_dialog.open()</script>
</binding>
</item>
<item>
<label>Smokepod Color</label>
<binding>
<command>nasal</command>
<script>dialog.smokepod_dialog.open()</script>
</binding>
</item>
<item>
<label>Repack Chute</label>
<binding>
<command>property-assign</command>
<property>/controls/flight/chute_jettisoned</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/fdm/jsbsim/systems/chute/deploy-rqst</property>
<value>0</value>
</binding>
</item>
<item>
<label>Reload Flares/Chaff</label>
<binding>
<command>property-assign</command>
<property>/ai/submodels/submodel[0]/count</property>
<value>60</value>
</binding>
<binding>
<command>property-assign</command>
<property>/ai/submodels/submodel[1]/count</property>
<value>60</value>
</binding>
<binding>
<command>property-assign</command>
<property>/ai/submodels/submodel[2]/count</property>
<value>60</value>
</binding>
<binding>
<command>property-assign</command>
<property>/ai/submodels/submodel[3]/count</property>
<value>60</value>
</binding>
</item>
<item>
<label>Gunsight</label>
<binding>
<command>nasal</command>
<script>dialog.gunsight_dialog.open()</script>
</binding>
</item>
<item>
<label>Training</label>
<binding>
<command>nasal</command>
<script>dialog.mig28_dialog.open()</script>
</binding>
</item>
<item>
<label>Fuel to full</label>
<binding>
<command>nasal</command>
<script>
if (getprop("/gear/gear/wow") == 1) {
setprop("/consumables/fuel/tank/level-norm", 1);
setprop("/consumables/fuel/tank[1]/level-norm", 1);
setprop("/consumables/fuel/tank[2]/level-norm", 1);
setprop("/consumables/fuel/tank[3]/level-norm", 1);
setprop("/consumables/fuel/tank[4]/level-norm", 1);
setprop("/consumables/fuel/tank[5]/level-norm", 1);
setprop("/consumables/fuel/tank[6]/level-norm", 1);
setprop("/consumables/fuel/tank[7]/level-norm", 1);
setprop("/consumables/fuel/tank[8]/level-norm", 1);
setprop("/consumables/fuel/tank[9]/level-norm", 1);
setprop("/consumables/fuel/tank[10]/level-norm", 1);
setprop("/consumables/fuel/tank[11]/level-norm", 1);
setprop("/consumables/fuel/tank[12]/level-norm", 1);
setprop("/consumables/fuel/tank[13]/level-norm", 1);
setprop("/consumables/fuel/tank[14]/level-norm", 1);
}
</script>
</binding>
</item>
<item>
<label>Toggle Damage</label>
<binding>
<command>nasal</command>
<script>
mig21.toggle_damage();
</script>
</binding>
</item>
<item>
<label>Tacview Record</label>
<binding>
<command>nasal</command>
<script>
if (tacview.starttime == 0) {
tacview.startwrite();
} else {
tacview.stopwrite();
}
</script>
</binding>
</item>
<item>
<label>Event Log</label>
<binding>
<command>dialog-show</command>
<dialog-name>flightlog</dialog-name>
</binding>
</item>
<item>
<label>Toggle Headshake</label>
<binding>
<command>property-toggle</command>
<property>/sim/enable-headshake</property>
</binding>
</item>
</menu>
<menu n="101">
<label>Dev</label>
<!--<item>
Expand Down
139 changes: 138 additions & 1 deletion MiG-21I-set.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,138 @@
<model>
<path>Aircraft/MiG-21bis/Models/MiG-21I.xml</path>
</model>

<menubar>
<default>
<menu n="100">
<label>MiG-21</label>
<enabled type="bool">true</enabled>
<item>
<label>Autostart/Shutdown</label>
<binding>
<command>nasal</command>
<script>mig21.autostart(1)</script>
</binding>
</item>
<item>
<label>Select Livery</label>
<binding>
<command>nasal</command>
<script>aircraft.livery.dialog.toggle()</script>
</binding>
</item>
<item>
<label>Select Radio Config File</label>
<binding>
<command>nasal</command>
<script>mig21.get_radio_file_gui();</script>
</binding>
</item>
<item>
<label>VOR/ILS Radio</label>
<binding>
<command>nasal</command>
<script>dialog.nav_radio_dialog.open()</script>
</binding>
</item>
<item>
<label>Comm Radio</label>
<binding>
<command>nasal</command>
<script>dialog.comm_radio_dialog.open()</script>
</binding>
</item>
<item>
<label>ADF Radio</label>
<binding>
<command>nasal</command>
<script>dialog.adf_radio_dialog.open()</script>
</binding>
</item>
<item>
<label>Smokepod Color</label>
<binding>
<command>nasal</command>
<script>dialog.smokepod_dialog.open()</script>
</binding>
</item>
<item>
<label>Repack Chute</label>
<binding>
<command>property-assign</command>
<property>/controls/flight/chute_jettisoned</property>
<value>0</value>
</binding>
<binding>
<command>property-assign</command>
<property>/fdm/jsbsim/systems/chute/deploy-rqst</property>
<value>0</value>
</binding>
</item>
<item>
<label>Fuel to full</label>
<binding>
<command>nasal</command>
<script>
if (getprop("/gear/gear/wow") == 1) {
setprop("/consumables/fuel/tank/level-norm", 1);
setprop("/consumables/fuel/tank[1]/level-norm", 1);
setprop("/consumables/fuel/tank[2]/level-norm", 1);
setprop("/consumables/fuel/tank[3]/level-norm", 1);
setprop("/consumables/fuel/tank[4]/level-norm", 1);
setprop("/consumables/fuel/tank[5]/level-norm", 1);
setprop("/consumables/fuel/tank[6]/level-norm", 1);
setprop("/consumables/fuel/tank[7]/level-norm", 1);
setprop("/consumables/fuel/tank[8]/level-norm", 1);
setprop("/consumables/fuel/tank[9]/level-norm", 1);
setprop("/consumables/fuel/tank[10]/level-norm", 1);
setprop("/consumables/fuel/tank[11]/level-norm", 1);
setprop("/consumables/fuel/tank[12]/level-norm", 1);
setprop("/consumables/fuel/tank[13]/level-norm", 1);
setprop("/consumables/fuel/tank[14]/level-norm", 1);
}
</script>
</binding>
</item>
<item>
<label>Toggle Damage</label>
<binding>
<command>nasal</command>
<script>
mig21.toggle_damage();
</script>
</binding>
</item>
<item>
<label>Tacview Record</label>
<binding>
<command>nasal</command>
<script>
if (tacview.starttime == 0) {
tacview.startwrite();
} else {
tacview.stopwrite();
}
</script>
</binding>
</item>
<item>
<label>Event Log</label>
<binding>
<command>dialog-show</command>
<dialog-name>flightlog</dialog-name>
</binding>
</item>
<item>
<label>Toggle Headshake</label>
<binding>
<command>property-toggle</command>
<property>/sim/enable-headshake</property>
</binding>
</item>
</menu>
</default>
</menubar>
</sim>

<!-- Nasal Scripts -->
Expand Down Expand Up @@ -118,6 +250,11 @@

</nasal>

<payload include="Systems/weaponset-analogue.xml"/>
<payload include="Systems/weaponset-analogue.xml">
<armament>
<msg type="bool">false</msg>
<damage type="bool">false</damage>
</armament>
</payload>

</PropertyList>
Loading

0 comments on commit 34d11e5

Please sign in to comment.