Toggling the help node

Just as the default input mode implements actions to mimic SimpleApplication, the AcorusDemo class implements 4 additional actions:

  • "collect garbage",

  • "toggle help",

  • "toggle pause", and

  • "toggle worldAxes".

Two versions of the help node

A detailed help node can obscure a large portion of a viewport. For this reason, the user may wish to display it only on request.

The built-in "toggle help" action switches between 2 versions of the help node: detailed and minimal.

AcorusDemo knows whether "toggle help" is bound to a hotkey. If it isn’t bound, then the 2 versions are identical, providing input help/hints like those seen in HelloAcorus and HelloSimpleApplication.

If the "toggle help" action is bound, then the minimal version becomes much smaller: it merely indicates how to display the detailed version.

HelloToggleHelp

HelloToggleHelp is an example application that modifies HelloSimpleApplication by binding H to the "toggle help" action.

  • Initially, the minimal version of the help node is displayed.

  • Pressing H displays the detailed version.

  • Pressing H again minimizes the help node.

By default, an AcorusDemo initially displays the minimal version of the help node. To override this default, invoke app.setHelpVersion(HelpVersion.Detailed) from acorusInit().

Summary

  • AcorusDemo implements common actions such as "toggle help".

  • Binding a hotkey to "toggle help" empowers the user to display and/or minimize the help node.