It appears that the settings `escoria/esc/command_paths` and
`escoria/main/command_directories` have duplicate purposes.
Unfortunately, they are read in different places, so if you add a
directory to one setting, it will not be present in the other.
Specifically, `ESCCompiler` read from `escoria/esc/command_paths`
while `ESCCommand` and `ESCCommandRegistry` read from
`escoria/main/command_directories`.
As the `COMMAND_PATHS` constant had no references, it seemed more
appropriate to delete.
The `escoria/esc/command_paths` appears to have been set initially in
`project.godot` as part of:
https://github.com/godot-escoria/escoria-demo-game/pull/467
This commit starts by introducing a new action, `ESC_UI_PRIMARY_ACTION`,
that is used to represent a "primary action" from an input device, such
as a left-click on a mouse or the press of the primary button on a
gamepad. Although this action is not added to `InputMap` by default in
`escoria-core`, `_unhandled_input()` in `esc_item.gd` is updated to look
for it.
The other portion of this commit is an update to
`addons/escoria-ui-simplemouse/game.gd` that adds a gamepad mapping to
the `InputMap` for both `ESC_UI_PRIMARY_ACTION` as well as another new
action `ESC_UI_CHANGE_VERB_ACTION`. These actions are mapped to X and Y
on an XBox controller, respectively.
Note that `game.gd` is also updated to implement `_process()` such that
moving `JOY_AXIS_0` and `JOY_AXIS_1` on "gamepad 0" will move the
cursor around on the screen as the mouse would.
Overall, this makes the game fairly playable with a gamepad, though
admittedly a mouse is still currently required to click the "New game"
button on the initial menu because `BaseButton::gui_input()` appears to
be hardcoded to check for mouse events exclusively:
godotengine/godot@a09814e/scene/gui/base_button.cpp#L55-L81
This introduces a new API on `ESCInputsManager` that makes it
possible to inject custom logic for processing input events.
An example of how to use this API will be introduced in a
separate commit as part of
https://github.com/godot-escoria/escoria-demo-game/pull/503
via a new plugin, `addons/escoria-ui-keyboard-9verbs/`,
which shows how this can be used to add support for keyboard shortcuts
to select a specific verb.