Game Development Reference
In-Depth Information
How it works...
In this recipe, we implemented two ways of handling the input in the console. The most
straightforward way is the
onConsoleCommand
method where we get the raw input and
can do whatever we want with it.
The more intricate way of doing this is using
ConsoleCommands
. With this, we get a
nice layered pattern to handle the input. Once the console is shown or hidden, it will
quickly slide in or out of the screen with the move effect. It will move the
offsetY
dis-
tance, and based on the mode, it will either move to that offset or from it. The
inher-
it="true"
value ensures that child elements move together with the component in ques-
tion.