20,741
edits
Line 8: | Line 8: | ||
To toggle the Parking brake, use this. Entire code-block shown. Non-repeatable button. (You have to specifically set <repeatable> to true | To toggle the Parking brake, use this. Entire code-block shown. Non-repeatable button. (You have to specifically set <repeatable> to true | ||
if you want repeatable. It is assumed to be false. | if you want repeatable. It is assumed to be false. | ||
<syntaxhighlight lang="xml"> | |||
<button n="1"> | <button n="1"> | ||
<desc>Toggle parking break</desc> | <desc>Toggle parking break</desc> | ||
Line 15: | Line 16: | ||
</binding> | </binding> | ||
</button> | </button> | ||
</syntaxhighlight> | |||
This method can be used to toggle any property that is on/off. Use Debug - Browse Internal Properties to find suitable candidates. | This method can be used to toggle any property that is on/off. Use Debug - Browse Internal Properties to find suitable candidates. | ||
Also see getProp, setProp and setAll below. | Also see getProp, setProp and setAll below. | ||
Line 73: | Line 74: | ||
</binding> | </binding> | ||
This will continously reduce /sim/current-view/goal-pitch-offset-deg in steps of 2 while the button is held in. | This will continously reduce /sim/current-view/goal-pitch-offset-deg in steps of 2 while the button is held in. | ||
== Advanced Programming == | == Advanced Programming == |